aboutsummaryrefslogtreecommitdiff
path: root/crypto/heimdal/lib/kadm5/chpass_s.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/heimdal/lib/kadm5/chpass_s.c')
-rw-r--r--crypto/heimdal/lib/kadm5/chpass_s.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/crypto/heimdal/lib/kadm5/chpass_s.c b/crypto/heimdal/lib/kadm5/chpass_s.c
index 624293e5c3a3..22f65517fcc5 100644
--- a/crypto/heimdal/lib/kadm5/chpass_s.c
+++ b/crypto/heimdal/lib/kadm5/chpass_s.c
@@ -58,6 +58,10 @@ change(void *server_handle,
if(ret)
goto out;
+ ret = hdb_add_current_keys_to_history(context->context, &ent.entry);
+ if (ret)
+ goto out;
+
if (context->db->hdb_capability_flags & HDB_CAP_F_HANDLE_PASSWORDS) {
ret = context->db->hdb_password(context->context, context->db,
&ent, password, cond);
@@ -170,6 +174,9 @@ kadm5_s_chpass_principal_with_key(void *server_handle,
HDB_F_GET_ANY|HDB_F_ADMIN_DATA, &ent);
if(ret)
goto out;
+ ret = hdb_add_current_keys_to_history(context->context, &ent.entry);
+ if (ret)
+ goto out2;
ret = _kadm5_set_keys2(context, &ent.entry, n_key_data, key_data);
if(ret)
goto out2;