another ldap bug
Will Fiveash
William.Fiveash at sun.com
Wed Jun 7 16:55:22 EDT 2006
On Wed, Jun 07, 2006 at 12:32:23AM -0600, Praveenkumar Sahukar wrote:
> >>> 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.
Yes, I see what you mean. This should also use
krb5_sname_to_principal().
--
Will Fiveash
Sun Microsystems Inc.
Austin, TX, USA (TZ=CST6CDT)
More information about the krbdev
mailing list