[29272] in Kerberos

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

Re: Trouble Getting Ticket into Cache

daemon@ATHENA.MIT.EDU (trimkins@sbcglobal.net)
Sun Feb 17 20:15:17 2008

From: trimkins@sbcglobal.net
Date: Sun, 17 Feb 2008 17:03:11 -0800 (PST)
Message-ID: <a4b56189-abae-420f-850e-2ce2306a3a9b@60g2000hsy.googlegroups.com>
Mime-Version: 1.0
X-Complaints-To: groups-abuse@google.com
Complaints-To: groups-abuse@google.com
To: kerberos@mit.edu
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: kerberos-bounces@mit.edu

On Feb 17, 6:37 pm, Ken Raeburn <raeb...@MIT.EDU> wrote:
> On Feb 17, 2008, at 17:47, trimk...@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
________________________________________________
Kerberos mailing list           Kerberos@mit.edu
https://mailman.mit.edu/mailman/listinfo/kerberos

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