bugzilla-daemon at mindrot.org
2003-May-12 18:20 UTC
[Bug 563] getaddrinfo() in libopenbsd-compat.a breaks heimdal-linked pam_krb5
http://bugzilla.mindrot.org/show_bug.cgi?id=563
Summary: getaddrinfo() in libopenbsd-compat.a breaks heimdal-
linked pam_krb5
Product: Portable OpenSSH
Version: -current
Platform: Sparc
OS/Version: Solaris
Status: NEW
Severity: normal
Priority: P2
Component: Miscellaneous
AssignedTo: openssh-unix-dev at mindrot.org
ReportedBy: buckh at pobox.com
i realize that fake-getaddrinfo.c says, ``Don't use it for another
purpose,''
but if getaddrinfo can't be renamed then stuff like this is inevitable, and
i
think it might not just be me so i wanted to point it out:
heimdal uses the getaddrinfo()-returned ai_protocol, ai_socktype and ai_protocol
in its socket() call in send_to_kdc(), after passing in the desired ai_socktype
in hints->ai_socktype. on Solaris 2.6, there's no getaddrinfo(), so
heimdal
builds this into it's libroken and ssh builds this into libopenbsd-compat.
when
sshd goes to use pam_krb5 for keyboard-interactive, the pam_krb5 calls to
heimdal's libkrb5 result in libopenbsd-compat's getaddrinfo() getting
called,
which always returns a struct addrinfo with ai_socktype == ai_protocol == 0, and
socket() buys an EPROTOTYPE:
send_to_kdc.c:
ret = krb5_krbhst_get_addrinfo(context, hi, &ai);
if (ret)
continue;
for (a = ai; a != NULL; a = a->ai_next) {
fd = socket (a->ai_family, a->ai_socktype, a->ai_protocol);
if (fd < 0)
continue;
truss says:
so_socket(2, 0, 0, 0x00000000, 1) Err#98 EPROTOTYPE
0x00000000: ""
(i have to admit i have absolutely no idea where it's getting ai_family
from, if
that's what that first parameter is)
it would be nice if maybe libopenbsd-compat's getaddrinfo copied ai_family,
ai_socktype and ai_protocol to the returned struct addrinfo's. yes, i admit,
we
need to upgrade
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2003-May-13 00:44 UTC
[Bug 563] getaddrinfo() in libopenbsd-compat.a breaks heimdal-linked pam_krb5
http://bugzilla.mindrot.org/show_bug.cgi?id=563 ------- Additional Comments From djm at mindrot.org 2003-05-13 10:44 ------- Does rebuilding after: LIBS='-lbroken' ./configure help? ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2003-May-13 03:17 UTC
[Bug 563] getaddrinfo() in libopenbsd-compat.a breaks heimdal-linked pam_krb5
http://bugzilla.mindrot.org/show_bug.cgi?id=563
buckh at pobox.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |djm at mindrot.org
------- Additional Comments From buckh at pobox.com 2003-05-13 13:17 -------
perhaps. i'll try modifying configure.ac and acconfig.h to get
<roken.h>
included also, if configure can find em, and let you know if it works. for my
purposes, i was content to just rename getaddrinfo in fake-getaddrinfo.c and
kludge up fake-getaddrinfo.h:
#ifndef HAVE_GETADDRINFO
#define getaddrinfo fake_getaddrinfo
int fake_getaddrinfo( . . . )
#endif
don't know how many other libroken functions i'll pick up if i configure
it in
and if some of them might be less unbroken than libopenbsd-compat versions.
maybe i should just see if i can port GNU libc . . .
thanks for the help
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
Reasonably Related Threads
- [Bug 563] getaddrinfo() in libopenbsd-compat.a breaks heimdal-linked pam_krb5
- kernel update to 3.12.5-1, now: upsd[617]: getaddrinfo: Servname not supported for ai_socktype
- [Bug 819] patch to add kerberos password-changing
- AIX- 'Host not found' in getaddrinfo("0.0.0.0", "22" , ...)
- [Bug 808] segfault if not using pam/keyboard-interactive mech and password's expired