summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2004-12-17 11:42:10 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:53:40 -0500
commitc96872d3ab895ccf122f077a54104542cb3f772b (patch)
tree42fc058fb76430f012f46a200411ec476247eb21 /source3/lib
parent35657ac39e27d6b8268430015c2750a3c8c1ce1e (diff)
downloadsamba-c96872d3ab895ccf122f077a54104542cb3f772b.tar.gz
samba-c96872d3ab895ccf122f077a54104542cb3f772b.tar.bz2
samba-c96872d3ab895ccf122f077a54104542cb3f772b.zip
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 used to be commit 836a8277b2281bcdb6eab8339b05bec61b49eb74)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/afs.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/lib/afs.c b/source3/lib/afs.c
index d3921ab9be..5ff027ee01 100644
--- a/source3/lib/afs.c
+++ b/source3/lib/afs.c
@@ -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 */
}