From 985c68b8ece908ca820c1a3da0a629d22e78b2ec Mon Sep 17 00:00:00 2001 From: John Kohl Date: Mon, 29 Apr 1991 14:25:58 +0000 Subject: [PATCH] a) set the INITIAL flag on all AS_ tickets b) clean up min() function to be more readable git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2052 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kdc/do_as_req.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/kdc/do_as_req.c b/src/kdc/do_as_req.c index e0a34d757..ce779bec9 100644 --- a/src/kdc/do_as_req.c +++ b/src/kdc/do_as_req.c @@ -160,6 +160,7 @@ krb5_data **response; /* filled in with a response packet */ ticket_reply.enc_part.kvno = server.kvno; enc_tkt_reply.flags = 0; + setflag(enc_tkt_reply.flags, TKT_FLG_INITIAL); /* It should be noted that local policy may affect the */ /* processing of any of these flags. For example, some */ @@ -217,14 +218,14 @@ krb5_data **response; /* filled in with a response packet */ } rtime = (request->rtime == 0) ? kdc_infinity : request->rtime; + /* should we squelch the output renew_till to be no earlier + than the endtime of the ticket? XXX */ if (isflagset(request->kdc_options, KDC_OPT_RENEWABLE)) { setflag(enc_tkt_reply.flags, TKT_FLG_RENEWABLE); enc_tkt_reply.times.renew_till = - min(rtime, min(enc_tkt_reply.times.starttime + - client.max_renewable_life, - min(enc_tkt_reply.times.starttime + - server.max_renewable_life, - enc_tkt_reply.times.starttime + + min(rtime, enc_tkt_reply.times.starttime + + min(client.max_renewable_life, + min(server.max_renewable_life, max_renewable_life_for_realm))); } else enc_tkt_reply.times.renew_till = 0; /* XXX */ -- 2.26.2