krb5_kt_resolve error in kfw 3.0
raeburn at MIT.EDU
Tue Sep 5 14:03:59 EDT 2006
On Sep 5, 2006, at 12:20, Shivakeshav Santi wrote:
> I noticed that krb5_kt_resolve function returns
> on a valid call with a correct keytab name . On further
> investigation I
> found that the function uses strcmp which is comparing the default
> with the prefix (FILE:). But the default prefixes do not have colon.
> changing the line in ktbase.c from strcmp(tlist->ops->prefix,pfx) to
> strncmp(tlist->ops->prefix,pfx,strlen(tlist->ops->prefix)) fixed
> the problem.
Isn't pfx there supposed to be a copy of just the type name, without
Even if not, using strncmp like that would give incorrect positive
matches if "FILEXYZ:foo" is given.
It does look to me like the wrong thing will happen with a drive-
letter prefix -- if it sees "c:foo", it'll assume the "c:" is part of
the filename, and use "FILE:", with the colon, which won't match
"FILE" in the linked list.
More information about the krbdev