+2004-04-16 Sam Hartman <hartmans@mit.edu>
+
+ * k5-int.h: krb5int_populate_gic_opt now takes credentials so it
+ can get lifetime related options out of them
+
2004-04-02 Ken Raeburn <raeburn@mit.edu>
* k5-int.h (krb5int_prng_cleanup): Declare.
void krb5int_populate_gic_opt (
krb5_context, krb5_get_init_creds_opt *,
krb5_flags options, krb5_address * const *addrs, krb5_enctype *ktypes,
- krb5_preauthtype *pre_auth_types);
+ krb5_preauthtype *pre_auth_types, krb5_creds *creds);
krb5_error_code krb5_do_preauth
+2004-04-16 Sam Hartman <hartmans@mit.edu>
+
+
+ * gic_pwd.c (krb5int_populate_gic_opt): Take credentials and populate lifetime options based on them.
+
+ * gic_keytab.c gic_pwd.c : update callers
+
2004-04-15 Sam Hartman <hartmans@mit.edu>
* gic_pwd.c (krb5_get_init_creds_password): Free the as reply in
krb5int_populate_gic_opt(context, &opt,
options, addrs, ktypes,
- pre_auth_types);
+ pre_auth_types, creds);
if (arg_keytab == NULL) {
retval = krb5_kt_default(context, &keytab);
if (retval)
void krb5int_populate_gic_opt (
krb5_context context, krb5_get_init_creds_opt *opt,
krb5_flags options, krb5_address * const *addrs, krb5_enctype *ktypes,
- krb5_preauthtype *pre_auth_types)
+ krb5_preauthtype *pre_auth_types, krb5_creds *creds)
{
int i;
+ krb5_int32 starttime;
+
krb5_get_init_creds_opt_init(opt);
if (addrs)
krb5_get_init_creds_opt_set_address_list(opt, (krb5_address **) addrs);
if (options&KDC_OPT_PROXIABLE)
krb5_get_init_creds_opt_set_proxiable(opt, 1);
else krb5_get_init_creds_opt_set_proxiable(opt, 0);
-
-
+ if (creds && creds->times.endtime) {
+ krb5_timeofday(context, &starttime);
+ if (creds->times.starttime) starttime = creds->times.starttime;
+ krb5_get_init_creds_opt_set_tkt_life(opt, creds->times.endtime - starttime);
+ }
}
/*
}
krb5int_populate_gic_opt(context, &opt,
options, addrs, ktypes,
- pre_auth_types);
+ pre_auth_types, creds);
retval = krb5_unparse_name( context, creds->server, &server);
if (retval)
return (retval);