selftest: Add gooduser and eviluser to Samba3
authorAndreas Schneider <asn@samba.org>
Thu, 15 Nov 2018 15:06:49 +0000 (16:06 +0100)
committerJeremy Allison <jra@samba.org>
Wed, 5 Dec 2018 00:38:14 +0000 (01:38 +0100)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13699

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
selftest/target/Samba3.pm

index 888f3bd5154aa4cc5b34d044206b9bfa537ae64e..0547418b657876dc9873442029a3836caff89743 100755 (executable)
@@ -1666,8 +1666,10 @@ sub provision($$$$$$$$$)
        my ($gid_force_user);
        my ($uid_user1);
        my ($uid_user2);
        my ($gid_force_user);
        my ($uid_user1);
        my ($uid_user2);
+       my ($uid_gooduser);
+       my ($uid_eviluser);
 
 
-       if ($unix_uid < 0xffff - 10) {
+       if ($unix_uid < 0xffff - 12) {
                $max_uid = 0xffff;
        } else {
                $max_uid = $unix_uid;
                $max_uid = 0xffff;
        } else {
                $max_uid = $unix_uid;
@@ -1683,6 +1685,8 @@ sub provision($$$$$$$$$)
        $uid_smbget = $max_uid - 8;
        $uid_user1 = $max_uid - 9;
        $uid_user2 = $max_uid - 10;
        $uid_smbget = $max_uid - 8;
        $uid_user1 = $max_uid - 9;
        $uid_user2 = $max_uid - 10;
+       $uid_gooduser = $max_uid - 11;
+       $uid_eviluser = $max_uid - 12;
 
        if ($unix_gids[0] < 0xffff - 8) {
                $max_gid = 0xffff;
 
        if ($unix_gids[0] < 0xffff - 8) {
                $max_gid = 0xffff;
@@ -2313,6 +2317,8 @@ force_user:x:$uid_force_user:$gid_force_user:force user gecos:$prefix_abs:/bin/f
 smbget_user:x:$uid_smbget:$gid_domusers:smbget_user gecos:$prefix_abs:/bin/false
 user1:x:$uid_user1:$gid_nogroup:user1 gecos:$prefix_abs:/bin/false
 user2:x:$uid_user2:$gid_nogroup:user2 gecos:$prefix_abs:/bin/false
 smbget_user:x:$uid_smbget:$gid_domusers:smbget_user gecos:$prefix_abs:/bin/false
 user1:x:$uid_user1:$gid_nogroup:user1 gecos:$prefix_abs:/bin/false
 user2:x:$uid_user2:$gid_nogroup:user2 gecos:$prefix_abs:/bin/false
+gooduser:x:$uid_gooduser:$gid_domusers:gooduser gecos:$prefix_abs:/bin/false
+eviluser:x:$uid_eviluser:$gid_domusers:eviluser gecos::/bin/false
 ";
        if ($unix_uid != 0) {
                print PASSWD "root:x:$uid_root:$gid_root:root gecos:$prefix_abs:/bin/false
 ";
        if ($unix_uid != 0) {
                print PASSWD "root:x:$uid_root:$gid_root:root gecos:$prefix_abs:/bin/false
@@ -2389,6 +2395,8 @@ force_user:x:$gid_force_user:
        createuser($self, "smbget_user", $password, $conffile, \%createuser_env) || die("Unable to create smbget_user");
        createuser($self, "user1", $password, $conffile, \%createuser_env) || die("Unable to create user1");
        createuser($self, "user2", $password, $conffile, \%createuser_env) || die("Unable to create user2");
        createuser($self, "smbget_user", $password, $conffile, \%createuser_env) || die("Unable to create smbget_user");
        createuser($self, "user1", $password, $conffile, \%createuser_env) || die("Unable to create user1");
        createuser($self, "user2", $password, $conffile, \%createuser_env) || die("Unable to create user2");
+       createuser($self, "gooduser", $password, $conffile, \%createuser_env) || die("Unable to create gooduser");
+       createuser($self, "eviluser", $password, $conffile, \%createuser_env) || die("Unable to create eviluser");
 
        open(DNS_UPDATE_LIST, ">$prefix/dns_update_list") or die("Unable to open $$prefix/dns_update_list");
        print DNS_UPDATE_LIST "A $server. $server_ip\n";
 
        open(DNS_UPDATE_LIST, ">$prefix/dns_update_list") or die("Unable to open $$prefix/dns_update_list");
        print DNS_UPDATE_LIST "A $server. $server_ip\n";