summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/auth/kerberos/kerberos_util.c8
-rw-r--r--source4/dsdb/samdb/ldb_modules/password_hash.c8
-rw-r--r--source4/include/ads.h5
3 files changed, 9 insertions, 12 deletions
diff --git a/source4/auth/kerberos/kerberos_util.c b/source4/auth/kerberos/kerberos_util.c
index 605ccdc513..113f41a35f 100644
--- a/source4/auth/kerberos/kerberos_util.c
+++ b/source4/auth/kerberos/kerberos_util.c
@@ -181,7 +181,7 @@ krb5_error_code principal_from_credentials(TALLOC_CTX *parent_ctx,
return EINVAL;
}
ret = krb5_keyblock_init(smb_krb5_context->krb5_context,
- ENCTYPE_ARCFOUR_HMAC,
+ ETYPE_ARCFOUR_HMAC_MD5,
mach_pwd->hash, sizeof(mach_pwd->hash),
&keyblock);
@@ -410,7 +410,7 @@ static int create_keytab(TALLOC_CTX *parent_ctx,
return EINVAL;
}
ret = krb5_keyblock_init(smb_krb5_context->krb5_context,
- ENCTYPE_ARCFOUR_HMAC,
+ ETYPE_ARCFOUR_HMAC_MD5,
mach_pwd->hash, sizeof(mach_pwd->hash),
&entry.keyblock);
if (ret) {
@@ -434,7 +434,9 @@ static int create_keytab(TALLOC_CTX *parent_ctx,
return ret;
}
- krb5_enctype_to_string(smb_krb5_context->krb5_context, ENCTYPE_ARCFOUR_HMAC, &enctype_string);
+ krb5_enctype_to_string(smb_krb5_context->krb5_context,
+ ETYPE_ARCFOUR_HMAC_MD5,
+ &enctype_string);
DEBUG(5, ("Added %s(kvno %d) to keytab (%s)\n",
cli_credentials_get_principal(machine_account, mem_ctx),
cli_credentials_get_kvno(machine_account),
diff --git a/source4/dsdb/samdb/ldb_modules/password_hash.c b/source4/dsdb/samdb/ldb_modules/password_hash.c
index 0310fbf9e3..46bafeefc2 100644
--- a/source4/dsdb/samdb/ldb_modules/password_hash.c
+++ b/source4/dsdb/samdb/ldb_modules/password_hash.c
@@ -491,7 +491,7 @@ static int password_hash_handle(struct ldb_module *module, struct ldb_request *r
size_t len;
struct ldb_val val;
- if (keys[i].key.keytype == ENCTYPE_ARCFOUR_HMAC) {
+ if (keys[i].key.keytype == ETYPE_ARCFOUR_HMAC_MD5) {
/* We might end up doing this below:
* This ensures we get the unicode
* conversion right. This should also
@@ -548,9 +548,9 @@ static int password_hash_handle(struct ldb_module *module, struct ldb_request *r
key.salt = NULL; /* No salt for this enc type */
krb5_ret = krb5_keyblock_init(smb_krb5_context->krb5_context,
- ENCTYPE_ARCFOUR_HMAC,
- ntPwdHash->hash, sizeof(ntPwdHash->hash),
- &key.key);
+ ETYPE_ARCFOUR_HMAC_MD5,
+ ntPwdHash->hash, sizeof(ntPwdHash->hash),
+ &key.key);
if (krb5_ret) {
return LDB_ERR_OPERATIONS_ERROR;
}
diff --git a/source4/include/ads.h b/source4/include/ads.h
index cb6570c0e8..f8ccfe3604 100644
--- a/source4/include/ads.h
+++ b/source4/include/ads.h
@@ -197,11 +197,6 @@
/* Kerberos environment variable names */
#define KRB5_ENV_CCNAME "KRB5CCNAME"
-/* Heimdal uses a slightly different name */
-#if defined(HAVE_ENCTYPE_ARCFOUR_HMAC_MD5)
-#define ENCTYPE_ARCFOUR_HMAC ENCTYPE_ARCFOUR_HMAC_MD5
-#endif
-
#define INSTANCE_TYPE_IS_NC_HEAD 0x00000001
#define INSTANCE_TYPE_UNINSTANT 0x00000002
#define INSTANCE_TYPE_WRITE 0x00000004