[SCM] Samba Shared Repository - branch master updated

Stefan Metzmacher metze at samba.org
Tue Feb 25 03:18:03 MST 2014


The branch, master has been updated
       via  e35b1d8 passdb: spare superfluous call to lookup_rids() in lookup_sids()
       via  0cb15c1 rpc: fix name-normalization in rpc_sid_to_name()
       via  ab7992b rpc: correctly tread domain-only requests in rpc_sid_to_name()
       via  8fec421 samr: don't block the sam sid or the builtin domain sid in sid_to_name
      from  fcf846a ctdb-eventscripts: Switch on dumping of stuck nfsd threads

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


- Log -----------------------------------------------------------------
commit e35b1d8dc43e63d8932e8e0e3cd274e9de6963e3
Author: Michael Adam <obnox at samba.org>
Date:   Thu Feb 20 16:57:21 2014 +0100

    passdb: spare superfluous call to lookup_rids() in lookup_sids()
    
    If we have no name indexes for a domain, all names were domain
    names and have been resolved earlier, including the domain name.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10463
    
    Change-Id: I5a7a387fa89d2b2bdd465c13b3dca0e18ca0482c
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>
    
    Autobuild-User(master): Stefan Metzmacher <metze at samba.org>
    Autobuild-Date(master): Tue Feb 25 11:17:18 CET 2014 on sn-devel-104

commit 0cb15c169f134026e0dae40994640f76e64f99d9
Author: Michael Adam <obnox at samba.org>
Date:   Thu Feb 20 16:55:15 2014 +0100

    rpc: fix name-normalization in rpc_sid_to_name()
    
    Hand the *input* name as input into the normalize call,
    not the (potentially uninitialized...) *output* name...
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10463
    
    Change-Id: I4f3fc25882c22d96329e252d0a53bbe13d533472
    Pair-Programmed-With: Gregor Beck <gbeck at sernet.de>
    Signed-off-by: Gregor Beck <gbeck at sernet.de>
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>

commit ab7992b5bfa40d9cda66de319ded08276bb54e99
Author: Michael Adam <obnox at samba.org>
Date:   Thu Feb 20 16:53:51 2014 +0100

    rpc: correctly tread domain-only requests in rpc_sid_to_name()
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10463
    
    Change-Id: I6a8a8c272b9cf7dbce4f9a99012209c29c31e839
    Pair-Programmed-With: Gregor Beck <gbeck at sernet.de>
    Signed-off-by: Gregor Beck <gbeck at sernet.de>
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Stefan Metzmacher <metze at samba.org>

commit 8fec421543ff25c99655acca801d363c416fd61d
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Feb 20 16:50:32 2014 +0100

    samr: don't block the sam sid or the builtin domain sid in sid_to_name
    
    Previously only members of these domains were handled.
    But we also need to handle the domain itself.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10463
    
    Change-Id: I44f85267eda243d586fffd24a799e153de0ff982
    Pair-Programmed-With: Gregor Beck <gbeck at sernet.de>
    Signed-off-by: Gregor Beck <gbeck at sernet.de>
    Signed-off-by: Stefan Metzmacher <metze at sernet.de>
    Reviewed-by: Michael Adam <obnox at samba.org>

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

Summary of changes:
 source3/passdb/lookup_sid.c      |   19 ++++++++++++-------
 source3/winbindd/winbindd_rpc.c  |    4 ++--
 source3/winbindd/winbindd_samr.c |    2 ++
 3 files changed, 16 insertions(+), 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/passdb/lookup_sid.c b/source3/passdb/lookup_sid.c
index 6ec6ce8..fa44f3e 100644
--- a/source3/passdb/lookup_sid.c
+++ b/source3/passdb/lookup_sid.c
@@ -899,13 +899,18 @@ NTSTATUS lookup_sids(TALLOC_CTX *mem_ctx, int num_sids,
 			break;
 		}
 
-		if (dom->num_idxs) {
-			if (!(rids = talloc_array(tmp_ctx, uint32, dom->num_idxs))) {
-				result = NT_STATUS_NO_MEMORY;
-				goto fail;
-			}
-		} else {
-			rids = NULL;
+		if (dom->num_idxs == 0) {
+			/*
+			 * This happens only if the only sid related to
+			 * this domain is the domain sid itself, which
+			 * is mapped to SID_NAME_DOMAIN above.
+			 */
+			continue;
+		}
+
+		if (!(rids = talloc_array(tmp_ctx, uint32, dom->num_idxs))) {
+			result = NT_STATUS_NO_MEMORY;
+			goto fail;
 		}
 
 		for (j=0; j<dom->num_idxs; j++) {
diff --git a/source3/winbindd/winbindd_rpc.c b/source3/winbindd/winbindd_rpc.c
index 0986d82..739088f 100644
--- a/source3/winbindd/winbindd_rpc.c
+++ b/source3/winbindd/winbindd_rpc.c
@@ -362,7 +362,7 @@ NTSTATUS rpc_sid_to_name(TALLOC_CTX *mem_ctx,
 
 	map_status = normalize_name_map(mem_ctx,
 					domain,
-					*pname,
+					names[0],
 					&mapped_name);
 	if (NT_STATUS_IS_OK(map_status) ||
 	    NT_STATUS_EQUAL(map_status, NT_STATUS_FILE_RENAMED)) {
@@ -371,7 +371,7 @@ NTSTATUS rpc_sid_to_name(TALLOC_CTX *mem_ctx,
 	} else {
 		*pname = talloc_strdup(mem_ctx, names[0]);
 	}
-	if (*pname == NULL) {
+	if ((names[0] != NULL) && (*pname == NULL)) {
 		return NT_STATUS_NO_MEMORY;
 	}
 
diff --git a/source3/winbindd/winbindd_samr.c b/source3/winbindd/winbindd_samr.c
index 9f45126..e550434 100644
--- a/source3/winbindd/winbindd_samr.c
+++ b/source3/winbindd/winbindd_samr.c
@@ -684,7 +684,9 @@ static NTSTATUS sam_sid_to_name(struct winbindd_domain *domain,
 
 	/* Paranoia check */
 	if (!sid_check_is_in_builtin(sid) &&
+	    !sid_check_is_builtin(sid) &&
 	    !sid_check_is_in_our_sam(sid) &&
+	    !sid_check_is_our_sam(sid) &&
 	    !sid_check_is_in_unix_users(sid) &&
 	    !sid_check_is_unix_users(sid) &&
 	    !sid_check_is_in_unix_groups(sid) &&


-- 
Samba Shared Repository


More information about the samba-cvs mailing list