1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

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
This commit is contained in:
Andrew Tridgell 2010-11-30 09:56:30 +11:00 committed by Andrew Bartlett
parent 1286f53455
commit 47e8cbe3d6

View File

@ -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) {