From 2387cfba0a073924280fd555c3df53527d975232 Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Fri, 10 Jun 1994 23:02:32 +0000 Subject: [PATCH] Don't return success in check_padata if you can't extract the key! git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3742 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kdc/do_as_req.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/kdc/do_as_req.c b/src/kdc/do_as_req.c index cf3d143a7..abab6e65f 100644 --- a/src/kdc/do_as_req.c +++ b/src/kdc/do_as_req.c @@ -84,8 +84,9 @@ check_padata (client, src_addr, padata, pa_id, flags) retval = KDB_CONVERT_KEY_OUTOF_DB(enckey,&tmpkey); if (retval) { - syslog( LOG_ERR, "AS_REQ: Unable to Extract Client Key/alt_key\n"); - return(0); + syslog( LOG_ERR, "AS_REQ: Unable to extract client key: %s", + error_message(retval)); + return retval; } retval = krb5_verify_padata(*padata,client->principal,src_addr, &tmpkey, pa_id, flags); @@ -97,9 +98,10 @@ check_padata (client, src_addr, padata, pa_id, flags) */ enckey = &(client->alt_key); /* Extract client key/alt_key from master key */ - if (retval = KDB_CONVERT_KEY_OUTOF_DB(enckey,&tmpkey)){ - syslog( LOG_ERR, "AS_REQ: Unable to Extract Client Key/alt_key\n"); - return(0); + if (retval = KDB_CONVERT_KEY_OUTOF_DB(enckey,&tmpkey)) { + syslog( LOG_ERR, "AS_REQ: Unable to extract client alt_key: %s", + error_message(retval)); + return retval; } retval = krb5_verify_padata(*padata,client->principal,src_addr, &tmpkey, pa_id, flags); -- 2.26.2