s3-selftest: include addprinter/deleteprinter command.
[abartlet/samba.git/.git] / selftest / target / Samba3.pm
index 95d2a8253ffcaf3e0a8bf4603807ec2cfe3775c1..c3f696a99db214687fda55b6742d2d8ff0fc1511 100644 (file)
@@ -228,6 +228,7 @@ sub check_or_start($$$$$) {
 
                $ENV{NSS_WRAPPER_PASSWD} = $env_vars->{NSS_WRAPPER_PASSWD};
                $ENV{NSS_WRAPPER_GROUP} = $env_vars->{NSS_WRAPPER_GROUP};
+               $ENV{NSS_WRAPPER_WINBIND_SO_PATH} = $env_vars->{NSS_WRAPPER_WINBIND_SO_PATH};
 
                if ($nmbd ne "yes") {
                        $SIG{USR1} = $SIG{ALRM} = $SIG{INT} = $SIG{QUIT} = $SIG{TERM} = sub {
@@ -269,6 +270,7 @@ sub check_or_start($$$$$) {
 
                $ENV{NSS_WRAPPER_PASSWD} = $env_vars->{NSS_WRAPPER_PASSWD};
                $ENV{NSS_WRAPPER_GROUP} = $env_vars->{NSS_WRAPPER_GROUP};
+               $ENV{NSS_WRAPPER_WINBIND_SO_PATH} = $env_vars->{NSS_WRAPPER_WINBIND_SO_PATH};
 
                if ($winbindd ne "yes") {
                        $SIG{USR1} = $SIG{ALRM} = $SIG{INT} = $SIG{QUIT} = $SIG{TERM} = sub {
@@ -310,6 +312,7 @@ sub check_or_start($$$$$) {
 
                $ENV{NSS_WRAPPER_PASSWD} = $env_vars->{NSS_WRAPPER_PASSWD};
                $ENV{NSS_WRAPPER_GROUP} = $env_vars->{NSS_WRAPPER_GROUP};
+               $ENV{NSS_WRAPPER_WINBIND_SO_PATH} = $env_vars->{NSS_WRAPPER_WINBIND_SO_PATH};
 
                if ($smbd ne "yes") {
                        $SIG{USR1} = $SIG{ALRM} = $SIG{INT} = $SIG{QUIT} = $SIG{TERM} = sub {
@@ -433,6 +436,8 @@ sub provision($$$$$$)
        my $nss_wrapper_passwd = "$privatedir/passwd";
        my $nss_wrapper_group = "$privatedir/group";
 
+       my $mod_printer_pl = "$ENV{PERL} $RealBin/../source3/script/tests/printing/modprinter.pl";
+
        open(CONF, ">$conffile") or die("Unable to open $conffile");
        print CONF "
 [global]
@@ -466,6 +471,9 @@ sub provision($$$$$$)
        delete group script =           $nss_wrapper_pl --group_path  $nss_wrapper_group  --type group  --action delete --name %g
        delete user from group script = $nss_wrapper_pl --passwd_path $nss_wrapper_passwd --type member --action delete --member %u --name %g --group_path $nss_wrapper_group
 
+       addprinter command =            $mod_printer_pl -a -s $conffile --
+       deleteprinter command =         $mod_printer_pl -d -s $conffile --
+
        kernel oplocks = no
        kernel change notify = no
 
@@ -476,6 +484,8 @@ sub provision($$$$$$)
        winbindd:socket dir = $wbsockdir
        idmap uid = 100000-200000
        idmap gid = 100000-200000
+       winbind enum users = yes
+       winbind enum groups = yes
 
 #      min receivefile size = 4000
 
@@ -542,6 +552,7 @@ $unix_name:x:$unix_uid:$unix_gids[0]:$unix_name gecos:$prefix_abs:/bin/false
        open(GROUP, ">$nss_wrapper_group") or die("Unable to open $nss_wrapper_group");
        print GROUP "nobody:x:65533:
 nogroup:x:65534:nobody
+root:x:65532:
 $unix_name-group:x:$unix_gids[0]:
 ";
        close(GROUP);
@@ -578,6 +589,7 @@ $unix_name-group:x:$unix_gids[0]:
        $ret{SOCKET_WRAPPER_DEFAULT_IFACE} = $swiface;
        $ret{NSS_WRAPPER_PASSWD} = $nss_wrapper_passwd;
        $ret{NSS_WRAPPER_GROUP} = $nss_wrapper_group;
+       $ret{NSS_WRAPPER_WINBIND_SO_PATH} = $ENV{NSS_WRAPPER_WINBIND_SO_PATH};
 
        return \%ret;
 }