]> git.pld-linux.org Git - packages/ftpd-BSD.git/blob - ftpd-BSD-anonuser.patch
- manual fixes
[packages/ftpd-BSD.git] / ftpd-BSD-anonuser.patch
1 diff -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
30 diff -bruN ftpd-BSD-0.3.2/ftpd/ftpd.c ftpd-BSD-0.3.2.new/ftpd/ftpd.c
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 12:54:54 2000
33 @@ -248,6 +248,9 @@
34  #endif /* USE_PAM */
35  #endif /* not ORIGINAL_SOURCE */
36  
37 +#ifndef ORIGINAL_SOURCE
38 +char   *anon_ftp_user = "ftp";
39 +#endif
40  
41  int epsvall = 0;
42  
43 @@ -336,7 +339,7 @@
44  #ifdef ORIGINAL_SOURCE
45  char *argstr = "AdDhlMSt:T:u:UvP46";
46  #else
47 -char *argstr = "AdDhlMqSt:T:u:UvP46";
48 +char *argstr = "AdDhlMqSt:T:u:UvP46z:";
49  #endif /* not ORIGINAL_SOURCE */
50  
51  static void
52 @@ -450,6 +453,12 @@
53                         family = AF_INET6;
54                         break;
55  
56 +#ifndef ORIGINAL_SOURCE
57 +               case 'z':
58 +                       anon_ftp_user = strdup(optarg);
59 +                       break;
60 +#endif
61 +
62                 default:
63                         usage();
64                         break;
65 @@ -837,7 +846,11 @@
66                 if (checkuser(_PATH_FTPUSERS, "ftp") ||
67                     checkuser(_PATH_FTPUSERS, "anonymous"))
68                         reply(530, "User %s access denied.", name);
69 +#ifdef ORIGINAL_SOURCE
70                 else if ((pw = sgetpwnam("ftp")) != NULL) {
71 +#else
72 +               else if ((pw = sgetpwnam(anon_ftp_user)) != NULL) {
73 +#endif
74                         guest = 1;
75                         askpasswd = 1;
76                         reply(331,
This page took 0.070233 seconds and 4 git commands to generate.