[14609] in Kerberos

home help back first fref pref prev next nref lref last post

Re: Valid in 32 yrs

daemon@ATHENA.MIT.EDU (Booker C. Bense)
Thu Jun 28 10:02:15 2001

Date: Thu, 28 Jun 2001 06:57:47 -0700 (PDT)
From: "Booker C. Bense" <bbense@networking.stanford.edu>
To: Benjamin P Myers <dative@sukrahelitek.com>
cc: <kerberos@mit.edu>
In-Reply-To: <Pine.LNX.4.21.0106271537570.11915-100000@vishnu.sukra.com>
Message-ID: <Pine.GSO.4.33.0106280655530.23391-100000@shred.stanford.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

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


home help back first fref pref prev next nref lref last post