summaryrefslogtreecommitdiff
path: root/source3/lib/afs.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/afs.c')
-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 */
}