From 092507c65a1a2fe2c3731248578a265a20bbe14e Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 8 Nov 2010 13:39:51 -0800 Subject: Ensure we always have a mapped group for "Domain Users". Needed for DC tests to pass with bugfix for bug #7777. Jeremy. --- selftest/target/Samba3.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'selftest/target') diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm index 4c554b5814..f1387d9fc3 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); } -- cgit