From 429b915bfaad2a7fe0a6e0ef0329359394e3a698 Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Tue, 10 Oct 2000 19:23:16 +0000 Subject: [PATCH] * kadm_funcs.c: Call life_to_time() and time_to_life() as appropriate. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12753 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kadmin/v4server/ChangeLog | 5 +++++ src/kadmin/v4server/kadm_funcs.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/kadmin/v4server/ChangeLog b/src/kadmin/v4server/ChangeLog index a343d9a73..624dbe5e2 100644 --- a/src/kadmin/v4server/ChangeLog +++ b/src/kadmin/v4server/ChangeLog @@ -1,3 +1,8 @@ +2000-10-10 Tom Yu + + * kadm_funcs.c: Call life_to_time() and time_to_life() as + appropriate. + 2000-07-03 Ezra Peisach * Makefile.in: kadmin4d depends on the kdb5 lib. diff --git a/src/kadmin/v4server/kadm_funcs.c b/src/kadmin/v4server/kadm_funcs.c index 658d4b721..c62ebc670 100644 --- a/src/kadmin/v4server/kadm_funcs.c +++ b/src/kadmin/v4server/kadm_funcs.c @@ -83,7 +83,7 @@ kadm_entry2princ(entry, princ) strncpy(princ->exp_date_txt, ctime((const time_t *) &entry->pw_expiration), DATE_SZ); princ->attributes = entry->attributes; - princ->max_life = entry->max_life / (60 * 5); + princ->max_life = krb_time_to_life(0, entry->max_life); princ->kdc_key_ver = 1; /* entry->mkvno .... WTF??? --tlyu */ for (i = 0; i < entry->n_key_data; i++) { /* XXX This assumes knowledge of the internals of krb5_key_data */ @@ -197,7 +197,7 @@ kadm_add_entry (rname, rinstance, rrealm, valsin, valsout) } if (IS_FIELD(KADM_MAXLIFE,valsin->fields)) { - newentry.max_life = data_i.max_life * (60 * 5); + newentry.max_life = krb_life_to_time(0, data_i.max_life); mask |= KADM5_MAX_LIFE; } @@ -466,7 +466,7 @@ kadm_mod_entry (rname, rinstance, rrealm, valsin1, valsin2, valsout) } if (IS_FIELD(KADM_MAXLIFE,valsin2->fields)) { - entry.max_life = temp_key.max_life * (60 * 5); + entry.max_life = krb_life_to_time(0, temp_key.max_life); mask |= KADM5_MAX_LIFE; } -- 2.26.2