]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
selftest/Samba4: split out _setup_ad_dc()
authorStefan Metzmacher <metze@samba.org>
Fri, 3 Jul 2020 20:23:20 +0000 (22:23 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 7 Jul 2020 10:30:39 +0000 (10:30 +0000)
setup_ad_dc() was used for more than 'ad_dc'.
Setting up 'ad_dc' means not all missing arguments are
passed as undef.

The following had no effect

        if (!defined($conf_opts)) {
                $conf_opts = "";
        }

and $conf_opts results in a string of 'HASH(....)'

So we better pass explicit undef arguments from setup_ad_dc() to
_setup_ad_dc() now.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
selftest/target/Samba4.pm

index 34dd0ee798d5472a42f812fd63a68d76466fd870..1466cbd8d48ab7840b0ddd6446ac87bdb465eb3e 100755 (executable)
@@ -2568,7 +2568,7 @@ sub setup_rodc
        return $env;
 }
 
-sub setup_ad_dc
+sub _setup_ad_dc
 {
        my ($self, $path, $conf_opts, $server, $dom) = @_;
 
@@ -2607,6 +2607,12 @@ sub setup_ad_dc
        return $env;
 }
 
+sub setup_ad_dc
+{
+       my ($self, $path) = @_;
+       return _setup_ad_dc($self, $path, undef, undef, undef);
+}
+
 sub setup_ad_dc_smb1
 {
        my ($self, $path) = @_;
@@ -2615,7 +2621,7 @@ sub setup_ad_dc_smb1
        client min protocol = CORE
        server min protocol = LANMAN1
 ";
-       return setup_ad_dc($self, $path, $conf_opts, "addcsmb1", "addom2.samba.example.com");
+       return _setup_ad_dc($self, $path, $conf_opts, "addcsmb1", "addom2.samba.example.com");
 }
 
 sub setup_ad_dc_smb1_done