summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2017-11-07 12:23:31 +0100
committerKarolin Seeger <kseeger@samba.org>2018-02-20 12:52:17 +0100
commit075f061ca337d516a82b0fb19b001ff8cff61915 (patch)
treef836f86ed557cc0c4f0f8790df766f34b608a088 /source4
parent7d0559e0eb5d533a5f5764a39d04fb05d8d34633 (diff)
downloadsamba-075f061ca337d516a82b0fb19b001ff8cff61915.tar.gz
TODO s4:kdc: msDS-SupportedEncryptionTypes only on computers
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13135
Diffstat (limited to 'source4')
-rw-r--r--source4/kdc/db-glue.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source4/kdc/db-glue.c b/source4/kdc/db-glue.c
index bf55befddf8..2b7b5d6823c 100644
--- a/source4/kdc/db-glue.c
+++ b/source4/kdc/db-glue.c
@@ -288,6 +288,14 @@ static krb5_error_code samba_kdc_message2entry_keys(krb5_context context,
"msDS-SupportedEncryptionTypes",
0);
+ if (userAccountControl & UF_NORMAL_ACCOUNT) {
+ supported_enctypes = 0;
+ }
+ if (supported_enctypes == 0) {
+ /* Otherwise, add in the default enc types */
+ supported_enctypes |= ENC_CRC32 | ENC_RSA_MD5 | ENC_RC4_HMAC_MD5;
+ }
+
if (rid == DOMAIN_RID_KRBTGT || is_rodc) {
/* KDCs (and KDCs on RODCs) use AES */
supported_enctypes |= ENC_HMAC_SHA1_96_AES128 | ENC_HMAC_SHA1_96_AES256;
@@ -308,7 +316,7 @@ static krb5_error_code samba_kdc_message2entry_keys(krb5_context context,
/* If UF_USE_DES_KEY_ONLY has been set, then don't allow use of the newer enc types */
if (userAccountControl & UF_USE_DES_KEY_ONLY) {
supported_enctypes = ENC_CRC32|ENC_RSA_MD5;
- } else {
+ } else if (supported_enctypes == 0) {
/* Otherwise, add in the default enc types */
supported_enctypes |= ENC_CRC32 | ENC_RSA_MD5 | ENC_RC4_HMAC_MD5;
}