Make this work with kvno 0 and no kvno

This commit is contained in:
Nicolas Williams
2011-11-11 23:09:26 -06:00
parent 38f726d8b4
commit 124eccf014
2 changed files with 29 additions and 4 deletions

View File

@@ -1194,9 +1194,7 @@ tgs_parse_request(krb5_context context,
krbtgt_kvno = ap_req.ticket.enc_part.kvno ? *ap_req.ticket.enc_part.kvno : 0;
ret = _kdc_db_fetch(context, config, princ, HDB_F_GET_KRBTGT,
&krbtgt_kvno, NULL, krbtgt);
krbtgt_kvno_try = ap_req.ticket.enc_part.kvno ?
*ap_req.ticket.enc_part.kvno :
(*krbtgt)->entry.kvno;
krbtgt_kvno_try = krbtgt_kvno ? krbtgt_kvno : (*krbtgt)->entry.kvno;
if (ret == HDB_ERR_NOT_FOUND_HERE) {
/* XXX Factor out this unparsing of the same princ all over */