selftest: only use the ntvfs server for ad_dc_ntvfs, rpc_proxy, promoted_dc and s4member*
authorStefan Metzmacher <metze@samba.org>
Wed, 10 May 2017 06:49:05 +0000 (08:49 +0200)
committerStefan Metzmacher <metze@samba.org>
Mon, 18 Feb 2019 12:38:18 +0000 (13:38 +0100)
selftest/target/Samba4.pm

index ecbdf3fd22868e48097e9ca488a6b28f6fe82ccc..d5f7544a573745263452a2e437feb9edc9cb19a7 100755 (executable)
@@ -779,8 +779,12 @@ sub provision_raw_step1($$)
        # work out which file server to use. Default to source3 smbd (s3fs),
        # unless the source4 NTVFS (smb) file server has been specified
        my $services = "-smb +s3fs";
+       my $maxprotocol = "default";
+       my $endpoints = "-winreg -srvsvc";
        if ($self->has_option("--use-ntvfs", @{$ctx->{provision_options}})) {
                $services = "+smb -s3fs";
+               $maxprotocol = "SMB2";
+               $endpoints = "+winreg +srvsvc";
        }
 
        print CONFFILE "
@@ -807,7 +811,7 @@ sub provision_raw_step1($$)
        wins support = yes
        server role = $ctx->{server_role}
        server services = +echo $services
-        dcerpc endpoint servers = +winreg +srvsvc
+       dcerpc endpoint servers = $endpoints
        notify:inotify = false
        ldb:nosync = true
        ldap server require strong auth = yes
@@ -833,6 +837,7 @@ sub provision_raw_step1($$)
 
         rpc server port:netlogon = 1026
 
+       server max protocol = $maxprotocol
 ";
 
        print CONFFILE "
@@ -1149,8 +1154,6 @@ sub provision($$$$$$$$$$)
        $msdfs = "yes" if ($server_role eq "domain controller");
        $ctx->{smb_conf_extra_options} = "
 
-       max xmit = 32K
-       server max protocol = SMB2
        host msdfs = $msdfs
        lanman auth = yes
 
@@ -1457,8 +1460,6 @@ sub provision_promoted_dc($$$)
        push (@{$ctx->{provision_options}}, "--use-ntvfs");
 
        $ctx->{smb_conf_extra_options} = "
-       max xmit = 32K
-       server max protocol = SMB2
 
         ntlm auth = ntlmv2-only
 
@@ -1529,11 +1530,7 @@ sub provision_vampire_dc($$$)
                                               $dcvars->{SERVER_IP},
                                               $dcvars->{SERVER_IPV6});
 
-       push (@{$ctx->{provision_options}}, "--use-ntvfs");
-
        $ctx->{smb_conf_extra_options} = "
-       max xmit = 32K
-       server max protocol = SMB2
 
         ntlm auth = mschapv2-and-ntlmv2-only
        $extra_conf
@@ -1557,7 +1554,7 @@ sub provision_vampire_dc($$$)
        my $cmd = $self->get_cmd_env_vars($ret);
        $cmd .= "$samba_tool domain join $ret->{CONFIGURATION} $dcvars->{REALM} DC --realm=$dcvars->{REALM}";
        $cmd .= " -U$dcvars->{DC_USERNAME}\%$dcvars->{DC_PASSWORD} --domain-critical-only";
-       $cmd .= " --machinepass=machine$ret->{PASSWORD} --use-ntvfs";
+       $cmd .= " --machinepass=machine$ret->{PASSWORD}";
        $cmd .= " --backend-store=mdb";
 
        unless (system($cmd) == 0) {
@@ -1587,11 +1584,7 @@ sub provision_subdom_dc($$$)
                                               $dcvars->{PASSWORD},
                                               undef);
 
-       push (@{$ctx->{provision_options}}, "--use-ntvfs");
-
        $ctx->{smb_conf_extra_options} = "
-       max xmit = 32K
-       server max protocol = SMB2
 
 [sysvol]
        path = $ctx->{statedir}/sysvol
@@ -1615,7 +1608,7 @@ sub provision_subdom_dc($$$)
        my $cmd = $self->get_cmd_env_vars($ret);
        $cmd .= "$samba_tool domain join $ret->{CONFIGURATION} $ctx->{dnsname} subdomain ";
        $cmd .= "--parent-domain=$dcvars->{REALM} -U$dcvars->{DC_USERNAME}\@$dcvars->{REALM}\%$dcvars->{DC_PASSWORD}";
