summaryrefslogtreecommitdiff
path: root/source4/setup
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-06-12 06:35:18 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:18:00 -0500
commit47ab0ed8edd9d2c8b1ca76cfc3bb3f3ae0917f51 (patch)
tree766131a5925f49c8b834bdbbe1f7fa2588d7fd68 /source4/setup
parent2e1851e1acae4aba40fd38bc0f7b088599e9cba9 (diff)
downloadsamba-47ab0ed8edd9d2c8b1ca76cfc3bb3f3ae0917f51.tar.gz
samba-47ab0ed8edd9d2c8b1ca76cfc3bb3f3ae0917f51.tar.bz2
samba-47ab0ed8edd9d2c8b1ca76cfc3bb3f3ae0917f51.zip
r7499: ensure that the account we run tests as ("Administrator") maps to the
unixName that we are running as in the test suite. Otherwise files are created as a user without any entry in the sam, so the ACL doesn't allow that user read permission when it should. This should fix the RAW-ACLS test in the build farm. (This used to be commit 30445483e4facb0a1d8a5979a2eac6c166193c09)
Diffstat (limited to 'source4/setup')
-rw-r--r--source4/setup/provision.ldif2
-rwxr-xr-xsource4/setup/provision.pl13
2 files changed, 13 insertions, 2 deletions
diff --git a/source4/setup/provision.ldif b/source4/setup/provision.ldif
index 131ebe2b42..c98a6153e0 100644
--- a/source4/setup/provision.ldif
+++ b/source4/setup/provision.ldif
@@ -298,7 +298,7 @@ sAMAccountType: 0x30000000
objectCategory: CN=Person,CN=Schema,CN=Configuration,${BASEDN}
isCriticalSystemObject: TRUE
unicodePwd: ${ADMINPASS}
-unixName: root
+unixName: ${ROOT}
dn: CN=Guest,CN=Users,${BASEDN}
objectClass: top
diff --git a/source4/setup/provision.pl b/source4/setup/provision.pl
index a87f2aef54..fccc555ce1 100755
--- a/source4/setup/provision.pl
+++ b/source4/setup/provision.pl
@@ -10,6 +10,7 @@ my $opt_hostip;
my $opt_realm;
my $opt_domain;
my $opt_adminpass;
+my $opt_root;
my $opt_nobody;
my $opt_nogroup;
my $opt_wheel;
@@ -171,6 +172,10 @@ sub substitute($)
return $opt_nobody;
}
+ if ($var eq "ROOT") {
+ return $opt_root;
+ }
+
if ($var eq "NOGROUP") {
return $opt_nogroup;
}
@@ -278,6 +283,7 @@ provision.pl [options]
--invocationid GUID set invocationid (otherwise random)
--outputdir OUTPUTDIR set output directory
--adminpass PASSWORD choose admin password (otherwise random)
+ --root USERNAME choose 'root' unix username
--nobody USERNAME choose 'nobody' user
--nogroup GROUPNAME choose 'nogroup' group
--wheel GROUPNAME choose 'wheel' privileged group
@@ -303,6 +309,7 @@ GetOptions(
'host-guid=s' => \$opt_hostguid,
'invocationid=s' => \$opt_invocationid,
'adminpass=s' => \$opt_adminpass,
+ 'root=s' => \$opt_root,
'nobody=s' => \$opt_nobody,
'nogroup=s' => \$opt_nogroup,
'wheel=s' => \$opt_wheel,
@@ -334,6 +341,10 @@ if (!$opt_hostip) {
$opt_quiet or print "Provisioning host '$opt_hostname'[$opt_hostip] for domain '$opt_domain' in realm '$opt_realm'\n";
+if (!$opt_root) {
+ $opt_root = "root";
+}
+
if (!$opt_nobody) {
if (defined getpwnam("nobody")) {
$opt_nobody = "nobody";
@@ -380,7 +391,7 @@ my $data = FileLoad("setup/provision.ldif") || die "Unable to load provision.ldi
$data .= add_foreign("S-1-5-7", "Anonymous", "\${NOBODY}");
$data .= add_foreign("S-1-1-0", "World", "\${NOGROUP}");
$data .= add_foreign("S-1-5-2", "Network", "\${NOGROUP}");
-$data .= add_foreign("S-1-5-18", "System", "root");
+$data .= add_foreign("S-1-5-18", "System", "\${ROOT}");
$data .= add_foreign("S-1-5-11", "Authenticated Users", "\${USERS}");
if (!$opt_adminpass) {