another ldap bug

Praveenkumar Sahukar psahukar at novell.com
Wed Jun 7 02:32:23 EDT 2006


>>> On Tue, Jun 6, 2006 at  3:30 AM, in message
<20060605220012.GE23943 at sun.com>,
Will Fiveash <William.Fiveash at sun.com> wrote: 
> 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?

gethostname and gethostbyname is also used in kdb5_util. So kdb5_util
too need to be fixed. 

-Praveen Kumar



More information about the krbdev mailing list