From: Andrew Bartlett Date: Wed, 10 May 2023 22:38:20 +0000 (+1200) Subject: selftest: Allow provision_ad_dc() to take functional_level as an argument X-Git-Tag: talloc-2.4.1~703 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0252941bb36926c3a235593da4c717bc547104f9;p=thirdparty%2Fsamba.git selftest: Allow provision_ad_dc() to take functional_level as an argument The $$$$$$$ is removed as it does not do what you think it does. Signed-off-by: Andrew Bartlett Reviewed-by: Joseph Sutton --- diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm index bb060503fdb..8f301cae998 100755 --- a/selftest/target/Samba4.pm +++ b/selftest/target/Samba4.pm @@ -1969,7 +1969,7 @@ sub read_config_h($) return \%ret; } -sub provision_ad_dc($$$$$$$) +sub provision_ad_dc() { my ($self, $prefix, @@ -1978,7 +1978,8 @@ sub provision_ad_dc($$$$$$$) $realm, $force_fips_mode, $smbconf_args, - $extra_provision_options) = @_; + $extra_provision_options, + $functional_level) = @_; my $prefix_abs = abs_path($prefix); @@ -1993,6 +1994,10 @@ sub provision_ad_dc($$$$$$$) my $config_h = {}; + if (!defined($functional_level)) { + $functional_level = "2008"; + } + if (defined($ENV{CONFIG_H})) { $config_h = read_config_h($ENV{CONFIG_H}); } @@ -2142,7 +2147,7 @@ sub provision_ad_dc($$$$$$$) $hostname, $domain, $realm, - "2008", + $functional_level, "locDCpass1", undef, undef, @@ -2714,7 +2719,7 @@ sub setup_rodc sub _setup_ad_dc { - my ($self, $path, $conf_opts, $server, $dom) = @_; + my ($self, $path, $conf_opts, $server, $dom, $functional_level) = @_; # If we didn't build with ADS, pretend this env was never available if (not $self->{target3}->have_ads()) { @@ -2734,7 +2739,8 @@ sub _setup_ad_dc $dom, undef, $conf_opts, - undef); + undef, + $functional_level); unless ($env) { return undef; }