1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-03 04:22:09 +03:00

r4256: Add a patch from kllin@it.su.se: New Parameter 'afs token lifetime' tells the

AFS client when to throw away a token.

Thanks,

Volker
This commit is contained in:
Volker Lendecke
2004-12-17 11:42:10 +00:00
committed by Gerald (Jerry) Carter
parent 27c16733c1
commit 836a8277b2
2 changed files with 13 additions and 1 deletions

View File

@ -139,7 +139,11 @@ static BOOL afs_createtoken(const char *username, const char *cell,
SIVAL(p, 0, now);
ct->BeginTimestamp = now;
ct->EndTimestamp = now + (255*60*5);
if(lp_afs_token_lifetime() == 0)
ct->EndTimestamp = NEVERDATE;
else
ct->EndTimestamp = now + lp_afs_token_lifetime();
if (((ct->EndTimestamp - ct->BeginTimestamp) & 1) == 1) {
ct->BeginTimestamp += 1; /* Lifetime must be even */
}