summaryrefslogtreecommitdiff
path: root/selftest
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2020-03-13 12:39:54 +0100
committerAndreas Schneider <asn@cryptomilk.org>2020-04-08 13:02:39 +0000
commit865670616b56d57f7ecfcfc9bbbd9000f12d3316 (patch)
treee7bfad72ba66d9126d189de64bf1378af98aac15 /selftest
parentab3394f9f5af71ab904617147dc2e24de77ebcec (diff)
downloadsamba-865670616b56d57f7ecfcfc9bbbd9000f12d3316.tar.gz
selftest: Add an ad_dc_fips environment
This is not FIPS ready yet. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
Diffstat (limited to 'selftest')
-rw-r--r--selftest/target/Samba.pm2
-rwxr-xr-xselftest/target/Samba4.pm32
2 files changed, 34 insertions, 0 deletions
diff --git a/selftest/target/Samba.pm b/selftest/target/Samba.pm
index b7b730eced5..f559f6e85fb 100644
--- a/selftest/target/Samba.pm
+++ b/selftest/target/Samba.pm
@@ -472,6 +472,7 @@ sub realm_to_ip_mappings
'prockilldom.samba.example.com' => 'prockilldc',
'proclimit.samba.example.com' => 'proclimitdc',
'samba.example.com' => 'localdc',
+ 'fips.samba.example.com' => 'fipsdc',
);
my @mapping = ();
@@ -552,6 +553,7 @@ sub get_interface($)
fileserversmb1 => 53,
addcsmb1 => 54,
lclnt4dc2smb1 => 55,
+ fipsdc => 56,
rootdnsforwarder => 64,
diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm
index f72609b0f53..46e2d861929 100755
--- a/selftest/target/Samba4.pm
+++ b/selftest/target/Samba4.pm
@@ -2104,6 +2104,7 @@ sub check_env($$)
# name => [dep_1, dep_2, ...],
dns_hub => [],
ad_dc_ntvfs => ["dns_hub"],
+ ad_dc_fips => ["dns_hub"],
ad_dc => ["dns_hub"],
ad_dc_smb1 => ["dns_hub"],
ad_dc_smb1_done => ["ad_dc_smb1"],
@@ -2597,6 +2598,37 @@ sub setup_ad_dc_no_ntlm
return $env;
}
+sub setup_ad_dc_fips
+{
+ my ($self, $path) = @_;
+
+ # 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,
+ "fipsdc",
+ "FIPSDOMAIN",
+ "fips.samba.example.com",
+ "",
+ undef);
+ unless ($env) {
+ return undef;
+ }
+
+ if (not defined($self->check_or_start($env, "prefork"))) {
+ return undef;
+ }
+
+ my $upn_array = ["$env->{REALM}.upn"];
+ my $spn_array = ["$env->{REALM}.spn"];
+
+ $self->setup_namespaces($env, $upn_array, $spn_array);
+
+ return $env;
+}
+
#
# AD DC test environment used solely to test pre-fork process restarts.
# As processes get killed off and restarted it should not be used for other