summaryrefslogtreecommitdiffstats
path: root/source/libads
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
commitc0612272e8eea3d741854c0b4834bc687d787218 (patch)
tree1270caef6528063e753a2a5e90220a19440b7f7b /source/libads
parent144d4429d7d91e8597263da6abc8041098f2a4c3 (diff)
downloadsamba-c0612272e8eea3d741854c0b4834bc687d787218.tar.gz
samba-c0612272e8eea3d741854c0b4834bc687d787218.tar.xz
samba-c0612272e8eea3d741854c0b4834bc687d787218.zip
only set UF_USE_DES_KEY_ONLY if we are using krb5 libraries that can't
do type 23
Diffstat (limited to 'source/libads')
-rw-r--r--source/libads/ldap.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source/libads/ldap.c b/source/libads/ldap.c
index 809faa24b3d..d3c8b39e22c 100644
--- a/source/libads/ldap.c
+++ b/source/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)))