selftest:Samba4: let fl2000dc use Windows2000 supported_enctypes
authorStefan Metzmacher <metze@samba.org>
Tue, 26 Apr 2016 23:00:14 +0000 (01:00 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 28 Apr 2016 14:51:17 +0000 (16:51 +0200)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11849

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
selftest/target/Samba.pm
selftest/target/Samba4.pm

index 6ca10361f53e1d2d0cce6ab0c781135c4332cdc6..17a2bbe5f9b579e22b9d7ca6dd5799d73278a7b2 100644 (file)
@@ -200,6 +200,19 @@ sub mk_krb5_conf($$)
  forwardable = yes
  allow_weak_crypto = yes
 
+";
+
+        if (defined($ctx->{supported_enctypes})) {
+               print KRB5CONF "
+ default_etypes = $ctx->{supported_enctypes}
+ default_as_etypes = $ctx->{supported_enctypes}
+ default_tgs_enctypes = $ctx->{supported_enctypes}
+ default_tkt_enctypes = $ctx->{supported_enctypes}
+ permitted_enctypes = $ctx->{supported_enctypes}
+";
+       }
+
+       print KRB5CONF "
 [realms]
  $our_realms_stanza
 ";
index 0ac386c0b07156fc6f935d6b7b1e8f38a0906bf3..7bd4cada371bd7ed3b53817bb5974fe0d210e9c2 100755 (executable)
@@ -386,6 +386,9 @@ sub provision_raw_prepare($$$$$$$$$$$)
        $ctx->{password} = $password;
        $ctx->{kdc_ipv4} = $kdc_ipv4;
        $ctx->{kdc_ipv6} = $kdc_ipv6;
+       if ($functional_level eq "2000") {
+               $ctx->{supported_enctypes} = "arcfour-hmac-md5 des-cbc-md5 des-cbc-crc"
+       }
 
 #
 # Set smbd log level here.