Trouble Getting Ticket into Cache
trimkins@sbcglobal.net
trimkins at sbcglobal.net
Sun Feb 17 20:03:11 EST 2008
On Feb 17, 6:37 pm, Ken Raeburn <raeb... at MIT.EDU> wrote:
> On Feb 17, 2008, at 17:47, trimk... at sbcglobal.net wrote:
>
> > krb5_get_in_tkt_with_keytab(context,
> > KRB5_DEFAULT_OPTIONS,
> > (krb5_address **) 0,
> > (krb5_enctype *) 0,
> > (krb5_preauthtype *) 0,
> > (krb5_keytab *) "/usr/lib/postgresql/8.2/etc/krb5.keytab",
> > (krb5_ccache) 0,
> > creds, &kdc_rep);
>
> The keytab argument is not a pointer to krb5_keytab, it's a
> krb5_keytab, which is itself a pointer to a structure. You shouldn't
> be passing a string there. See, for example, krb5_kt_resolve, in
> krb5.h.
>
> --
> Ken Raeburn, Senior Programmer
> MIT Kerberos Consortium
Thank you. I was wondering about how I had coded that. I changed to
code to use the function you recommended to get the krb5_keytab
handle:
krb5_keytab keytab;
retval = krb5_kt_resolve(context, "FILE:/usr/lib/postgresql/8.2/etc/
krb5.keytab", &keytab);
if (retval != 0){
return (1);
}
krb5_get_in_tkt_with_keytab(context,
KRB5_DEFAULT_OPTIONS,
(krb5_address **) 0,
(krb5_enctype *) 0,
(krb5_preauthtype *) 0,
keytab,
(krb5_ccache) 0,
creds, &kdc_rep);
Unfortunately, I am still getting the "Failed to read a valid file
image from memory" error. I will look through krb.h to see if there
may be any other preparatory functions that I am missing. In the
meantime, if anyone has any ideas about where my code is going wrong,
I'd be happy to hear them.
SIncerely,
Angus
More information about the Kerberos
mailing list