(as_rep): be careful as to now overflowing when calculating the end of

lifetime of a ticket.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8566 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
2000-07-06 22:43:04 +00:00
parent 081ad8ccd6
commit 2068afa985

View File

@@ -742,10 +742,13 @@ as_rep(KDC_REQ *req,
}
fix_time(&b->till);
t = *b->till;
/* be careful not overflowing */
if(client->max_life)
t = min(t, start + *client->max_life);
t = start + min(t - start, *client->max_life);
if(server->max_life)
t = min(t, start + *server->max_life);
t = start + min(t - start, *server->max_life);
#if 0
t = min(t, start + realm->max_life);
#endif
@@ -764,9 +767,9 @@ as_rep(KDC_REQ *req,
if(t == 0)
t = MAX_TIME;
if(client->max_renew)
t = min(t, start + *client->max_renew);
t = start + min(t - start, *client->max_renew);
if(server->max_renew)
t = min(t, start + *server->max_renew);
t = start + min(t - start, *client->max_renew);
#if 0
t = min(t, start + realm->max_renew);
#endif