diff options
author | Stefan Metzmacher <metze@samba.org> | 2021-10-05 16:42:00 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2021-10-26 12:00:28 +0000 |
commit | 7fbdc4f0bc4783eac09be6adcda8db986712501f (patch) | |
tree | 5c23e16f56efdb2c050388d8aa521777f063da10 | |
parent | 64880dc2ad2ac44b0a133248d56c6ac2169a4140 (diff) | |
download | samba-7fbdc4f0bc4783eac09be6adcda8db986712501f.tar.gz |
selftest/Samba3: replace (winbindd => "yes", skip_wait => 1) with (winbindd => "offline")
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)
-rwxr-xr-x | selftest/target/Samba3.pm | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm index f781fe7bf57..4ec95e237a7 100755 --- a/selftest/target/Samba3.pm +++ b/selftest/target/Samba3.pm @@ -827,7 +827,7 @@ sub provision_ad_member nmbd => "yes", winbindd => "yes", smbd => "yes")) { - return undef; + return undef; } $ret->{DC_SERVER} = $dcvars->{SERVER}; @@ -1909,7 +1909,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; } @@ -3131,13 +3131,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); |