[SCM] Samba Shared Repository - branch v3-0-test updated - release-3-0-31-7-gc93d429

Jeremy Allison jra at samba.org
Fri Jul 25 18:47:30 GMT 2008


The branch, v3-0-test has been updated
       via  c93d42969451949566327e7fdbf29bfcee2c8319 (commit)
      from  312e2df86d9ad9d9766569e57680ee149cd985df (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-0-test


- Log -----------------------------------------------------------------
commit c93d42969451949566327e7fdbf29bfcee2c8319
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Jul 25 11:46:34 2008 -0700

    Back-port of Volkers fix.
    
        Fix a race condition in winbind leading to a crash
    
        When SIGCHLD handling is delayed for some reason, sending a request to a child
        can fail early because the child has died already. In this case
        async_main_request_sent() directly called the continuation function without
        properly removing the malfunctioning child process and the requests in the
        queue. The next request would then crash in the DLIST_ADD_END() in
        async_request() because the request pending for the child had been
        talloc_free()'ed and yet still was referenced in the list.
    
        This one is *old*...
    
        Volker
    
    Jeremy.

-----------------------------------------------------------------------

Summary of changes:
 source/nsswitch/winbindd_dual.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/nsswitch/winbindd_dual.c b/source/nsswitch/winbindd_dual.c
index 40ebf54..396eca7 100644
--- a/source/nsswitch/winbindd_dual.c
+++ b/source/nsswitch/winbindd_dual.c
@@ -102,6 +102,7 @@ struct winbindd_async_request {
 	void *private_data;
 };
 
+static void async_request_fail(struct winbindd_async_request *state);
 static void async_main_request_sent(void *private_data, BOOL success);
 static void async_request_sent(void *private_data, BOOL success);
 static void async_reply_recv(void *private_data, BOOL success);
@@ -127,6 +128,7 @@ void async_request(TALLOC_CTX *mem_ctx, struct winbindd_child *child,
 
 	state->mem_ctx = mem_ctx;
 	state->child = child;
+	state->reply_timeout_event = NULL;
 	state->request = request;
 	state->response = response;
 	state->continuation = continuation;
@@ -146,10 +148,7 @@ static void async_main_request_sent(void *private_data, BOOL success)
 
 	if (!success) {
 		DEBUG(5, ("Could not send async request\n"));
-
-		state->response->length = sizeof(struct winbindd_response);
-		state->response->result = WINBINDD_ERROR;
-		state->continuation(state->private_data, False);
+		async_request_fail(state);
 		return;
 	}
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list