proposed patch for krb5int_populate_gic_opt to set lifetime
John Hascall
john at iastate.edu
Mon Apr 5 19:13:33 EDT 2004
> I made this vs. krb5-1.3.2-beta3, YMMV.
Yikes, wrong patch file. This is the one
where I forgot that starttime and endtime
were inside of cred->times!
John
>
> John
>
>
> *** ./include/k5-int.h Mon Apr 5 15:51:14 2004
> --- ./include/k5-intN.h Mon Apr 5 15:50:56 2004
> ***************
> *** 956,962 ****
> 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_error_code krb5_do_preauth
> --- 956,962 ----
> 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_creds *creds);
>
>
> krb5_error_code krb5_do_preauth
> *** ./lib/krb5/krb/gic_keytab.c Fri Jun 27 18:14:00 2003
> --- ./lib/krb5/krb/gic_keytabN.c Mon Apr 5 15:49:36 2004
> ***************
> *** 157,163 ****
>
> krb5int_populate_gic_opt(context, &opt,
> options, addrs, ktypes,
> ! pre_auth_types);
> if (arg_keytab == NULL) {
> retval = krb5_kt_default(context, &keytab);
> if (retval)
> --- 157,163 ----
>
> krb5int_populate_gic_opt(context, &opt,
> options, addrs, ktypes,
> ! pre_auth_types, creds);
> if (arg_keytab == NULL) {
> retval = krb5_kt_default(context, &keytab);
> if (retval)
> *** ./lib/krb5/krb/gic_pwd.c Fri Aug 8 15:46:26 2003
> --- ./lib/krb5/krb/gic_pwdN.c Mon Apr 5 15:49:04 2004
> ***************
> *** 372,380 ****
> 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)
> {
> int i;
> krb5_get_init_creds_opt_init(opt);
> if (addrs)
> krb5_get_init_creds_opt_set_address_list(opt, (krb5_address **) addrs
);
> --- 372,382 ----
> 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_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
);
> ***************
> *** 394,401 ****
> if (options&KDC_OPT_PROXIABLE)
> krb5_get_init_creds_opt_set_proxiable(opt, 1);
> else krb5_get_init_creds_opt_set_proxiable(opt, 0);
> !
> !
> }
>
> /*
> --- 396,406 ----
> 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->endtime) {
> ! krb5_timeofday(context, &starttime);
> ! if (creds->starttime) starttime = creds->starttime;
> ! krb5_get_init_creds_opt_set_tkt_life(opt, creds->endtime - starttim
e);
> ! }
> }
>
> /*
> ***************
> *** 446,452 ****
> }
> krb5int_populate_gic_opt(context, &opt,
> options, addrs, ktypes,
> ! pre_auth_types);
> retval = krb5_unparse_name( context, creds->server, &server);
> if (retval)
> return (retval);
> --- 451,457 ----
> }
> krb5int_populate_gic_opt(context, &opt,
> options, addrs, ktypes,
> ! pre_auth_types, creds);
> retval = krb5_unparse_name( context, creds->server, &server);
> if (retval)
> return (retval);
> _______________________________________________
> krbdev mailing list krbdev at mit.edu
> https://mailman.mit.edu/mailman/listinfo/krbdev
>
More information about the krbdev
mailing list