Skip to content

Commit

Permalink
Add more missing DB entry mask flags
Browse files Browse the repository at this point in the history
  • Loading branch information
jrisc committed Aug 1, 2024
1 parent ca77e84 commit 0fd0f4e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/kadmin/dbutil/kdb5_mkey.c
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ update_princ_encryption_1(void *cb, krb5_db_entry *ent)
goto fail;
}

ent->mask |= KADM5_KEY_DATA;
ent->mask |= KADM5_KEY_DATA | KADM5_MKVNO | KADM5_MOD_TIME;

if ((retval = krb5_db_put_principal(util_context, ent))) {
com_err(progname, retval, _("while updating principal '%s' key data "
Expand Down Expand Up @@ -1317,7 +1317,7 @@ kdb5_purge_mkeys(int argc, char *argv[])
goto cleanup_return;
}

master_entry->mask |= KADM5_KEY_DATA | KADM5_TL_DATA;
master_entry->mask |= KADM5_KEY_DATA | KADM5_TL_DATA | KADM5_MOD_TIME;

if ((retval = krb5_db_put_principal(util_context, master_entry))) {
com_err(progname, retval,
Expand Down
4 changes: 4 additions & 0 deletions src/kadmin/dbutil/kdb5_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,10 @@ add_random_key(int argc, char **argv)
exit_status++;
return;
}

dbent->mask |= KADM5_KEY_DATA | KADM5_KVNO | KADM5_ATTRIBUTES |
KADM5_LAST_PWD_CHANGE;

ret = krb5_db_put_principal(util_context, dbent);
krb5_db_free_principal(util_context, dbent);
if (ret) {
Expand Down

0 comments on commit 0fd0f4e

Please sign in to comment.