From 5f9dca64daea8bf910a66e1178ad0336628fdc9f Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 25 Apr 2001 05:47:50 +0000 Subject: merge some of the nsswitch code from tng to head the libnss_winbind.so from head now works with the winbindd from tng (This used to be commit 67ccfd2826548a6ca22562f9fb3ae156a57bd7db) --- source3/nsswitch/wb_common.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'source3/nsswitch/wb_common.c') diff --git a/source3/nsswitch/wb_common.c b/source3/nsswitch/wb_common.c index 98a4b6758b..4040e1cff2 100644 --- a/source3/nsswitch/wb_common.c +++ b/source3/nsswitch/wb_common.c @@ -37,7 +37,7 @@ void init_request(struct winbindd_request *request, int request_type) static char *domain_env; static BOOL initialised; - request->cmd = (enum winbindd_cmd)request_type; + request->cmd = request_type; request->pid = getpid(); request->domain[0] = '\0'; @@ -59,7 +59,7 @@ void init_response(struct winbindd_response *response) { /* Initialise return value */ - response->result = (enum winbindd_result)NSS_STATUS_UNAVAIL; + response->result = WINBINDD_ERROR; } /* Close established socket */ @@ -141,6 +141,7 @@ static int open_pipe_sock(void) if (connect(established_socket, (struct sockaddr *)&sunaddr, sizeof(sunaddr)) == -1) { close_sock(); + established_socket = -1; return -1; } @@ -304,7 +305,7 @@ void free_response(struct winbindd_response *response) /* Handle simple types of requests */ -enum nss_status winbindd_request(int req_type, +NSS_STATUS winbindd_request(int req_type, struct winbindd_request *request, struct winbindd_response *response) { -- cgit