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>
Fri, 29 Apr 2016 07:39:29 +0000 (09:39 +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>
(cherry picked from commit 587b5db7979c1ca1055f5bfd81ab79606cd3c2dd)

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 4a6f9764d65af64d7e3e9d70e361f453e1412e72..e43c0b388ffcdd1df1f0d23f190a4d0089344b11 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.