Subject: WU-FTPD not fully virtual...?

From: "Haralds Jass" <[email-masked]>
Date: Mon, 1 Jul 1996 13:53:30 -0800

As you can see below, the FTPD is still displaying 'no1.superb.net FTP server' 
even when it is for another IP. I have the latest version of wu-ftpd + the 
virtual patch, yet it is still this way...have I done anything wrong? Any way 
to fix this (to display <IP> FTP server ready, or even better <otherdomainname> 
FTP server ready for virtual FTP)?

Thanks in advance!

Hmm...not fully virtual, is it?
no1.superb.net:/opt/home2/hjass>ftp peakreflections
Connected to peakreflections.superb.net.
220-Welcome to our FTP site.
220-Please note that all transfers are logged.
220-
220 no1.superb.net FTP server (Version wu-2.4(2) Mon Jul 1 14:01:04 EDT 1996) ready.
Name (peakreflections:hjass):

---

From: Jim Davis <[email-masked]>
Date: Mon, 1 Jul 1996 18:07:22 -0700 (MST)

On Mon, 1 Jul 1996, Haralds Jass wrote:

> As you can see below, the FTPD is still displaying 'no1.superb.net FTP
> server' even when it is for another IP.

> 220 no1.superb.net FTP server (Version wu-2.4(2) Mon Jul 1 14:01:04 EDT 1996) ready.

A quick look at the beta-11 source suggests that line is coming from

    reply(220, "%s FTP server (%s) ready.", hostname, version);

in ftpd.c where 'hostname' is set by gethostbyname() (or its moral
equivalent)  earlier on.  gethostbyname() will return the 'real' hostname,
not the hostname of the logical interface, so I think you'd need to
explicitly fetch the IP address of the particular logical interface (eg. 
virtual_ptr->sin_addr) and then do a gethostbyaddr() on that IP address to
get the 'right' hostname.