summaryrefslogtreecommitdiffstats
path: root/selftest/target
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2015-02-02 16:05:17 +0100
committerGünther Deschner <gd@samba.org>2015-02-13 18:25:41 +0100
commit26fc3eba769166de75aac7831fa667abe83e0a31 (patch)
treee95d80f3b37c0be634e351cd282212462bc78bef /selftest/target
parentfd783b04bb82feed75c41c6d96506dbe691d97f2 (diff)
downloadsamba-26fc3eba769166de75aac7831fa667abe83e0a31.tar.gz
samba-26fc3eba769166de75aac7831fa667abe83e0a31.tar.xz
samba-26fc3eba769166de75aac7831fa667abe83e0a31.zip
s4:selftest: avoid creating two entries for UID 0 in provision
Pair-Programmed-With: Guenther Deschner <gd@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'selftest/target')
-rwxr-xr-xselftest/target/Samba4.pm9
1 files changed, 5 insertions, 4 deletions
diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm
index 1cc74b7987..13477d7327 100755
--- a/selftest/target/Samba4.pm
+++ b/selftest/target/Samba4.pm
@@ -700,10 +700,11 @@ sub provision_raw_step1($$)
Samba::mk_krb5_conf($ctx, "");
open(PWD, ">$ctx->{nsswrap_passwd}");
- print PWD "
-root:x:0:0:root gecos:$ctx->{prefix_abs}:/bin/false
-$ctx->{unix_name}:x:$ctx->{unix_uid}:100:$ctx->{unix_name} gecos:$ctx->{prefix_abs}:/bin/false
-nobody:x:65534:65533:nobody gecos:$ctx->{prefix_abs}:/bin/false
+ if ($ctx->{unix_uid} != 0) {
+ print PWD "root:x:0:0:root gecos:$ctx->{prefix_abs}:/bin/false\n";
+ }
+ print PWD "$ctx->{unix_name}:x:$ctx->{unix_uid}:100:$ctx->{unix_name} gecos:$ctx->{prefix_abs}:/bin/false\n";
+ print PWD "nobody:x:65534:65533:nobody gecos:$ctx->{prefix_abs}:/bin/false
pdbtest:x:65533:65533:pdbtest gecos:$ctx->{prefix_abs}:/bin/false
pdbtest2:x:65532:65533:pdbtest gecos:$ctx->{prefix_abs}:/bin/false
pdbtest3:x:65531:65533:pdbtest gecos:$ctx->{prefix_abs}:/bin/false