another ldap bug

Will Fiveash William.Fiveash at sun.com
Mon Jun 5 18:00:12 EDT 2006


On Mon, Jun 05, 2006 at 04:13:38PM -0500, Will Fiveash wrote:
> Another issue; just after the assert() I see:
> 
> snprintf(princ_name, sizeof(princ_name), "kadmin/%s@%s", hp->h_name, global_params.realm);
> 
> Isn't this presumptuous in regards to the hostname used when doing this
> on a multi-homed system?

As I get further I realize that on my Solaris system:

gethostbyname(localname);

sets hp->h_name to the first component of a FQDN.  So on my Solaris box
my FQDN is foo.sun.com, hp->h_name == foo.  The result is that the
snprintf() above creates the princ kadmin/foo at ACME.COM.

This needs to be fixed.  Perhaps a call to krb5_sname_to_principal()
would be better?

-- 
Will Fiveash
Sun Microsystems Inc.
Austin, TX, USA (TZ=CST6CDT)



More information about the krbdev mailing list