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/winbindd_dual.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'source3/nsswitch/winbindd_dual.c') diff --git a/source3/nsswitch/winbindd_dual.c b/source3/nsswitch/winbindd_dual.c index cdfa1e0493..d978a6adf7 100644 --- a/source3/nsswitch/winbindd_dual.c +++ b/source3/nsswitch/winbindd_dual.c @@ -52,25 +52,25 @@ static void child_read_request(struct winbindd_cli_state *state) } if (state->request.extra_len == 0) { - state->request.extra_data = NULL; + state->request.extra_data.data = NULL; return; } DEBUG(10, ("Need to read %d extra bytes\n", (int)state->request.extra_len)); - state->request.extra_data = + state->request.extra_data.data = SMB_MALLOC_ARRAY(char, state->request.extra_len + 1); - if (state->request.extra_data == NULL) { + if (state->request.extra_data.data == NULL) { DEBUG(0, ("malloc failed\n")); state->finished = True; return; } /* Ensure null termination */ - state->request.extra_data[state->request.extra_len] = '\0'; + state->request.extra_data.data[state->request.extra_len] = '\0'; - len = read_data(state->sock, state->request.extra_data, + len = read_data(state->sock, state->request.extra_data.data, state->request.extra_len); if (len != state->request.extra_len) { @@ -153,7 +153,7 @@ static void async_main_request_sent(void *private_data, BOOL success) return; } - setup_async_write(&state->child->event, state->request->extra_data, + setup_async_write(&state->child->event, state->request->extra_data.data, state->request->extra_len, async_request_sent, state); } @@ -728,11 +728,11 @@ static BOOL fork_domain_child(struct winbindd_child *child) state.request.null_term = '\0'; child_process_request(child->domain, &state); - SAFE_FREE(state.request.extra_data); + SAFE_FREE(state.request.extra_data.data); cache_store_response(sys_getpid(), &state.response); - SAFE_FREE(state.response.extra_data); + SAFE_FREE(state.response.extra_data.data); /* We just send the result code back, the result * structure needs to be fetched via the -- cgit