[OpenAFS-devel] small change to openafs k5 support
Nathan Neulinger
nneul@umr.edu
Tue, 25 Mar 2003 13:00:10 -0600
--sdtB3X0nJg68CQEu
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
I'm not 100% certain this is correct, but I needed it in order to handle a converted ticket with a kvno of 0, which
is the case if you are using a different key in the keyfile than in the krb5 kdc.
This patch just cases the kvno to default to zero if not present in the decoded ticket.
-- Nathan
------------------------------------------------------------
Nathan Neulinger EMail: nneul@umr.edu
University of Missouri - Rolla Phone: (573) 341-4841
Computing Services Fax: (573) 341-4216
--sdtB3X0nJg68CQEu
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="k5-afs.diff"
Index: ticket5.c
===================================================================
RCS file: /cvs/openafs/src/rxkad/ticket5.c,v
retrieving revision 1.4
diff -u -r1.4 ticket5.c
--- ticket5.c 23 Dec 2002 23:53:26 -0000 1.4
+++ ticket5.c 25 Mar 2003 18:58:52 -0000
@@ -237,10 +237,12 @@
}
/* Find the real service key version number */
- if (t5.enc_part.kvno == NULL)
- goto bad_ticket;
- v5_serv_kvno = *t5.enc_part.kvno;
-
+ /* If kvno is null, it's probably not included because it was kvno==0 in the ticket */
+ if (t5.enc_part.kvno == NULL ) {
+ v5_serv_kvno = 0;
+ } else {
+ v5_serv_kvno = *t5.enc_part.kvno;
+ }
code = (*get_key)(get_key_rock, v5_serv_kvno, &serv_key);
if (code)
--sdtB3X0nJg68CQEu--