s4:selftest: avoid creating two groups with GID 0 in provision
authorMichael Adam <obnox@samba.org>
Tue, 3 Feb 2015 13:59:06 +0000 (14:59 +0100)
committerGünther Deschner <gd@samba.org>
Fri, 13 Feb 2015 17:25:41 +0000 (18:25 +0100)
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>
selftest/target/Samba4.pm

index 13477d73271c9a0dac38160905f2e70a69a709e9..a58a1cf6b649659b195b93e81161099e322fcdf6 100755 (executable)
@@ -714,13 +714,14 @@ pdbtest4:x:65530:65533:pdbtest gecos:$ctx->{prefix_abs}:/bin/false
         my $uid_rfc2307test = 65533;
 
        open(GRP, ">$ctx->{nsswrap_group}");
-       print GRP "
-root:x:0:
-wheel:x:10:
+       if ($ctx->{unix_gid} != 0) {
+               print GRP "root:x:0:\n";
+       }
+       print GRP "$ctx->{unix_name}:x:$ctx->{unix_gid}:\n";
+       print GRP "wheel:x:10:
 users:x:100:
 nobody:x:65533:
 nogroup:x:65534:nobody
-$ctx->{unix_name}:x:$ctx->{unix_gid}:
 ";
        close(GRP);
         my $gid_rfc2307test = 65532;