- fixes
[packages/ftpd-BSD.git] / ftpd-BSD-anonuser.patch
CommitLineData
fb9f4036 1diff -bruN ftpd-BSD-0.3.2/ftpd/ftpd.c ftpd-BSD-0.3.2.new/ftpd/ftpd.c
2--- ftpd-BSD-0.3.2/ftpd/ftpd.c Fri Jul 7 05:06:04 2000
3+++ ftpd-BSD-0.3.2.new/ftpd/ftpd.c Wed Aug 16 12:54:54 2000
4@@ -248,6 +248,9 @@
5 #endif /* USE_PAM */
6 #endif /* not ORIGINAL_SOURCE */
7
8+#ifndef ORIGINAL_SOURCE
9+char *anon_ftp_user = "ftp";
10+#endif
11
12 int epsvall = 0;
13
14@@ -336,7 +339,7 @@
15 #ifdef ORIGINAL_SOURCE
16 char *argstr = "AdDhlMSt:T:u:UvP46";
17 #else
18-char *argstr = "AdDhlMqSt:T:u:UvP46";
19+char *argstr = "AdDhlMqSt:T:u:UvP46z:";
20 #endif /* not ORIGINAL_SOURCE */
21
22 static void
23@@ -450,6 +453,12 @@
24 family = AF_INET6;
25 break;
26
27+#ifndef ORIGINAL_SOURCE
28+ case 'z':
29+ anon_ftp_user = strdup(optarg);
30+ break;
31+#endif
32+
33 default:
34 usage();
35 break;
36@@ -837,7 +846,11 @@
37 if (checkuser(_PATH_FTPUSERS, "ftp") ||
38 checkuser(_PATH_FTPUSERS, "anonymous"))
39 reply(530, "User %s access denied.", name);
40+#ifdef ORIGINAL_SOURCE
41 else if ((pw = sgetpwnam("ftp")) != NULL) {
42+#else
43+ else if ((pw = sgetpwnam(anon_ftp_user)) != NULL) {
44+#endif
45 guest = 1;
46 askpasswd = 1;
47 reply(331,
This page took 0.051796 seconds and 4 git commands to generate.