From c7586cc94818ff865ca9a057d32c0fb40a7c3688 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Mon, 5 Sep 2011 01:58:48 +0000 Subject: [PATCH] Instead of passing a 0 to add_new_mkey for kvno and leaving new_mkey_kvno (used when stashing) uninitialized, use get_next_kvno to set the latter to the only non-zero value that add_new_mkey will accept. ticket: 6617 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25148 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kadmin/dbutil/kdb5_mkey.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/kadmin/dbutil/kdb5_mkey.c b/src/kadmin/dbutil/kdb5_mkey.c index e5da1927e..395299410 100644 --- a/src/kadmin/dbutil/kdb5_mkey.c +++ b/src/kadmin/dbutil/kdb5_mkey.c @@ -299,7 +299,9 @@ kdb5_add_mkey(int argc, char *argv[]) goto cleanup_return; } - retval = add_new_mkey(util_context, master_entry, &new_mkeyblock, 0); + new_mkey_kvno = get_next_kvno(util_context, master_entry); + retval = add_new_mkey(util_context, master_entry, &new_mkeyblock, + new_mkey_kvno); if (retval) { com_err(progname, retval, _("adding new master key to master principal")); -- 2.26.2