struct winbindd_dispatch_table *table = dispatch_table;
struct winbindd_async_dispatch_table *atable;
- ZERO_STRUCTP(state->response);
-
- state->response->result = WINBINDD_PENDING;
- state->response->length = sizeof(struct winbindd_response);
-
state->mem_ctx = talloc_init("winbind request");
if (state->mem_ctx == NULL)
return;
return;
}
+ state->response = talloc_zero(state->mem_ctx,
+ struct winbindd_response);
+ if (state->response == NULL) {
+ DEBUG(10, ("talloc failed\n"));
+ remove_client(state);
+ return;
+ }
+ state->response->result = WINBINDD_PENDING;
+ state->response->length = sizeof(struct winbindd_response);
+
for (table = dispatch_table; table->fn; table++) {
if (state->request->cmd == table->cmd) {
DEBUG(10,("process_request: request fn %s\n",
}
state->sock = sock;
- state->response = &state->_response;
state->out_queue = tevent_queue_create(state, "winbind client reply");
if (state->out_queue == NULL) {
NTSTATUS (*recv_fn)(struct tevent_req *req, TALLOC_CTX *mem_ctx,
struct winbindd_response **presp);
struct winbindd_request *request; /* Request from client */
- struct winbindd_request _request;
struct tevent_queue *out_queue;
- struct winbindd_response *response;
- struct winbindd_response _response; /* Respose to client */
+ struct winbindd_response *response; /* Respose to client */
bool getpwent_initialized; /* Has getpwent_state been
* initialized? */
bool getgrent_initialized; /* Has getgrent_state been
{
int fdpair[2];
struct winbindd_cli_state state;
+ struct winbindd_request request;
+ struct winbindd_response response;
struct winbindd_domain *primary_domain = NULL;
if (child->domain) {
ZERO_STRUCT(state);
state.pid = sys_getpid();
- state.request = &state._request;
- state.response = &state._response;
+ state.request = &request;
+ state.response = &response;
child->pid = sys_fork();