svn rev #22230: branches/krb5-1-7/src/kdc/
tlyu@MIT.EDU
tlyu at MIT.EDU
Tue Apr 14 17:07:50 EDT 2009
http://src.mit.edu/fisheye/changelog/krb5/?cs=22230
Commit By: tlyu
Log Message:
ticket: 6464
tags: pullup
target_version: 1.7
version_fixed: 1.7
subject: verify return code from krb5_db_set_mkey_list
pull up r22100 from trunk
------------------------------------------------------------------------
r22100 | tsitkova | 2009-03-16 14:00:06 -0400 (Mon, 16 Mar 2009) | 2 lines
Changed paths:
M /trunk/src/kdc/kdc_util.c
M /trunk/src/kdc/main.c
Verify return code from krb5_db_set_mkey_list.
Changed Files:
U branches/krb5-1-7/src/kdc/kdc_util.c
U branches/krb5-1-7/src/kdc/main.c
Modified: branches/krb5-1-7/src/kdc/kdc_util.c
===================================================================
--- branches/krb5-1-7/src/kdc/kdc_util.c 2009-04-14 21:07:46 UTC (rev 22229)
+++ branches/krb5-1-7/src/kdc/kdc_util.c 2009-04-14 21:07:49 UTC (rev 22230)
@@ -456,7 +456,9 @@
&master_keyblock, 0, &tmp_mkey_list) == 0) {
krb5_dbe_free_key_list(kdc_context, master_keylist);
master_keylist = tmp_mkey_list;
- krb5_db_set_mkey_list(kdc_context, master_keylist);
+ retval = krb5_db_set_mkey_list(kdc_context, master_keylist);
+ if (retval)
+ goto errout;
if ((retval = krb5_dbe_find_mkey(kdc_context, master_keylist,
server, &mkey_ptr))) {
goto errout;
@@ -471,10 +473,10 @@
-1, (krb5_int32)ticket->enc_part.kvno,
&server_key);
if (retval)
- goto errout;
+ goto errout;
if (!server_key) {
- retval = KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN;
- goto errout;
+ retval = KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN;
+ goto errout;
}
if ((*key = (krb5_keyblock *)malloc(sizeof **key))) {
retval = krb5_dbekd_decrypt_key_data(kdc_context, mkey_ptr,
Modified: branches/krb5-1-7/src/kdc/main.c
===================================================================
--- branches/krb5-1-7/src/kdc/main.c 2009-04-14 21:07:46 UTC (rev 22229)
+++ branches/krb5-1-7/src/kdc/main.c 2009-04-14 21:07:49 UTC (rev 22230)
@@ -444,7 +444,12 @@
"while setting master key for realm %s", realm);
goto whoops;
}
- krb5_db_set_mkey_list(rdp->realm_context, rdp->mkey_list);
+ kret = krb5_db_set_mkey_list(rdp->realm_context, rdp->mkey_list);
+ if (kret) {
+ kdc_err(rdp->realm_context, kret,
+ "while setting master key list for realm %s", realm);
+ goto whoops;
+ }
/* Set up the keytab */
if ((kret = krb5_ktkdb_resolve(rdp->realm_context, NULL,
More information about the cvs-krb5
mailing list