From: Noel Power Date: Wed, 4 Dec 2019 15:27:04 +0000 (+0000) Subject: selftest: Create new test env ad_dc_smb1 X-Git-Tag: ldb-2.2.0~1114 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b0ea347c507cac6a9d5462d3e8af3572e55d883a;p=thirdparty%2Fsamba.git selftest: Create new test env ad_dc_smb1 ad_dc_smb1 is a copy of the ad_dc test environment but with the difference that it still supports SMB1, this will allow use to still run SMB1 tests for that env. Signed-off-by: Noel Power Reviewed-by: Ralph Boehme --- diff --git a/selftest/target/Samba.pm b/selftest/target/Samba.pm index f1f283cdea9..3bad7614332 100644 --- a/selftest/target/Samba.pm +++ b/selftest/target/Samba.pm @@ -462,6 +462,7 @@ sub realm_to_ip_mappings 'samba2003.example.com' => 'dc6', 'samba2008r2.example.com' => 'dc7', 'addom.samba.example.com' => 'addc', + 'addom2.samba.example.com' => 'addcsmb1', 'sub.samba.example.com' => 'localsubdc', 'chgdcpassword.samba.example.com' => 'chgdcpass', 'backupdom.samba.example.com' => 'backupfromdc', @@ -549,6 +550,7 @@ sub get_interface($) ctdb1 => 51, ctdb2 => 52, fileserversmb1 => 53, + addcsmb1 => 54, rootdnsforwarder => 64, diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm index a0f8c8d780e..9851049aae7 100755 --- a/selftest/target/Samba4.pm +++ b/selftest/target/Samba4.pm @@ -2105,6 +2105,7 @@ sub check_env($$) dns_hub => [], ad_dc_ntvfs => ["dns_hub"], ad_dc => ["dns_hub"], + ad_dc_smb1 => ["dns_hub"], ad_dc_no_nss => ["dns_hub"], ad_dc_no_ntlm => ["dns_hub"], @@ -2470,15 +2471,26 @@ sub setup_rodc sub setup_ad_dc { - my ($self, $path) = @_; + my ($self, $path, $conf_opts, $server, $dom) = @_; # If we didn't build with ADS, pretend this env was never available if (not $self->{target3}->have_ads()) { return "UNKNOWN"; } - my $env = $self->provision_ad_dc($path, "addc", "ADDOMAIN", - "addom.samba.example.com", "", undef); + if (!defined($conf_opts)) { + $conf_opts = ""; + } + if (!defined($server)) { + $server = "addc"; + } + if (!defined($dom)) { + $dom = "addom.samba.example.com"; + } + my $env = $self->provision_ad_dc($path, $server, "ADDOMAIN", + $dom, + $conf_opts, + undef); unless ($env) { return undef; } @@ -2495,6 +2507,17 @@ sub setup_ad_dc return $env; } +sub setup_ad_dc_smb1 +{ + my ($self, $path) = @_; + my $conf_opts = " +[global] + client min protocol = CORE + server min protocol = LANMAN1 +"; + return setup_ad_dc($self, $path, $conf_opts, "addcsmb1", "addom2.samba.example.com"); +} + sub setup_ad_dc_no_nss { my ($self, $path) = @_;