According to hearsay the token lifetime should be even if we don't

know the proper ViceId.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1780 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Björn Groenvall
1997-05-26 17:38:24 +00:00
parent b4f396648e
commit dfaeb5c3ea

View File

@@ -318,6 +318,11 @@ k_afsklog_uid(const char *cell, const char *krealm, uid_t uid)
ct.BeginTimestamp = 1 + c.issue_date;
ct.EndTimestamp = krb_life_to_time(c.issue_date, c.lifetime);
#define ODD(x) ((x) & 1)
/* If we don't know the numerical ID lifetime should be even? */
if (uid == 0 && ODD(ct.EndTimestamp - ct.BeginTimestamp))
ct.BeginTimestamp--;
t = buf;
/*
* length of secret token followed by secret token