summaryrefslogtreecommitdiff
path: root/selftest/target/Samba3.pm
diff options
context:
space:
mode:
Diffstat (limited to 'selftest/target/Samba3.pm')
-rwxr-xr-xselftest/target/Samba3.pm25
1 files changed, 25 insertions, 0 deletions
diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index 70c320bc0e..e8a03e71dc 100755
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -11,6 +11,21 @@ use FindBin qw($RealBin);
use POSIX;
use target::Samba;
+sub have_ads($) {
+ my ($self);
+ my $found_ads = 0;
+ my $smbd_build_options = Samba::bindir_path($self, "smbd") . " -b";
+ my @build_options = `$smbd_build_options`;
+ foreach my $option (@build_options) {
+ if ($option =~ "WITH_ADS") {
+ $found_ads = 1;
+ }
+ }
+
+ # If we were not built with ADS support, pretend we were never even available
+ return $found_ads;
+}
+
sub new($$) {
my ($classname, $bindir, $binary_mapping, $srcdir, $server_maxtime) = @_;
my $self = { vars => {},
@@ -206,6 +221,11 @@ sub setup_admember($$$$)
{
my ($self, $prefix, $dcvars, $iface) = @_;
+ # If we didn't build with ADS, pretend this env was never available
+ if (not $self->have_ads()) {
+ return "UNKNOWN";
+ }
+
print "PROVISIONING S3 AD MEMBER$iface...";
my $member_options = "
@@ -414,6 +434,11 @@ sub setup_ktest($$$)
{
my ($self, $prefix) = @_;
+ # If we didn't build with ADS, pretend this env was never available
+ if (not $self->have_ads()) {
+ return "UNKNOWN";
+ }
+
print "PROVISIONING server with security=ads...";
my $ktest_options = "