]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
selftest: Add an ad_dc_fips environment
authorAndreas Schneider <asn@samba.org>
Fri, 13 Mar 2020 11:39:54 +0000 (12:39 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 8 Apr 2020 13:02:39 +0000 (13:02 +0000)
This is not FIPS ready yet.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
selftest/target/Samba.pm
selftest/target/Samba4.pm

index b7b730eced517f827254d1a9e359433c662b0e6e..f559f6e85fb2fd8165c54e31d0c5719746c4d1d0 100644 (file)
@@ -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,
 
index f72609b0f538cfa98ab19ea231728e4b379efc42..46e2d861929f0b69c31aa127f9ccac753f25fd11 100755 (executable)
@@ -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