Subject: [408] Problem with macro MAXHOSTNAMELEN

From: Rainer Schoepf <[email-masked]>
Date: Thu, 25 Aug 1994 10:52:09 +0200

The wu-ftpd code uses the macro MAXHOSTNAMELEN as the maximum length for
various internal strings:

 - the remote hostname
 - the guest password
 - the password for real users

On some systems, the expansion of this macro gives a very small value:

 - On AIX: 32
 - On Linux: 8

Consequently, all hostnames written too the log file are truncated.

The following patch gets around the problem:

***************
*** 183,188 ****
--- 183,194 ----
  #endif
  mode_t defumask = CMASK;           /* default umask value */
  char tmpline[7];
+ 
+ #ifdef MAXHOSTNAMELEN
+ #undef MAXHOSTNAMELEN
+ #endif
+ #define MAXHOSTNAMELEN 128
+ 
  char hostname[MAXHOSTNAMELEN];
  char remotehost[MAXHOSTNAMELEN];
  char remoteaddr[MAXHOSTNAMELEN];

-- 
   Rainer Schoepf
   Zentrum fuer Datenverarbeitung
    der Universitaet Mainz
   Anselm-Franz-von-Bentzel-Weg 12   
   D-55099 Mainz
   Germany
   <[email-masked]>