r15053: fix portabilities issues between 32-bit winbind clients and a 64-bit winbindd...
[kai/samba-autobuild/.git] / source / nsswitch / winbindd_dual.c
index cdfa1e049320f9c7b9faf1a09e86266b531fded9..d978a6adf79deedc9f04adfe15d8501badd3f9a6 100644 (file)
@@ -52,25 +52,25 @@ static void child_read_request(struct winbindd_cli_state *state)
        }
 
        if (state->request.extra_len == 0) {
        }
 
        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));
 
                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);
 
                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 */
                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) {
                        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;
        }
 
                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);
 }
                          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);
 
                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);
 
 
                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
 
                /* We just send the result code back, the result
                 * structure needs to be fetched via the