ssh can't resolve hostnames thru WINS

Denis Vlasenko vda at port.imtp.ilyichevsk.odessa.ua
Sun Feb 17 02:25:23 EST 2002


On 15 February 2002 22:15, Damien Miller wrote:
> On Fri, 15 Feb 2002, Denis Vlasenko wrote:
> > [Please CC me, I'm not on the list]
> >
> > My box is on a mostly Windows-populated network.
> > Naturally, I set up Samba and added WINS as a name resolution option.
> >
> > I found out that some programs now can use NetBIOS names, other can't.
> > openssh falls into latter category :-(
> >
> > I found that openssh use this snippet to convert hostname to ip:
> >
> > if((gaierr = getaddrinfo(host, strport, &hints, &aitop)) != 0)
> >     fatal("%s: %.100s: %s", __progname, host,
> >         gai_strerror(gaierr));
> >
> > and it fails for me exactly in this if() when I say "ssh <wins_name>".
> > OTOH, ping uses code similar to
> >
> > struct hostent *hp;
> > hp = gethostbyname(hostname);
> >
> > and this works for WINS names.
>
> If you do this, you'll lose IPv6 capability.

I don't use IPv6, but I agree we need right fix, not a dirty hack.
It seems getaddrinfo does not use WINS for name resolution as it should
(I have all required libs and config (nsswitch.conf)) in place.

Where does getaddrinfo live? In glibc?
--
vda



More information about the openssh-unix-dev mailing list