]>
Commit | Line | Data |
---|---|---|
68cf7465 | 1 | --- ftpd-BSD-0.3.2/ftpd.8 Thu Jul 6 18:24:17 2000 |
2 | +++ ftpd-BSD-0.3.2.new/ftpd.8 Wed Aug 16 13:17:26 2000 | |
7f01ff6b | 3 | @@ -114,6 +114,10 @@ |
4 | and requires it use the same source address as the connection came from. | |
5 | This prevents the "FTP bounce attack" against services on both the local | |
6 | machine and other local machines. | |
7 | +.It Fl q | |
8 | +Prevent | |
9 | +.Nm ftpd | |
10 | +from displaying program name and version at the connection startup. | |
11 | .It Fl S | |
12 | With this option set, | |
13 | .Nm ftpd | |
14 | @@ -127,6 +131,14 @@ | |
15 | .Pa /var/run/utmp , | |
16 | making them visible to commands such as | |
17 | .Xr who 1 . | |
18 | +.It Fl z Ar username | |
19 | +Use specified | |
20 | +.Ar username | |
21 | +as anonymous | |
22 | +.Xr ftp 1 | |
23 | +user, instead of default | |
24 | +.Pa ftp | |
25 | +. | |
26 | .It Fl T Ar maxtimeout | |
27 | A client may also request a different timeout period; | |
28 | the maximum period allowed may be set to | |
68cf7465 | 29 | diff -bruN ftpd-BSD-0.3.2/ftpd.c ftpd-BSD-0.3.2.new/ftpd.c |
30 | --- ftpd-BSD-0.3.2/ftpd.c Fri Jul 7 05:06:04 2000 | |
31 | +++ ftpd-BSD-0.3.2.new/ftpd.c Wed Aug 16 13:46:09 2000 | |
2b7b3185 | 32 | @@ -212,7 +212,7 @@ |
33 | off_t byte_count; | |
34 | #if !defined(CMASK) || CMASK == 0 | |
35 | #undef CMASK | |
c4a486a1 | 36 | -#define CMASK 027 |
37 | +#define CMASK 022 | |
2b7b3185 | 38 | #endif |
39 | int defumask = CMASK; /* default umask value */ | |
40 | int umaskchange = 1; /* allow user to change umask value. */ | |
fb9f4036 | 41 | @@ -248,6 +248,9 @@ |
42 | #endif /* USE_PAM */ | |
43 | #endif /* not ORIGINAL_SOURCE */ | |
44 | ||
45 | +#ifndef ORIGINAL_SOURCE | |
46 | +char *anon_ftp_user = "ftp"; | |
47 | +#endif | |
48 | ||
49 | int epsvall = 0; | |
50 | ||
51 | @@ -336,7 +339,7 @@ | |
52 | #ifdef ORIGINAL_SOURCE | |
53 | char *argstr = "AdDhlMSt:T:u:UvP46"; | |
54 | #else | |
55 | -char *argstr = "AdDhlMqSt:T:u:UvP46"; | |
56 | +char *argstr = "AdDhlMqSt:T:u:UvP46z:"; | |
57 | #endif /* not ORIGINAL_SOURCE */ | |
58 | ||
59 | static void | |
60 | @@ -450,6 +453,12 @@ | |
61 | family = AF_INET6; | |
62 | break; | |
63 | ||
64 | +#ifndef ORIGINAL_SOURCE | |
65 | + case 'z': | |
66 | + anon_ftp_user = strdup(optarg); | |
67 | + break; | |
68 | +#endif | |
69 | + | |
70 | default: | |
71 | usage(); | |
72 | break; | |
73 | @@ -837,7 +846,11 @@ | |
74 | if (checkuser(_PATH_FTPUSERS, "ftp") || | |
75 | checkuser(_PATH_FTPUSERS, "anonymous")) | |
76 | reply(530, "User %s access denied.", name); | |
77 | +#ifdef ORIGINAL_SOURCE | |
78 | else if ((pw = sgetpwnam("ftp")) != NULL) { | |
79 | +#else | |
80 | + else if ((pw = sgetpwnam(anon_ftp_user)) != NULL) { | |
81 | +#endif | |
82 | guest = 1; | |
83 | askpasswd = 1; | |
84 | reply(331, |