--- ftpd-BSD-0.3.2/ftpd.8 Thu Jul 6 18:24:17 2000 +++ ftpd-BSD-0.3.2.new/ftpd.8 Wed Aug 16 13:17:26 2000 @@ -114,6 +114,10 @@ and requires it use the same source address as the connection came from. This prevents the "FTP bounce attack" against services on both the local machine and other local machines. +.It Fl q +Prevent +.Nm ftpd +from displaying program name and version at the connection startup. .It Fl S With this option set, .Nm ftpd @@ -127,6 +131,14 @@ .Pa /var/run/utmp , making them visible to commands such as .Xr who 1 . +.It Fl z Ar username +Use specified +.Ar username +as anonymous +.Xr ftp 1 +user, instead of default +.Pa ftp +. .It Fl T Ar maxtimeout A client may also request a different timeout period; the maximum period allowed may be set to diff -bruN ftpd-BSD-0.3.2/ftpd.c ftpd-BSD-0.3.2.new/ftpd.c --- ftpd-BSD-0.3.2/ftpd.c Fri Jul 7 05:06:04 2000 +++ ftpd-BSD-0.3.2.new/ftpd.c Wed Aug 16 13:46:09 2000 @@ -212,7 +212,7 @@ off_t byte_count; #if !defined(CMASK) || CMASK == 0 #undef CMASK -#define CMASK 027 +#define CMASK 022 #endif int defumask = CMASK; /* default umask value */ int umaskchange = 1; /* allow user to change umask value. */ @@ -248,6 +248,9 @@ #endif /* USE_PAM */ #endif /* not ORIGINAL_SOURCE */ +#ifndef ORIGINAL_SOURCE +char *anon_ftp_user = "ftp"; +#endif int epsvall = 0; @@ -336,7 +339,7 @@ #ifdef ORIGINAL_SOURCE char *argstr = "AdDhlMSt:T:u:UvP46"; #else -char *argstr = "AdDhlMqSt:T:u:UvP46"; +char *argstr = "AdDhlMqSt:T:u:UvP46z:"; #endif /* not ORIGINAL_SOURCE */ static void @@ -450,6 +453,12 @@ family = AF_INET6; break; +#ifndef ORIGINAL_SOURCE + case 'z': + anon_ftp_user = strdup(optarg); + break; +#endif + default: usage(); break; @@ -837,7 +846,11 @@ if (checkuser(_PATH_FTPUSERS, "ftp") || checkuser(_PATH_FTPUSERS, "anonymous")) reply(530, "User %s access denied.", name); +#ifdef ORIGINAL_SOURCE else if ((pw = sgetpwnam("ftp")) != NULL) { +#else + else if ((pw = sgetpwnam(anon_ftp_user)) != NULL) { +#endif guest = 1; askpasswd = 1; reply(331,