-       $cmd .= " --machinepass=machine$ret->{PASSWORD} --use-ntvfs";
+       $cmd .= " --machinepass=machine$ret->{PASSWORD}";
        $cmd .= " --adminpass=$ret->{PASSWORD}";
 
        unless (system($cmd) == 0) {
@@ -1640,7 +1633,6 @@ sub provision_ad_dc_ntvfs($$)
 
        print "PROVISIONING AD DC (NTVFS)...\n";
         my $extra_conf_options = "netbios aliases = localDC1-a
-        server services = +winbind -winbindd
        ldap server require strong auth = allow_sasl_over_tls
        allow nt4 crypto = yes
        raw NTLMv2 auth = yes
@@ -1651,6 +1643,7 @@ sub provision_ad_dc_ntvfs($$)
        dsdb password event notification = true
        dsdb group change notification = true
        server schannel = auto
+       max xmit = 32K
        ";
        my $extra_provision_options = ["--use-ntvfs"];
        my $ret = $self->provision($prefix,
@@ -1689,7 +1682,7 @@ sub provision_fl2000dc($$)
        ntlmssp_server:force_old_spnego=yes
        server max protocol = NT1
 ";
-       my $extra_provision_options = ["--use-ntvfs"];
+       my $extra_provision_options = undef;
        # This environment uses plain text secrets
        # i.e. secret attributes are not encrypted on disk.
        # This allows testing of the --plaintext-secrets option for
@@ -1733,7 +1726,7 @@ sub provision_fl2003dc($$$)
        dns forwarder = 127.0.0.$swiface1 127.0.0.$swiface2
        server max protocol = SMB2_02
        ";
-       my $extra_provision_options = ["--use-ntvfs"];
+       my $extra_provision_options = undef;
        my $ret = $self->provision($prefix,
                                   "domain controller",
                                   "dc6",
@@ -1786,7 +1779,7 @@ sub provision_fl2008r2dc($$$)
        ldap server require strong auth = no
        server max protocol = SMB2_10
        ";
-       my $extra_provision_options = ["--use-ntvfs"];
+       my $extra_provision_options = undef;
        my $ret = $self->provision($prefix,
                                   "domain controller",
                                   "dc7",
@@ -1832,14 +1825,10 @@ sub provision_rodc($$$)
                return undef;
        }
 
-       push (@{$ctx->{provision_options}}, "--use-ntvfs");
-
        $ctx->{share} = "$ctx->{prefix_abs}/share";
        push(@{$ctx->{directories}}, "$ctx->{share}");
 
        $ctx->{smb_conf_extra_options} = "
-       max xmit = 32K
-       server max protocol = SMB2
        password server = $dcvars->{DC_SERVER}
 
 [sysvol]
@@ -1868,7 +1857,7 @@ sub provision_rodc($$$)
        my $cmd = $self->get_cmd_env_vars($ret);
        $cmd .= "$samba_tool domain join $ret->{CONFIGURATION} $dcvars->{REALM} RODC";
        $cmd .= " -U$dcvars->{DC_USERNAME}\%$dcvars->{DC_PASSWORD}";
-       $cmd .= " --server=$dcvars->{DC_SERVER} --use-ntvfs";
+       $cmd .= " --server=$dcvars->{DC_SERVER}";
 
        unless (system($cmd) == 0) {
                warn("RODC join failed\n$cmd");
@@ -1962,7 +1951,6 @@ sub provision_ad_dc($$$$$$)
        printing = bsd
        printcap name = /dev/null
 
-       max protocol = SMB3
        read only = no
 
        smbd:sharedelay = 100000
@@ -1971,8 +1959,6 @@ sub provision_ad_dc($$$$$$)
        dos filemode = yes
        check parent directory delete on close = yes
 
-        dcerpc endpoint servers = -winreg -srvsvc
-
        printcap name = /dev/null
 
        addprinter command = $ENV{SRCDIR_ABS}/source3/script/tests/printing/modprinter.pl -a -s $conffile --
@@ -2075,7 +2061,7 @@ sub provision_chgdcpass($$)
        allow dcerpc auth level connect:lsarpc = yes
        dcesrv:max auth states = 8
 ";
-       my $extra_provision_options = ["--use-ntvfs"];
+       my $extra_provision_options = undef;
        push (@{$extra_provision_options}, "--dns-backend=BIND9_DLZ");
        my $ret = $self->provision($prefix,
                                   "domain controller",
@@ -2904,8 +2890,6 @@ sub prepare_dc_testenv
 
        $ctx->{smb_conf_extra_options} = "
        $conf_options
-       max xmit = 32K
-       server max protocol = SMB2
        samba kcc command = /bin/true
        xattr_tdb:file = $ctx->{statedir}/xattr.tdb