aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Yu <tlyu@mit.edu>2001-01-30 02:58:43 +0000
committerTom Yu <tlyu@mit.edu>2001-01-30 02:58:43 +0000
commitcca76f6112f1ad6918086b86b6f61fba8098a72c (patch)
tree1200c4448dd9163da9ee051d1b4b74b3c41d96fe
parentf879186efa843e7cb77fd48566baca9ac7f3264a (diff)
downloadkrb5-cca76f6112f1ad6918086b86b6f61fba8098a72c.zip
krb5-cca76f6112f1ad6918086b86b6f61fba8098a72c.tar.gz
krb5-cca76f6112f1ad6918086b86b6f61fba8098a72c.tar.bz2
* lifetime.c: Remove support for "magic" lifetime value of 255
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12965 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r--src/lib/krb4/ChangeLog4
-rw-r--r--src/lib/krb4/lifetime.c14
2 files changed, 7 insertions, 11 deletions
diff --git a/src/lib/krb4/ChangeLog b/src/lib/krb4/ChangeLog
index f1a4fbf..59d8e28 100644
--- a/src/lib/krb4/ChangeLog
+++ b/src/lib/krb4/ChangeLog
@@ -1,3 +1,7 @@
+2001-01-29 Tom Yu <tlyu@mit.edu>
+
+ * lifetime.c: Remove support for "magic" lifetime value of 255.
+
2001-01-26 Tom Yu <tlyu@mit.edu>
* dest_tkt.c: Clean up uid handling. Fix stat checks.
diff --git a/src/lib/krb4/lifetime.c b/src/lib/krb4/lifetime.c
index 7252750..e02f580 100644
--- a/src/lib/krb4/lifetime.c
+++ b/src/lib/krb4/lifetime.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2000 by the Massachusetts Institute of Technology.
+ * Copyright 2000, 2001 by the Massachusetts Institute of Technology.
* All Rights Reserved.
*
* Export of this software from the United States of America may
@@ -30,16 +30,13 @@
* The following table contains an exponential scale that covers the
* lifetime values 128 to 191 inclusive (a total of 64 values).
* Values greater than 191 get interpreted the same as 191, but they
- * will never be generated by the functions in this file. The special
- * case of a lifetime byte of 255 gets interpreted as never expiring,
- * which corresponds to an expiration date of KRB_NEVERDATE, which
- * should be (-1).
+ * will never be generated by the functions in this file.
*
* The ratio is approximately 1.069144898 (actually exactly
* exp(log(67.5)/63), where 67.5 = 2592000/38400, and 259200 = 30
* days, and 38400 = 128*5 minutes. This allows a lifetime byte of
* 191 to correspond to a ticket life of exactly 30 days and a
- * lifetime byte of 191 to correspond to exactly 128*5 minutes, with
+ * lifetime byte of 128 to correspond to exactly 128*5 minutes, with
* the other values spread on an exponential curve fit in between
* them. This table should correspond exactly to the set of extended
* ticket lifetime values used by AFS and CMU.
@@ -92,7 +89,6 @@ static const KRB4_32 lifetimes[NLIFETIMES] = {
};
#define MINFIXED 0x80
#define MAXFIXED (MINFIXED + NLIFETIMES - 1)
-#define NOEXPIRE 0xFF
#endif /* !SHORT_LIFETIME */
/*
@@ -107,8 +103,6 @@ krb_life_to_time(KRB4_32 start, int life)
if (life < 0 || life > 255) /* possibly sign botch in caller */
return start;
#ifndef SHORT_LIFETIME
- if (life == NOEXPIRE)
- return KRB_NEVERDATE;
if (life < MINFIXED)
return start + life * 5 * 60;
if (life > MAXFIXED)
@@ -138,8 +132,6 @@ krb_time_to_life(KRB4_32 start, KRB4_32 end)
if (dt <= 0)
return 0;
#ifndef SHORT_LIFETIME
- if (end == KRB_NEVERDATE)
- return NOEXPIRE;
if (dt < lifetimes[0])
return (dt + 5 * 60 - 1) / (5 * 60);
/* This depends on the array being ordered. */