* kinit.c (k4_kinit): Call time_to_life()
authorTom Yu <tlyu@mit.edu>
Mon, 9 Oct 2000 23:23:37 +0000 (23:23 +0000)
committerTom Yu <tlyu@mit.edu>
Mon, 9 Oct 2000 23:23:37 +0000 (23:23 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12745 dc483132-0cff-0310-8789-dd5450dbe970

src/clients/kinit/ChangeLog
src/clients/kinit/kinit.c

index 129cace9144845a06a09f5a886cc1b6612361f6c..ffb8d961d9e6dcd7360ec3aea048e775a98d0d98 100644 (file)
@@ -1,3 +1,7 @@
+2000-10-09  Tom Yu  <tlyu@mit.edu>
+
+       * kinit.c (k4_kinit): Call time_to_life().
+
 2000-10-03  Ezra Peisach  <epeisach@mit.edu>
 
        * kinit.c: Include krb524.h if suport desired. Clean up
index 3ca2de29b2fcea25c2f5490ab50a82988afd97b8..1a60d41d3d800f9cfac40367b485dce134f2d50f 100644 (file)
@@ -895,11 +895,7 @@ k4_kinit(opts, k4, ctx)
     if (!k4->lifetime)
        k4->lifetime = KRB4_BACKUP_DEFAULT_LIFE_SECS;
 
-    k4->lifetime /= (5 * 60);
-    if (k4->lifetime < 1)
-       k4->lifetime = 1;
-    if (k4->lifetime > 255)
-       k4->lifetime = 255;
+    k4->lifetime = krb_time_to_life(0, k4->lifetime);
 
     switch (opts->action)
     {