kpasswd not working correctly?

Samuel 444398NOSPAM at celes.unizar.es
Tue Oct 28 17:01:18 EST 2003


I don't know if this is the suitable group to post this. If it isn't I
apologize.

I have observed a strange behaviour when using kpasswd (MIT Kerberos
v1.2.8 on Solaris 9) without cached credentials. It fails with this
error:

samuel at host:~$ kpasswd
kpasswd: No credentials cache found getting principal from ccache 

But man page shows this:
"...kpasswd uses the principal name from an existing ccache if there is
one; if not, the  principal  is  derived from the identity of the user
invoking the kpasswd command."

And the source code seems to be coherent with what man page says:
src/clients/kpasswd/kpasswd.c:

} else if ((ret = krb5_cc_default(context, &ccache)) != KRB5_CC_NOTFOUND) {
	..... -- Error handling code
} else {
	get_name_from_passwd_file(argv[0], context, &princ);
}

The problem is that the else part is never executed because krb5_cc_default
never(I think) returns KRB5_CC_NOTFOUND. I have followed the execution with
gdb and the sequence of function calls is:

krb5_cc_default (ccdefault.c)
	retval = krb5_cc_resolve(context, krb5_cc_default_name(context), ccache);
	...
	return retval

krb5_cc_resolve (ccbase.c)
	return (*krb5_cc_dfl_ops->resolve)(context, cache, resid);
	--  (gdb) print krb5_cc_dfl_ops->resolve
	--  $11 = (krb5_error_code (*)()) 0x2ce2c <krb5_fcc_resolve>

krb5_fcc_resolve (fcc_reslv.c)
	return KRB5_OK
	-- This function only can return 2 values: KRB5_CC_NOMEM or KRB5_OK

Is this a bug or am I missing something? I am a Kerberos newbie(at
programming level, at least) so it's possible that the answer is evident
but I can't see it.

Thanks in advance

Samuel
-- 
Samuel Moñux Salvador
PGP Key pgp.rediris.es    -----         KeyID 0x822583C2


More information about the Kerberos mailing list