[SCM] Samba Shared Repository - branch v3-6-test updated

Karolin Seeger kseeger at samba.org
Wed Jan 4 13:14:16 MST 2012


The branch, v3-6-test has been updated
       via  23db6e7 s3-winbind: Fix segfault if we can't map the last user.
       via  2fca06a s3-winbind: Move finding the domain to it's own function.
      from  16c0d52 Fix bug #8644 - vfs_acl_xattr and vfs_acl_tdb modules can fail to add inheritable entries on a directory with no stored ACL.

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


- Log -----------------------------------------------------------------
commit 23db6e7cf65bdd3974a4857dda0be6ad7d758b9a
Author: Andreas Schneider <asn at samba.org>
Date:   Tue Jan 3 16:55:25 2012 +0100

    s3-winbind: Fix segfault if we can't map the last user.
    
    This fixes bug #8678.
    
    The issue is caused by bug #8608.
    
    Autobuild-User: Andreas Schneider <asn at cryptomilk.org>
    Autobuild-Date: Wed Jan  4 18:30:53 CET 2012 on sn-devel-104
    (cherry picked from commit b9d208bdaa9da2a5ae534481865efc881b851b01)

commit 2fca06a63d47619f2b6902b1c8601021843c4b95
Author: Andreas Schneider <asn at samba.org>
Date:   Tue Jan 3 16:54:39 2012 +0100

    s3-winbind: Move finding the domain to it's own function.
    
    This the first part to fix bug #8678.
    (cherry picked from commit 5075e565684627dfbd23f715da344b4365351ccb)

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

Summary of changes:
 source3/winbindd/wb_next_pwent.c |   50 +++++++++++++++++++++++++++++--------
 1 files changed, 39 insertions(+), 11 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/winbindd/wb_next_pwent.c b/source3/winbindd/wb_next_pwent.c
index d47b2fc..8104568 100644
--- a/source3/winbindd/wb_next_pwent.c
+++ b/source3/winbindd/wb_next_pwent.c
@@ -31,6 +31,26 @@ struct wb_next_pwent_state {
 static void wb_next_pwent_fetch_done(struct tevent_req *subreq);
 static void wb_next_pwent_fill_done(struct tevent_req *subreq);
 
+static struct winbindd_domain *wb_next_find_domain(struct winbindd_domain *domain)
+{
+	if (domain == NULL) {
+		domain = domain_list();
+	} else {
+		domain = domain->next;
+	}
+
+	if ((domain != NULL)
+	    && sid_check_is_domain(&domain->sid)) {
+		domain = domain->next;
+	}
+
+	if (domain == NULL) {
+		return NULL;
+	}
+
+	return domain;
+}
+
 struct tevent_req *wb_next_pwent_send(TALLOC_CTX *mem_ctx,
 				      struct tevent_context *ev,
 				      struct getpwent_state *gstate,
@@ -50,17 +70,7 @@ struct tevent_req *wb_next_pwent_send(TALLOC_CTX *mem_ctx,
 	if (state->gstate->next_user >= state->gstate->num_users) {
 		TALLOC_FREE(state->gstate->users);
 
-		if (state->gstate->domain == NULL) {
-			state->gstate->domain = domain_list();
-		} else {
-			state->gstate->domain = state->gstate->domain->next;
-		}
-
-		if ((state->gstate->domain != NULL)
-		    && sid_check_is_domain(&state->gstate->domain->sid)) {
-			state->gstate->domain = state->gstate->domain->next;
-		}
-
+		state->gstate->domain = wb_next_find_domain(state->gstate->domain);
 		if (state->gstate->domain == NULL) {
 			tevent_req_nterror(req, NT_STATUS_NO_MORE_ENTRIES);
 			return tevent_req_post(req, ev);
@@ -155,6 +165,24 @@ static void wb_next_pwent_fill_done(struct tevent_req *subreq)
 	if (NT_STATUS_EQUAL(status, NT_STATUS_NONE_MAPPED)) {
 		state->gstate->next_user += 1;
 
+		if (state->gstate->next_user >= state->gstate->num_users) {
+			TALLOC_FREE(state->gstate->users);
+
+			state->gstate->domain = wb_next_find_domain(state->gstate->domain);
+			if (state->gstate->domain == NULL) {
+				tevent_req_nterror(req, NT_STATUS_NO_MORE_ENTRIES);
+				return;
+			}
+
+			subreq = wb_query_user_list_send(state, state->ev,
+					state->gstate->domain);
+			if (tevent_req_nomem(subreq, req)) {
+				return;
+			}
+			tevent_req_set_callback(subreq, wb_next_pwent_fetch_done, req);
+			return;
+		}
+
 		subreq = wb_fill_pwent_send(state,
 					    state->ev,
 					    &state->gstate->users[state->gstate->next_user],


-- 
Samba Shared Repository


More information about the samba-cvs mailing list