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