/* Destructor for global context to ensure fd is closed */
-#if HAVE_FUNCTION_ATTRIBUTE_DESTRUCTOR
+#if HAVE_DESTRUCTOR_ATTRIBUTE
__attribute__((destructor))
#endif
static void winbind_destructor(void)
* @brief Check if we talk to the priviliged pipe which should be owned by root.
*
* This checks if we have uid_wrapper running and if this is the case it will
- * allow to connect to the winbind privileged pipe even it is not owned by root.
+ * allow one to connect to the winbind privileged pipe even it is not owned by root.
*
* @param[in] uid The uid to check if we can safely talk to the pipe.
*
struct winbindd_response *response)
{
NSS_STATUS status = NSS_STATUS_UNAVAIL;
- struct winbindd_context *wb_ctx = ctx;
if (ctx == NULL) {
- wb_ctx = &wb_global_ctx;
+ ctx = &wb_global_ctx;
}
- status = winbindd_send_request(wb_ctx, req_type, 0, request);
+ status = winbindd_send_request(ctx, req_type, 0, request);
if (status != NSS_STATUS_SUCCESS)
return (status);
- status = winbindd_get_response(wb_ctx, response);
+ status = winbindd_get_response(ctx, response);
return status;
}
struct winbindd_response *response)
{
NSS_STATUS status = NSS_STATUS_UNAVAIL;
- struct winbindd_context *wb_ctx = ctx;
if (ctx == NULL) {
- wb_ctx = &wb_global_ctx;
+ ctx = &wb_global_ctx;
}
- status = winbindd_send_request(wb_ctx, req_type, 1, request);
+ status = winbindd_send_request(ctx, req_type, 1, request);
if (status != NSS_STATUS_SUCCESS)
return (status);
- status = winbindd_get_response(wb_ctx, response);
+ status = winbindd_get_response(ctx, response);
return status;
}