summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/auth/kerberos/kerberos.h1
-rw-r--r--source4/auth/kerberos/kerberos_util.c19
-rw-r--r--source4/kdc/db-glue.c21
3 files changed, 21 insertions, 20 deletions
diff --git a/source4/auth/kerberos/kerberos.h b/source4/auth/kerberos/kerberos.h
index b5d655a058..c57b13eb15 100644
--- a/source4/auth/kerberos/kerberos.h
+++ b/source4/auth/kerberos/kerberos.h
@@ -116,7 +116,6 @@ NTSTATUS kerberos_pac_logon_info(TALLOC_CTX *mem_ctx,
struct loadparm_context;
struct ldb_message;
struct ldb_context;
-uint32_t kerberos_enctype_to_bitmap(krb5_enctype enc_type_enum);
krb5_error_code smb_krb5_update_keytab(TALLOC_CTX *parent_ctx,
struct smb_krb5_context *smb_krb5_context,
struct ldb_context *ldb,
diff --git a/source4/auth/kerberos/kerberos_util.c b/source4/auth/kerberos/kerberos_util.c
index 4798df0ee9..f38bc17212 100644
--- a/source4/auth/kerberos/kerberos_util.c
+++ b/source4/auth/kerberos/kerberos_util.c
@@ -347,22 +347,3 @@ krb5_error_code smb_krb5_get_keytab_container(TALLOC_CTX *mem_ctx,
return 0;
}
-
-/* Translate between the IETF encryption type values and the Microsoft msDS-SupportedEncryptionTypes values */
-uint32_t kerberos_enctype_to_bitmap(krb5_enctype enc_type_enum)
-{
- switch (enc_type_enum) {
- case ENCTYPE_DES_CBC_CRC:
- return ENC_CRC32;
- case ENCTYPE_DES_CBC_MD5:
- return ENC_RSA_MD5;
- case ENCTYPE_ARCFOUR_HMAC_MD5:
- return ENC_RC4_HMAC_MD5;
- case ENCTYPE_AES128_CTS_HMAC_SHA1_96:
- return ENC_HMAC_SHA1_96_AES128;
- case ENCTYPE_AES256_CTS_HMAC_SHA1_96:
- return ENC_HMAC_SHA1_96_AES256;
- default:
- return 0;
- }
-}
diff --git a/source4/kdc/db-glue.c b/source4/kdc/db-glue.c
index 77c84303a5..95a524d605 100644
--- a/source4/kdc/db-glue.c
+++ b/source4/kdc/db-glue.c
@@ -67,6 +67,27 @@ static const char *trust_attrs[] = {
NULL
};
+
+/* Translate between the IETF encryption type values and the Microsoft
+ * msDS-SupportedEncryptionTypes values */
+static uint32_t kerberos_enctype_to_bitmap(krb5_enctype enc_type_enum)
+{
+ switch (enc_type_enum) {
+ case ENCTYPE_DES_CBC_CRC:
+ return ENC_CRC32;
+ case ENCTYPE_DES_CBC_MD5:
+ return ENC_RSA_MD5;
+ case ENCTYPE_ARCFOUR_HMAC_MD5:
+ return ENC_RC4_HMAC_MD5;
+ case ENCTYPE_AES128_CTS_HMAC_SHA1_96:
+ return ENC_HMAC_SHA1_96_AES128;
+ case ENCTYPE_AES256_CTS_HMAC_SHA1_96:
+ return ENC_HMAC_SHA1_96_AES256;
+ default:
+ return 0;
+ }
+}
+
static KerberosTime ldb_msg_find_krb5time_ldap_time(struct ldb_message *msg, const char *attr, KerberosTime default_val)
{
const char *tmp;