summaryrefslogtreecommitdiff
path: root/selftest/target
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2010-11-08 13:39:51 -0800
committerJeremy Allison <jra@samba.org>2010-11-08 13:39:51 -0800
commit092507c65a1a2fe2c3731248578a265a20bbe14e (patch)
tree79302b79b90d512766393662e9e2e33cf440477a /selftest/target
parent42f9ae875659e9e698a2875cf313c0d2173f94b2 (diff)
downloadsamba-092507c65a1a2fe2c3731248578a265a20bbe14e.tar.gz
samba-092507c65a1a2fe2c3731248578a265a20bbe14e.tar.bz2
samba-092507c65a1a2fe2c3731248578a265a20bbe14e.zip
Ensure we always have a mapped group for "Domain Users".
Needed for DC tests to pass with bugfix for bug #7777. Jeremy.
Diffstat (limited to 'selftest/target')
-rw-r--r--selftest/target/Samba3.pm7
1 files changed, 6 insertions, 1 deletions
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);
}