only add krb5EncryptionType for already existing entries or heidmal entries
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15938 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -666,7 +666,13 @@ LDAP_entry2mods(krb5_context context, HDB * db, hdb_entry * ent,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ent->etypes) {
|
if (ent->etypes) {
|
||||||
/* clobber and replace encryption types. */
|
int add_krb5EncryptionType = 0;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Only add/modify krb5EncryptionType if its a new heimdal
|
||||||
|
* entry or krb5EncryptionType already exists on the entry.
|
||||||
|
*/
|
||||||
|
|
||||||
if (!is_new_entry) {
|
if (!is_new_entry) {
|
||||||
values = ldap_get_values(HDB2LDAP(db), msg, "krb5EncryptionType");
|
values = ldap_get_values(HDB2LDAP(db), msg, "krb5EncryptionType");
|
||||||
if (values) {
|
if (values) {
|
||||||
@@ -675,19 +681,24 @@ LDAP_entry2mods(krb5_context context, HDB * db, hdb_entry * ent,
|
|||||||
NULL);
|
NULL);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out;
|
goto out;
|
||||||
|
add_krb5EncryptionType = 1;
|
||||||
}
|
}
|
||||||
}
|
} else if (is_heimdal_entry)
|
||||||
for (i = 0; i < ent->etypes->len; i++) {
|
add_krb5EncryptionType = 1;
|
||||||
if (is_samba_account &&
|
|
||||||
ent->keys.val[i].key.keytype == ETYPE_ARCFOUR_HMAC_MD5)
|
if (add_krb5EncryptionType) {
|
||||||
{
|
for (i = 0; i < ent->etypes->len; i++) {
|
||||||
;
|
if (is_samba_account &&
|
||||||
} else if (is_heimdal_entry) {
|
ent->keys.val[i].key.keytype == ETYPE_ARCFOUR_HMAC_MD5)
|
||||||
ret = LDAP_addmod_integer(context, &mods, LDAP_MOD_ADD,
|
{
|
||||||
"krb5EncryptionType",
|
;
|
||||||
ent->etypes->val[i]);
|
} else if (is_heimdal_entry) {
|
||||||
if (ret)
|
ret = LDAP_addmod_integer(context, &mods, LDAP_MOD_ADD,
|
||||||
goto out;
|
"krb5EncryptionType",
|
||||||
|
ent->etypes->val[i]);
|
||||||
|
if (ret)
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user