Subject: Bug in Virtual Hosting.

From: ryan <[email-masked]>
Date: Wed, 18 Jun 1997 15:31:25 -0700

I have found the following bug in virtual hosting: (beta13)
Under linux kernel 2.0.29, and 2.0.30, the virtual hosting code does not
work. Both systems are running shadow, (one is slackware 3.1, the other
is slackware 3.2 but with ip aliasing) and I have properly configured
and determined that both shadow and virtual support *are* compiled in. I
have futher done testing and I have narrowed the bug to a single line: 
ftpd.c: 
    if (getsockname(0, (struct sockaddr *) &virtual_addr, &virtual_len)
== 0) {
 This call fails. I have noted the errno, and it is '22'. Which
corresponds to EINVAL -> Invalid Argument.
I have hacked the code to pass
stdin->_fileno (which ended up being 0 anyways)
instead of '0', but I get the same error. I suspect this is some kind of
kernel bug, but I don't know enough about daemon programming to
correctly assess and fix the situation. The server works, but the
virtual part doesn't work at all because of this failed call.

-ryan

--
Ryan Rawson
System Administrater
The Net Idea Communications Inc.
[email-masked]