summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2002-10-04 07:47:42 +0000
committerAndrew Tridgell <tridge@samba.org>2002-10-04 07:47:42 +0000
commitaadae4f84ab58d1b286dc997dc2dda3b0d4dc7ff (patch)
tree157aed3c25a4963cbe3e2ca518bfc3d62d38e367
parent14f65fb89716959852849745c89c4108eb7bbe36 (diff)
downloadsamba-aadae4f84ab58d1b286dc997dc2dda3b0d4dc7ff.tar.gz
samba-aadae4f84ab58d1b286dc997dc2dda3b0d4dc7ff.tar.bz2
samba-aadae4f84ab58d1b286dc997dc2dda3b0d4dc7ff.zip
only set UF_USE_DES_KEY_ONLY if we are using krb5 libraries that can't
do type 23 (This used to be commit c0612272e8eea3d741854c0b4834bc687d787218)
-rw-r--r--source3/libads/ldap.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c
index 809faa24b3..d3c8b39e22 100644
--- a/source3/libads/ldap.c
+++ b/source3/libads/ldap.c
@@ -1032,6 +1032,7 @@ static ADS_STATUS ads_add_machine_acct(ADS_STRUCT *ads, const char *hostname,
const char *objectClass[] = {"top", "person", "organizationalPerson",
"user", "computer", NULL};
char *servicePrincipalName[3] = {NULL, NULL, NULL};
+ unsigned acct_control;
if (!(ctx = talloc_init_named("machine_account")))
return ADS_ERROR(LDAP_NO_MEMORY);
@@ -1061,9 +1062,12 @@ static ADS_STATUS ads_add_machine_acct(ADS_STRUCT *ads, const char *hostname,
if (!(samAccountName = talloc_asprintf(ctx, "%s$", hostname)))
goto done;
- if (!(controlstr = talloc_asprintf(ctx, "%u",
- UF_DONT_EXPIRE_PASSWD | UF_WORKSTATION_TRUST_ACCOUNT |
- UF_TRUSTED_FOR_DELEGATION | UF_USE_DES_KEY_ONLY)))
+
+ acct_control = UF_WORKSTATION_TRUST_ACCOUNT | UF_DONT_EXPIRE_PASSWD;
+#ifndef ENCTYPE_ARCFOUR_HMAC
+ acct_control |= UF_USE_DES_KEY_ONLY;
+#endif
+ if (!(controlstr = talloc_asprintf(ctx, "%u", acct_control)))
goto done;
if (!(mods = ads_init_mods(ctx)))