[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Mon Nov 8 15:25:02 MST 2010


The branch, master has been updated
       via  3a5f030 Second part of fix for bug #7777 - When requesting lookups for BUILTIN sids, winbindd allocates new uids/gids in error.
       via  092507c Ensure we always have a mapped group for "Domain Users". Needed for DC tests to pass with bugfix for bug #7777.
       via  42f9ae8 First part of fix for bug #7777 - When requesting lookups for BUILTIN sids, winbindd allocates new uids/gids in error.
      from  842a8e4 s3/configure: fix typo and warning

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


- Log -----------------------------------------------------------------
commit 3a5f03015bf400268eb9d00747189aa5aefdeda9
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Nov 8 13:41:34 2010 -0800

    Second part of fix for bug #7777 - When requesting lookups for BUILTIN sids, winbindd allocates new uids/gids in error.
    
    Ensure we return after calling passdb for SID lookups for which we are
    authoritative.
    
    Jeremy.
    
    Autobuild-User: Jeremy Allison <jra at samba.org>
    Autobuild-Date: Mon Nov  8 22:24:34 UTC 2010 on sn-devel-104

commit 092507c65a1a2fe2c3731248578a265a20bbe14e
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Nov 8 13:39:51 2010 -0800

    Ensure we always have a mapped group for "Domain Users".
    Needed for DC tests to pass with bugfix for bug #7777.
    
    Jeremy.

commit 42f9ae875659e9e698a2875cf313c0d2173f94b2
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Nov 8 13:38:13 2010 -0800

    First part of fix for bug #7777 - When requesting lookups for BUILTIN sids, winbindd allocates new uids/gids in error.
    
    Ensure idmap_init_passdb_domain() correctly initialized the default
    domain first.
    
    Jeremy.

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

Summary of changes:
 selftest/target/Samba3.pm |    7 ++++++-
 source3/winbindd/idmap.c  |   14 +++++++++++++-
 2 files changed, 19 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index 4c554b5..f1387d9 100644
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -444,7 +444,7 @@ sub provision($$$$$$)
 
 	my ($max_uid, $max_gid);
 	my ($uid_nobody, $uid_root);
-	my ($gid_nobody, $gid_nogroup, $gid_root);
+	my ($gid_nobody, $gid_nogroup, $gid_root, $gid_domusers);
 
 	if ($unix_uid < 0xffff - 2) {
 		$max_uid = 0xffff;
@@ -464,6 +464,7 @@ sub provision($$$$$$)
 	$gid_nobody = $max_gid - 1;
 	$gid_nogroup = $max_gid - 2;
 	$gid_root = $max_gid - 3;
+	$gid_domusers = $max_gid - 4;
 
 	##
 	## create conffile
@@ -605,6 +606,7 @@ $unix_name:x:$unix_uid:$unix_gids[0]:$unix_name gecos:$prefix_abs:/bin/false
 	print GROUP "nobody:x:$gid_nobody:
 nogroup:x:$gid_nogroup:nobody
 $unix_name-group:x:$unix_gids[0]:
+domusers:X:$gid_domusers:
 ";
 	if ($unix_gids[0] != 0) {
 		print GROUP "root:x:$gid_root:";
@@ -672,6 +674,9 @@ sub wait_for_start($$)
 	system($self->binpath("smbclient") ." $envvars->{CONFIGURATION} -L $envvars->{SERVER_IP} -U% -p 139 | head -2");
 	system($self->binpath("smbclient") ." $envvars->{CONFIGURATION} -L $envvars->{SERVER_IP} -U% -p 139 | head -2");
 
+	# Ensure we have domain users mapped.
+	system($self->binpath("net") ." $envvars->{CONFIGURATION} groupmap add rid=513 unixgroup=domusers type=domain");
+
 	print $self->getlog_env($envvars);
 }
 
diff --git a/source3/winbindd/idmap.c b/source3/winbindd/idmap.c
index 102f4eb..102ae8a 100644
--- a/source3/winbindd/idmap.c
+++ b/source3/winbindd/idmap.c
@@ -448,6 +448,16 @@ static struct idmap_domain *idmap_init_passdb_domain(TALLOC_CTX *mem_ctx)
 {
 	idmap_init();
 
+	/*
+	 * Always init the default domain, we can't go without one
+	 */
+	if (default_idmap_domain == NULL) {
+		default_idmap_domain = idmap_init_default_domain(NULL);
+	}
+	if (default_idmap_domain == NULL) {
+		return NULL;
+	}
+
 	if (passdb_idmap_domain != NULL) {
 		return passdb_idmap_domain;
 	}
@@ -633,7 +643,9 @@ NTSTATUS idmap_backends_sid_to_unixid(const char *domain, struct id_map *id)
 			return status;
 		}
 
-		DEBUG(10, ("passdb could not map, asking backends...\n"));
+		DEBUG(10, ("passdb could not map.\n"));
+
+		return NT_STATUS_NONE_MAPPED;
 	}
 
 	dom = idmap_find_domain(domain);


-- 
Samba Shared Repository


More information about the samba-cvs mailing list