selftest: Export TRUST information in the ad_member target environment
authorAndreas Schneider <asn@samba.org>
Mon, 20 Mar 2017 10:39:41 +0000 (11:39 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 16 Mar 2018 12:50:22 +0000 (13:50 +0100)
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

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

index 12452bc420d320a7be82be37df941d1aacb91f17..7b0563dff0c13d6ca338cf6f5c04b3432d3b9174 100755 (executable)
@@ -815,6 +815,39 @@ my @exported_envvars = (
        "TRUST_DOMAIN",
        "TRUST_REALM",
 
+       # stuff related to a trusted domain, on a trust_member
+       # the domain behind a forest trust (two-way)
+       "TRUST_F_BOTH_SERVER",
+       "TRUST_F_BOTH_SERVER_IP",
+       "TRUST_F_BOTH_SERVER_IPV6",
+       "TRUST_F_BOTH_NETBIOSNAME",
+       "TRUST_F_BOTH_USERNAME",
+       "TRUST_F_BOTH_PASSWORD",
+       "TRUST_F_BOTH_DOMAIN",
+       "TRUST_F_BOTH_REALM",
+
+       # stuff related to a trusted domain, on a trust_member
+       # the domain behind an external trust (two-way)
+       "TRUST_E_BOTH_SERVER",
+       "TRUST_E_BOTH_SERVER_IP",
+       "TRUST_E_BOTH_SERVER_IPV6",
+       "TRUST_E_BOTH_NETBIOSNAME",
+       "TRUST_E_BOTH_USERNAME",
+       "TRUST_E_BOTH_PASSWORD",
+       "TRUST_E_BOTH_DOMAIN",
+       "TRUST_E_BOTH_REALM",
+
+       # stuff related to a trusted domain, on a trust_member
+       # the domain behind an external trust (one-way outgoing)
+       "TRUST_E_OUT_SERVER",
+       "TRUST_E_OUT_SERVER_IP",
+       "TRUST_E_OUT_SERVER_IPV6",
+       "TRUST_E_OUT_NETBIOSNAME",
+       "TRUST_E_OUT_USERNAME",
+       "TRUST_E_OUT_PASSWORD",
+       "TRUST_E_OUT_DOMAIN",
+       "TRUST_E_OUT_REALM",
+
        # domain controller stuff
        "DC_SERVER",
        "DC_SERVER_IP",
index e6c95fa991a5b01b849a240dcae37b4748b56e40..ae872b6c40c8c04672d5748970091966bacc1dfb 100755 (executable)
@@ -178,7 +178,7 @@ sub check_env($$)
 
        nt4_member          => ["nt4_dc"],
 
-       ad_member           => ["ad_dc"],
+       ad_member           => ["ad_dc", "fl2008r2dc", "fl2003dc", "fl2000dc"],
        ad_member_rfc2307   => ["ad_dc_ntvfs"],
        ad_member_idmap_rid => ["ad_dc"],
        ad_member_idmap_ad  => ["ad_dc"],
@@ -359,7 +359,7 @@ sub setup_nt4_member
 
 sub setup_ad_member
 {
-       my ($self, $prefix, $dcvars) = @_;
+       my ($self, $prefix, $dcvars, $trustvars_f, $trustvars_e, $trustvars_o) = @_;
 
        my $prefix_abs = abs_path($prefix);
        my @dirs = ();
@@ -477,6 +477,36 @@ sub setup_ad_member
        $ret->{DC_USERNAME} = $dcvars->{USERNAME};
        $ret->{DC_PASSWORD} = $dcvars->{PASSWORD};
 
+       # forest trust
+       $ret->{TRUST_F_BOTH_SERVER} = $trustvars_f->{SERVER};
+       $ret->{TRUST_F_BOTH_SERVER_IP} = $trustvars_f->{SERVER_IP};
+       $ret->{TRUST_F_BOTH_SERVER_IPV6} = $trustvars_f->{SERVER_IPV6};
+       $ret->{TRUST_F_BOTH_NETBIOSNAME} = $trustvars_f->{NETBIOSNAME};
+       $ret->{TRUST_F_BOTH_USERNAME} = $trustvars_f->{USERNAME};
+       $ret->{TRUST_F_BOTH_PASSWORD} = $trustvars_f->{PASSWORD};
+       $ret->{TRUST_F_BOTH_DOMAIN} = $trustvars_f->{DOMAIN};
+       $ret->{TRUST_F_BOTH_REALM} = $trustvars_f->{REALM};
+
+       # external trust
+       $ret->{TRUST_E_BOTH_SERVER} = $trustvars_e->{SERVER};
+       $ret->{TRUST_E_BOTH_SERVER_IP} = $trustvars_e->{SERVER_IP};
+       $ret->{TRUST_E_BOTH_SERVER_IPV6} = $trustvars_e->{SERVER_IPV6};
+       $ret->{TRUST_E_BOTH_NETBIOSNAME} = $trustvars_e->{NETBIOSNAME};
+       $ret->{TRUST_E_BOTH_USERNAME} = $trustvars_e->{USERNAME};
+       $ret->{TRUST_E_BOTH_PASSWORD} = $trustvars_e->{PASSWORD};
+       $ret->{TRUST_E_BOTH_DOMAIN} = $trustvars_e->{DOMAIN};
+       $ret->{TRUST_E_BOTH_REALM} = $trustvars_e->{REALM};
+
+       # external trust, one-way outgoing
+       $ret->{TRUST_E_OUT_SERVER} = $trustvars_o->{SERVER};
+       $ret->{TRUST_E_OUT_SERVER_IP} = $trustvars_o->{SERVER_IP};
+       $ret->{TRUST_E_OUT_SERVER_IPV6} = $trustvars_o->{SERVER_IPV6};
+       $ret->{TRUST_E_OUT_NETBIOSNAME} = $trustvars_o->{NETBIOSNAME};
+       $ret->{TRUST_E_OUT_USERNAME} = $trustvars_o->{USERNAME};
+       $ret->{TRUST_E_OUT_PASSWORD} = $trustvars_o->{PASSWORD};
+       $ret->{TRUST_E_OUT_DOMAIN} = $trustvars_o->{DOMAIN};
+       $ret->{TRUST_E_OUT_REALM} = $trustvars_o->{REALM};
+
        return $ret;
 }