[SCM] Samba Shared Repository - branch master updated

Volker Lendecke vlendec at samba.org
Sat Apr 28 15:39:03 MDT 2012


The branch, master has been updated
       via  5712e51 s3: Remove a SMB_ASSERT
       via  4a28c6c s3: Fix bug 8904 -- wbinfo --lookup-sids "" crashes winbind
      from  0dc3f42 Add an audit file VFS routine so we can handle auditing with SACLs.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 5712e5199ec0231c241f0d0ca02f477d05892bb7
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Apr 28 19:55:31 2012 +0200

    s3: Remove a SMB_ASSERT
    
    Autobuild-User: Volker Lendecke <vl at samba.org>
    Autobuild-Date: Sat Apr 28 23:38:45 CEST 2012 on sn-devel-104

commit 4a28c6ca7cd97535596dd93741689ff17bb1c395
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Apr 28 19:51:46 2012 +0200

    s3: Fix bug 8904 -- wbinfo --lookup-sids "" crashes winbind
    
    Much of the code further down and up the call chain expects the
    structures wb_lookupsids returns to be allocated. Do that despite
    we have nothing to look up.

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

Summary of changes:
 source3/winbindd/wb_lookupsids.c |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/winbindd/wb_lookupsids.c b/source3/winbindd/wb_lookupsids.c
index e896860..b050bd0 100644
--- a/source3/winbindd/wb_lookupsids.c
+++ b/source3/winbindd/wb_lookupsids.c
@@ -123,11 +123,6 @@ struct tevent_req *wb_lookupsids_send(TALLOC_CTX *mem_ctx,
 	state->sids = sids;
 	state->num_sids = num_sids;
 
-	if (num_sids == 0) {
-		tevent_req_done(req);
-		return tevent_req_post(req, ev);
-	}
-
 	state->single_sids = talloc_array(state, uint32_t, num_sids);
 	if (tevent_req_nomem(state->single_sids, req)) {
 		return tevent_req_post(req, ev);
@@ -153,6 +148,11 @@ struct tevent_req *wb_lookupsids_send(TALLOC_CTX *mem_ctx,
 		return tevent_req_post(req, ev);
 	}
 
+	if (num_sids == 0) {
+		tevent_req_done(req);
+		return tevent_req_post(req, ev);
+	}
+
 	for (i=0; i<num_sids; i++) {
 		struct wb_lookupsids_domain *d;
 
@@ -645,7 +645,11 @@ NTSTATUS wb_lookupsids_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
 	 * if not we have a bug in the code!
 	 *
 	 */
-	SMB_ASSERT(state->res_names->count == state->num_sids);
+	if (state->res_names->count != state->num_sids) {
+		DEBUG(0, ("res_names->count = %d, expected %d\n",
+			  state->res_names->count, state->num_sids));
+		return NT_STATUS_INTERNAL_ERROR;
+	}
 
 	/*
 	 * Not strictly needed, but it might make debugging in the callers


-- 
Samba Shared Repository


More information about the samba-cvs mailing list