diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-11-30 09:56:30 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2010-12-01 00:59:59 +0100 |
commit | 47e8cbe3d630bef40e2564963177e08b65102aff (patch) | |
tree | 73c896e6903251779458abe80a3bd28ff9b52787 /source4 | |
parent | 1286f5345515bec5295497b1370db830262c3890 (diff) | |
download | samba-47e8cbe3d630bef40e2564963177e08b65102aff.tar.gz samba-47e8cbe3d630bef40e2564963177e08b65102aff.tar.bz2 samba-47e8cbe3d630bef40e2564963177e08b65102aff.zip |
heimdal: fix for w2000 from lha
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Dec 1 00:59:59 CET 2010 on sn-devel-104
Diffstat (limited to 'source4')
-rw-r--r-- | source4/heimdal/lib/krb5/get_cred.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/source4/heimdal/lib/krb5/get_cred.c b/source4/heimdal/lib/krb5/get_cred.c index 9e06770e64..901182192d 100644 --- a/source4/heimdal/lib/krb5/get_cred.c +++ b/source4/heimdal/lib/krb5/get_cred.c @@ -323,10 +323,11 @@ static krb5_error_code KRB5_CALLCONV decrypt_tkt_with_subkey (krb5_context context, krb5_keyblock *key, krb5_key_usage usage, - krb5_const_pointer subkey, + krb5_const_pointer skey, krb5_kdc_rep *dec_rep) { - krb5_error_code ret; + const krb5_keyblock *subkey = skey; + krb5_error_code ret = 0; krb5_data data; size_t size; krb5_crypto crypto; @@ -345,6 +346,17 @@ decrypt_tkt_with_subkey (krb5_context context, KRB5_KU_TGS_REP_ENC_PART_SUB_KEY, &dec_rep->kdc_rep.enc_part, &data); + /* + * If the is Windows 2000 DC, we need to retry with key usage + * 8 when doing ARCFOUR. + */ + if (ret && subkey->keytype == ETYPE_ARCFOUR_HMAC_MD5) { + ret = krb5_decrypt_EncryptedData(context, + crypto, + 8, + &dec_rep->kdc_rep.enc_part, + &data); + } krb5_crypto_destroy(context, crypto); } if (subkey == NULL || ret) { |