]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
selftest/Samba3: replace (winbindd => "yes", skip_wait => 1) with (winbindd => "offline")
authorStefan Metzmacher <metze@samba.org>
Tue, 5 Oct 2021 14:42:00 +0000 (16:42 +0200)
committerStefan Metzmacher <metze@samba.org>
Wed, 27 Oct 2021 22:37:10 +0000 (22:37 +0000)
This is much more flexible and concentrates the logic in a single place.

We'll use winbindd => "offline" in other places soon.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14870
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14881

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 4dc3c68c9a28f71888e3d6dd3b1f0bcdb8fa45de)

selftest/target/Samba3.pm

index 8679a48dd54a3638a79d9cf809a5bde22c598722..8de5fe6a374aa37044c9cb0c5824fd95d40b0e73 100755 (executable)
@@ -789,7 +789,7 @@ sub provision_ad_member
                nmbd => "yes",
                winbindd => "yes",
                smbd => "yes")) {
-               return undef;
+           return undef;
        }
 
        $ret->{DC_SERVER} = $dcvars->{SERVER};
@@ -1874,7 +1874,7 @@ sub check_or_start($$) {
                LOG_FILE => $env_vars->{WINBINDD_TEST_LOG},
                PCAP_FILE => "env-$ENV{ENVNAME}-winbindd",
        };
-       if ($winbindd ne "yes") {
+       if ($winbindd ne "yes" and $winbindd ne "offline") {
                $daemon_ctx->{SKIP_DAEMON} = 1;
        }
 
@@ -3069,13 +3069,17 @@ sub wait_for_start($$$$$)
                }
        }
 
-       if ($winbindd eq "yes") {
+       if ($winbindd eq "yes" or $winbindd eq "offline") {
            print "checking for winbindd\n";
            my $count = 0;
            $cmd = "SELFTEST_WINBINDD_SOCKET_DIR='$envvars->{SELFTEST_WINBINDD_SOCKET_DIR}' ";
            $cmd .= "NSS_WRAPPER_PASSWD='$envvars->{NSS_WRAPPER_PASSWD}' ";
            $cmd .= "NSS_WRAPPER_GROUP='$envvars->{NSS_WRAPPER_GROUP}' ";
-           $cmd .= Samba::bindir_path($self, "wbinfo") . " --ping-dc";
+           if ($winbindd eq "yes") {
+               $cmd .= Samba::bindir_path($self, "wbinfo") . " --ping-dc";
+           } elsif ($winbindd eq "offline") {
+               $cmd .= Samba::bindir_path($self, "wbinfo") . " --ping";
+           }
 
            do {
                $ret = system($cmd);