[14610] in Kerberos
Re: Valid in 32 yrs
daemon@ATHENA.MIT.EDU (Benjamin P Myers)
Thu Jun 28 22:38:17 2001
Date: Thu, 28 Jun 2001 21:34:28 -0500 (CDT)
From: Benjamin P Myers <dative@sukrahelitek.com>
To: kerberos@mit.edu
In-Reply-To: <Pine.GSO.4.33.0106280655530.23391-100000@shred.stanford.edu>
Message-ID: <Pine.LNX.4.21.0106282130590.13737-100000@vishnu.sukra.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Thu, 28 Jun 2001, Booker C. Bense wrote:
> On Wed, 27 Jun 2001, Benjamin P Myers wrote:
>
> > I was unable to figure out how to get irix's xdm to see my kdc, so i
> > hacked up xfree86's xdm to see it, here's the relavent part: {$
> >
> >
> > krb5_get_init_creds_opt options;$
> > krb5_error_code code = 0;$
> > krb5_context context;$
> > krb5_ccache ccache;$
> > krb5_creds creds;$ memset(&creds, 0, sizeof(krb5_creds));$
> > krb5_principal princ = NULL;$ krb5_get_init_creds_opt_init(&options); $
> > char ccache_name[64];$ krb5_get_init_creds_opt_set_forwardable(&options,1);$
> >
> > sprintf(ccache_name, "/tmp/krb5cc_%d", p->pw_uid);$
> > $
> > code = krb5_init_context(&context);$
> > if ( code != 0 )$
> > {$
> > Debug("krb5_init_conext: %d\n", code);$
> > return(FAILURE);$
> > }$
> > $
> > code = krb5_parse_name(context, greet->name, &princ);$
> > if ( code != 0 )$
> > {$
> > Debug("krb5_parse_name: %d\n", code);$
> > krb5_free_context(context);$
> > return(FAILURE);$
> > }$
> > $
> > code = krb5_get_init_creds_password(context, &creds, princ,$
> > greet->password, NULL, 0,$
> > time(0),$
>
> - The problem is here. The time arg to this routine basically added
> to now to get the valid date of the ticket. You should just pass in
> 0.
>
> - Booker C. Bense
Booker, you've made my day. lacking the time() it works as
expected. knew it had to be a problem between the headphones. thank you
kindly.
-Ben