aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2017-06-26 17:31:37 -0400
committerGreg Hudson <ghudson@mit.edu>2017-07-17 19:39:47 -0400
commitf5f1729930733a2193e9b1663c0b98dbe72d6cb2 (patch)
tree7d3cc43b9ac4edfbe93a44211e9543256e966a80
parent17e970f8c8e9e0d3847fb72112c63a3f93f696e9 (diff)
downloadkrb5-f5f1729930733a2193e9b1663c0b98dbe72d6cb2.zip
krb5-f5f1729930733a2193e9b1663c0b98dbe72d6cb2.tar.gz
krb5-f5f1729930733a2193e9b1663c0b98dbe72d6cb2.tar.bz2
Fix kadm5 setkey operation with LDAP KDB
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. (cherry picked from commit f8ed1bde848a16dfda5c6558ffe4326acc37bc95) ticket: 8589 version_fixed: 1.14.6
-rw-r--r--src/lib/kadm5/srv/svr_principal.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/kadm5/srv/svr_principal.c b/src/lib/kadm5/srv/svr_principal.c
index 87b8c23..51a7c99 100644
--- a/src/lib/kadm5/srv/svr_principal.c
+++ b/src/lib/kadm5/srv/svr_principal.c
@@ -1892,6 +1892,9 @@ kadm5_setv4key_principal(void *server_handle,
/* 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;
@@ -2156,6 +2159,9 @@ kadm5_setkey_principal_3(void *server_handle,
/* 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;