]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
selftest: Create new test env ad_dc_smb1
authorNoel Power <noel.power@suse.com>
Wed, 4 Dec 2019 15:27:04 +0000 (15:27 +0000)
committerRalph Boehme <slow@samba.org>
Fri, 3 Apr 2020 15:08:26 +0000 (15:08 +0000)
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 <npower@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
selftest/target/Samba.pm
selftest/target/Samba4.pm

index f1f283cdea9fb1ba9e04efa46594bd173fee0a46..3bad76143329bae926e50999b9cb86c94bc32639 100644 (file)
@@ -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,
 
index a0f8c8d780e6d8541513a573e7d38d3f1e52b5b9..9851049aae7fcc6e398f0b5f2cb5671e142ec9eb 100755 (executable)
@@ -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) = @_;