[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gss_krb5_ccache_name




Adrian Hosey <alh@warhound.org> writes:

> I'm looking for a way to do the equivalent of gss_krb5_ccache_name() with
> Heimdal. For this application, I already have the TGT in a file so I want
> to tell the application to get the TGT from that file. I've tried things
> like

There is no real good way of doing this right now. I added the function to
heimdal current (will be in tomorrows snapshot).

The first way is to set enviroment variable KRB5CCNAME.

Second, not very pretty way, it to do it behind the back of gssapi lib
(and thus quite unportable).

     extern krb5_context gssapi_krb5_context;
     krb5_error_code ret;
     if(gssapi_krb5_context == NULL)
	ret = krb5_init_context (&gssapi_krb5_context);
     if (ret == 0)
        ret = krb5_cc_set_default_name(gssapi_krb5_context,"/tmp/gsskrb5");
     if (ret)
        errx(1, "some kerberos error %d", ret);

Love

PGP signature