Add mask assignments to kadm5_setv4key_principal() and
kadm5_setkey_principal_4() so that their changes to the principal are
properly written to KDB modules which use the mask flag, such as the
LDAP KDB module. Reported by Frank Lonigro.
ticket: 8589
target_version: 1.15-next
target_version: 1.14-next
tags: pullup
/* unlock principal on this KDC */
kdb->fail_auth_count = 0;
+ /* key data changed, let the database provider know */
+ kdb->mask = KADM5_KEY_DATA | KADM5_FAIL_AUTH_COUNT;
+
if ((ret = kdb_put_entry(handle, kdb, &adb)))
goto done;
/* Unlock principal on this KDC. */
kdb->fail_auth_count = 0;
+ /* key data changed, let the database provider know */
+ kdb->mask = KADM5_KEY_DATA | KADM5_FAIL_AUTH_COUNT;
+
ret = kdb_put_entry(handle, kdb, &adb);
if (ret)
goto done;