From 8c9eb7631eecbe3f9bda30aff4b5d97d5e2a8737 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 12 Apr 2006 14:10:39 +0000 Subject: r15053: fix portabilities issues between 32-bit winbind clients and a 64-bit winbindd server (This used to be commit a95d11345e76948b147bbc1f29a05c978d99a47a) --- source3/nsswitch/wb_common.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'source3/nsswitch/wb_common.c') diff --git a/source3/nsswitch/wb_common.c b/source3/nsswitch/wb_common.c index 91ec912b7d..91ebdbd584 100644 --- a/source3/nsswitch/wb_common.c +++ b/source3/nsswitch/wb_common.c @@ -37,7 +37,7 @@ void free_response(struct winbindd_response *response) /* Free any allocated extra_data */ if (response) - SAFE_FREE(response->extra_data); + SAFE_FREE(response->extra_data.data); } /* Initialise a request structure */ @@ -324,13 +324,13 @@ static int winbind_open_pipe_sock(int recursing) request.flags = WBFLAG_RECURSE; if (winbindd_request_response(WINBINDD_PRIV_PIPE_DIR, &request, &response) == NSS_STATUS_SUCCESS) { int fd; - if ((fd = winbind_named_pipe_sock(response.extra_data)) != -1) { + if ((fd = winbind_named_pipe_sock(response.extra_data.data)) != -1) { close(winbindd_fd); winbindd_fd = fd; } } - SAFE_FREE(response.extra_data); + SAFE_FREE(response.extra_data.data); return winbindd_fd; #else @@ -492,7 +492,7 @@ int read_reply(struct winbindd_response *response) the server. This has no meaning in the client's address space so we clear it out. */ - response->extra_data = NULL; + response->extra_data.data = NULL; /* Read variable length response */ @@ -502,11 +502,11 @@ int read_reply(struct winbindd_response *response) /* Mallocate memory for extra data */ - if (!(response->extra_data = malloc(extra_data_len))) { + if (!(response->extra_data.data = malloc(extra_data_len))) { return -1; } - if ((result2 = read_sock(response->extra_data, extra_data_len)) + if ((result2 = read_sock(response->extra_data.data, extra_data_len)) == -1) { free_response(response); return -1; @@ -550,7 +550,7 @@ NSS_STATUS winbindd_send_request(int req_type, struct winbindd_request *request) } if ((request->extra_len != 0) && - (write_sock(request->extra_data, request->extra_len, request->flags & WBFLAG_RECURSE) == -1)) { + (write_sock(request->extra_data.data, request->extra_len, request->flags & WBFLAG_RECURSE) == -1)) { return NSS_STATUS_UNAVAIL; } -- cgit