vsftpd-pisilinux.patch 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455
  1. Index: vsftpd-2.3.2/defs.h
  2. ===================================================================
  3. --- vsftpd-2.3.2.orig/defs.h
  4. +++ vsftpd-2.3.2/defs.h
  5. @@ -1,7 +1,7 @@
  6. #ifndef VSF_DEFS_H
  7. #define VSF_DEFS_H
  8. -#define VSFTP_DEFAULT_CONFIG "/etc/vsftpd.conf"
  9. +#define VSFTP_DEFAULT_CONFIG "/etc/vsftpd/vsftpd.conf"
  10. #define VSFTP_COMMAND_FD 0
  11. Index: vsftpd-2.3.2/EXAMPLE/INTERNET_SITE_NOINETD/README
  12. ===================================================================
  13. --- vsftpd-2.3.2.orig/EXAMPLE/INTERNET_SITE_NOINETD/README
  14. +++ vsftpd-2.3.2/EXAMPLE/INTERNET_SITE_NOINETD/README
  15. @@ -17,7 +17,7 @@ even per-connect-IP configurability.
  16. To use this example config:
  17. -1) Copy the vsftpd.conf file in this directory to /etc/vsftpd.conf.
  18. +1) Copy the vsftpd.conf file in this directory to /etc/vsftpd/vsftpd.conf.
  19. 2) Start up vsftpd, e.g.
  20. vsftpd &
  21. @@ -51,5 +51,5 @@ in the vsftpd.conf:
  22. listen_address=192.168.1.2
  23. And launch vsftpd with a specific config file like this:
  24. -vsftpd /etc/vsftpd.conf.site1 &
  25. +vsftpd /etc/vsftpd/vsftpd.conf.site1 &
  26. Index: vsftpd-2.3.2/EXAMPLE/INTERNET_SITE/README
  27. ===================================================================
  28. --- vsftpd-2.3.2.orig/EXAMPLE/INTERNET_SITE/README
  29. +++ vsftpd-2.3.2/EXAMPLE/INTERNET_SITE/README
  30. @@ -41,13 +41,13 @@ no_access = 192.168.1.3
  31. As an example of how to ban certain sites from connecting, 192.168.1.3 will
  32. be denied access.
  33. -banner_fail = /etc/vsftpd.busy_banner
  34. +banner_fail = /etc/vsftpd/busy_banner
  35. This is the file to display to users if the connection is refused for whatever
  36. reason (too many users, IP banned).
  37. Example of how to populate it:
  38. -echo "421 Server busy, please try later." > /etc/vsftpd.busy_banner
  39. +echo "421 Server busy, please try later." > /etc/vsftpd/busy_banner
  40. log_on_success += PID HOST DURATION
  41. log_on_failure += HOST
  42. @@ -62,7 +62,7 @@ Step 2) Set up your vsftpd configuration
  43. An example file is supplied. Install it like this:
  44. -cp vsftpd.conf /etc
  45. +cp vsftpd.conf /etc/vsftpd
  46. Let's example the contents of the file:
  47. Index: vsftpd-2.3.2/EXAMPLE/PER_IP_CONFIG/README
  48. ===================================================================
  49. --- vsftpd-2.3.2.orig/EXAMPLE/PER_IP_CONFIG/README
  50. +++ vsftpd-2.3.2/EXAMPLE/PER_IP_CONFIG/README
  51. @@ -20,12 +20,12 @@ directory: hosts.allow. It lives at /etc
  52. Let's have a look at the example:
  53. -vsftpd: 192.168.1.3: setenv VSFTPD_LOAD_CONF /etc/vsftpd_tcp_wrap.conf
  54. +vsftpd: 192.168.1.3: setenv VSFTPD_LOAD_CONF /etc/vsftpd/tcp_wrap.conf
  55. vsftpd: 192.168.1.4: DENY
  56. The first line:
  57. If a client connects from 192.168.1.3, then vsftpd will apply the vsftpd
  58. -config file /etc/vsftpd_tcp_wrap.conf to the session! These settings are
  59. +config file /etc/vsftpd/tcp_wrap.conf to the session! These settings are
  60. applied ON TOP of the default vsftpd.conf.
  61. This is obviously very powerful. You might use this to apply different
  62. access restrictions for some IPs (e.g. the ability to upload).
  63. Index: vsftpd-2.3.2/EXAMPLE/VIRTUAL_USERS/README
  64. ===================================================================
  65. --- vsftpd-2.3.2.orig/EXAMPLE/VIRTUAL_USERS/README
  66. +++ vsftpd-2.3.2/EXAMPLE/VIRTUAL_USERS/README
  67. @@ -15,7 +15,7 @@ See example file "logins.txt" - this spe
  68. "fred" with password "bar".
  69. Whilst logged in as root, create the actual database file like this:
  70. -db_load -T -t hash -f logins.txt /etc/vsftpd_login.db
  71. +db_load -T -t hash -f logins.txt /etc/vsftpd/login.db
  72. (Requires the Berkeley db program installed).
  73. NOTE: Many systems have multiple versions of "db" installed, so you may
  74. need to use e.g. db3_load for correct operation. This is known to affect
  75. @@ -23,10 +23,10 @@ some Debian systems. The core issue is t
  76. database to be a specific db version (often db3, whereas db4 may be installed
  77. on your system).
  78. -This will create /etc/vsftpd_login.db. Obviously, you may want to make sure
  79. +This will create /etc/vsftpd/login.db. Obviously, you may want to make sure
  80. the permissions are restricted:
  81. -chmod 600 /etc/vsftpd_login.db
  82. +chmod 600 /etc/vsftpd/login.db
  83. For more information on maintaing your login database, look around for
  84. documentation on "Berkeley DB", e.g.
  85. @@ -37,8 +37,8 @@ Step 2) Create a PAM file which uses you
  86. See the example file vsftpd.pam. It contains two lines:
  87. -auth required /lib/security/pam_userdb.so db=/etc/vsftpd_login
  88. -account required /lib/security/pam_userdb.so db=/etc/vsftpd_login
  89. +auth required /lib/security/pam_userdb.so db=/etc/vsftpd/login
  90. +account required /lib/security/pam_userdb.so db=/etc/vsftpd/login
  91. This tells PAM to authenticate users using our new database. Copy this PAM
  92. file to the PAM directory - typically /etc/pam.d/
  93. @@ -108,9 +108,9 @@ pasv_max_port=30999
  94. These put a port range on passive FTP incoming requests - very useful if
  95. you are configuring a firewall.
  96. -Copy the example vsftpd.conf file to /etc:
  97. +Copy the example vsftpd.conf file to /etc/vsftpd:
  98. -cp vsftpd.conf /etc/
  99. +cp vsftpd.conf /etc/vsftpd/
  100. Step 5) Start up vsftpd.
  101. Index: vsftpd-2.3.2/FAQ
  102. ===================================================================
  103. --- vsftpd-2.3.2.orig/FAQ
  104. +++ vsftpd-2.3.2/FAQ
  105. @@ -34,7 +34,7 @@ needs this user to run bits of itself wi
  106. Q) Help! Local users cannot log in.
  107. A) There are various possible problems.
  108. A1) By default, vsftpd disables any logins other than anonymous logins. Put
  109. -local_enable=YES in your /etc/vsftpd.conf to allow local users to log in.
  110. +local_enable=YES in your /etc/vsftpd/vsftpd.conf to allow local users to log in.
  111. A2) vsftpd tries to link with PAM. (Run "ldd vsftpd" and look for libpam to
  112. find out whether this has happened or not). If vsftpd links with PAM, then
  113. you will need to have a PAM file installed for the vsftpd service. There is
  114. @@ -46,12 +46,12 @@ system have a "shadow.h" file in the inc
  115. A4) If you are not using PAM, then vsftpd will do its own check for a valid
  116. user shell in /etc/shells. You may need to disable this if you use an invalid
  117. shell to disable logins other than FTP logins. Put check_shell=NO in your
  118. -/etc/vsftpd.conf.
  119. +/etc/vsftpd/vsftpd.conf.
  120. Q) Help! Uploads or other write commands give me "500 Unknown command.".
  121. A) By default, write commands, including uploads and new directories, are
  122. disabled. This is a security measure. To enable writes, put write_enable=YES
  123. -in your /etc/vsftpd.conf.
  124. +in your /etc/vsftpd/vsftpd.conf.
  125. Q) Help! What are the security implications referred to in the
  126. "chroot_local_user" option?
  127. @@ -87,7 +87,7 @@ A2) Alternatively, run as many copies as
  128. mode. Use "listen_address=x.x.x.x" to set the virtual IP.
  129. Q) Help! Does vsftpd support virtual users?
  130. -A) Yes, via PAM integration. Set "guest_enable=YES" in /etc/vsftpd.conf. This
  131. +A) Yes, via PAM integration. Set "guest_enable=YES" in /etc/vsftpd/vsftpd.conf. This
  132. has the effect of mapping every non-anonymous successful login to the local
  133. username specified in "guest_username". Then, use PAM and (e.g.) its pam_userdb
  134. module to provide authentication against an external (i.e. non-/etc/passwd)
  135. Index: vsftpd-2.3.2/INSTALL
  136. ===================================================================
  137. --- vsftpd-2.3.2.orig/INSTALL
  138. +++ vsftpd-2.3.2/INSTALL
  139. @@ -56,14 +56,14 @@ cp vsftpd.8 /usr/local/man/man8
  140. "make install" doesn't copy the sample config file. It is recommended you
  141. do this:
  142. -cp vsftpd.conf /etc
  143. +cp vsftpd.conf /etc/vsftpd
  144. Step 4) Smoke test (without an inetd).
  145. vsftpd can run standalone or via an inetd (such as inetd or xinetd). You will
  146. typically get more control running vsftpd from an inetd. But first we will run
  147. it without, so we can check things are going well so far.
  148. -Edit /etc/vsftpd.conf, and add this line at the bottom:
  149. +Edit /etc/vsftpd/vsftpd.conf, and add this line at the bottom:
  150. listen=YES
  151. @@ -135,11 +135,11 @@ cp RedHat/vsftpd.pam /etc/pam.d/ftp
  152. Step 7) Customize your configuration
  153. As well as the above three pre-requisites, you are recommended to install a
  154. -config file. The default location for the config file is /etc/vsftpd.conf.
  155. +config file. The default location for the config file is /etc/vsftpd/vsftpd.conf.
  156. There is a sample vsftpd.conf in the distribution tarball. You probably want
  157. -to copy that to /etc/vsftpd.conf as a basis for modification, i.e.:
  158. +to copy that to /etc/vsftpd/vsftpd.conf as a basis for modification, i.e.:
  159. -cp vsftpd.conf /etc
  160. +cp vsftpd.conf /etc/vsftpd
  161. The default configuration allows neither local user logins nor anonymous
  162. uploads. You may wish to change these defaults.
  163. Index: vsftpd-2.3.2/README
  164. ===================================================================
  165. --- vsftpd-2.3.2.orig/README
  166. +++ vsftpd-2.3.2/README
  167. @@ -37,3 +37,8 @@ All configuration options are documented
  168. Various example configurations are discussed in the EXAMPLE directory.
  169. Frequently asked questions are tackled in the FAQ file.
  170. +Important Note
  171. +==============
  172. +The location of configuration files was changed to /etc/vsftpd/. If you want
  173. +to migrate your old conf files from /etc (files vsftpd.xxxx.rpmsave) use
  174. +/etc/vsfptd/vsftpd_conf_migrate.sh
  175. Index: vsftpd-2.3.2/tunables.c
  176. ===================================================================
  177. --- vsftpd-2.3.2.orig/tunables.c
  178. +++ vsftpd-2.3.2/tunables.c
  179. @@ -188,7 +188,7 @@ tunables_load_defaults()
  180. tunable_listen_ipv6 = 0;
  181. tunable_dual_log_enable = 0;
  182. tunable_syslog_enable = 0;
  183. - tunable_background = 0;
  184. + tunable_background = 1;
  185. tunable_virtual_use_local_privs = 0;
  186. tunable_session_support = 0;
  187. tunable_download_enable = 1;
  188. @@ -258,11 +258,11 @@ tunables_load_defaults()
  189. install_str_setting(".message", &tunable_message_file);
  190. install_str_setting("nobody", &tunable_nopriv_user);
  191. install_str_setting(0, &tunable_ftpd_banner);
  192. - install_str_setting("/etc/vsftpd.banned_emails", &tunable_banned_email_file);
  193. - install_str_setting("/etc/vsftpd.chroot_list", &tunable_chroot_list_file);
  194. + install_str_setting("/etc/vsftpd/banned_emails", &tunable_banned_email_file);
  195. + install_str_setting("/etc/vsftpd/chroot_list", &tunable_chroot_list_file);
  196. install_str_setting("ftp", &tunable_pam_service_name);
  197. install_str_setting("ftp", &tunable_guest_username);
  198. - install_str_setting("/etc/vsftpd.user_list", &tunable_userlist_file);
  199. + install_str_setting("/etc/vsftpd/user_list", &tunable_userlist_file);
  200. install_str_setting(0, &tunable_anon_root);
  201. install_str_setting(0, &tunable_local_root);
  202. install_str_setting(0, &tunable_banner_file);
  203. @@ -275,7 +275,7 @@ tunables_load_defaults()
  204. install_str_setting(0, &tunable_hide_file);
  205. install_str_setting(0, &tunable_deny_file);
  206. install_str_setting(0, &tunable_user_sub_token);
  207. - install_str_setting("/etc/vsftpd.email_passwords",
  208. + install_str_setting("/etc/vsftpd/email_passwords",
  209. &tunable_email_password_file);
  210. install_str_setting("/usr/share/ssl/certs/vsftpd.pem",
  211. &tunable_rsa_cert_file);
  212. Index: vsftpd-2.3.2/vsftpd.8
  213. ===================================================================
  214. --- vsftpd-2.3.2.orig/vsftpd.8
  215. +++ vsftpd-2.3.2/vsftpd.8
  216. @@ -21,7 +21,7 @@ itself will listen on the network. This
  217. recommended. It is activated by setting
  218. .Pa listen=YES
  219. in
  220. -.Pa /etc/vsftpd.conf .
  221. +.Pa /etc/vsftpd/vsftpd.conf .
  222. Direct execution of the
  223. .Nm vsftpd
  224. binary will then launch the FTP service ready for immediate client connections.
  225. @@ -33,7 +33,7 @@ as root. Any command line option not sta
  226. as a config file that will be loaded. Note that config files are loaded in the
  227. strict order that they are encountered on the command line.
  228. If no config files are specified, the default configuration file of
  229. -.Pa /etc/vsftpd.conf
  230. +.Pa /etc/vsftpd/vsftpd.conf
  231. will be loaded, after all other command line options are processed.
  232. .Pp
  233. Supported options are:
  234. @@ -47,14 +47,14 @@ their appearance on the command line, in
  235. config files.
  236. .El
  237. .Sh EXAMPLES
  238. -vsftpd -olisten=NO /etc/vsftpd.conf -oftpd_banner=blah
  239. +vsftpd -olisten=NO /etc/vsftpd/vsftpd.conf -oftpd_banner=blah
  240. .Pp
  241. That example overrides vsftpd's built-in default for the "listen" option to be
  242. -NO, but then loads /etc/vsftpd.conf which may override that setting. Finally,
  243. +NO, but then loads /etc/vsftpd/vsftpd.conf which may override that setting. Finally,
  244. the "ftpd_banner" setting is set to "blah", which overrides any default vsftpd
  245. setting and any identical setting that was in the config file.
  246. .Sh FILES
  247. -.Pa /etc/vsftpd.conf
  248. +.Pa /etc/vsftpd/vsftpd.conf
  249. .Sh SEE ALSO
  250. .Xr vsftpd.conf 5
  251. .end
  252. Index: vsftpd-2.3.2/vsftpd.conf.5
  253. ===================================================================
  254. --- vsftpd-2.3.2.orig/vsftpd.conf.5
  255. +++ vsftpd-2.3.2/vsftpd.conf.5
  256. @@ -4,7 +4,7 @@ vsftpd.conf \- config file for vsftpd
  257. .SH DESCRIPTION
  258. vsftpd.conf may be used to control various aspects of vsftpd's behaviour. By
  259. default, vsftpd looks for this file at the location
  260. -.BR /etc/vsftpd.conf .
  261. +.BR /etc/vsftpd/vsftpd.conf .
  262. However, you may override this by specifying a command line argument to
  263. vsftpd. The command line argument is the pathname of the configuration file
  264. for vsftpd. This behaviour is useful because you may wish to use an advanced
  265. @@ -110,7 +110,7 @@ When enabled, and vsftpd is started in "
  266. the listener process. i.e. control will immediately be returned to the shell
  267. which launched vsftpd.
  268. -Default: NO
  269. +Default: YES
  270. .TP
  271. .B check_shell
  272. Note! This option only has an effect for non-PAM builds of vsftpd. If disabled,
  273. @@ -138,7 +138,7 @@ chroot() jail in their home directory up
  274. different if chroot_local_user is set to YES. In this case, the list becomes
  275. a list of users which are NOT to be placed in a chroot() jail.
  276. By default, the file containing this list is
  277. -/etc/vsftpd.chroot_list, but you may override this with the
  278. +/etc/vsftpd/chroot_list, but you may override this with the
  279. .BR chroot_list_file
  280. setting.
  281. @@ -177,7 +177,7 @@ Default: NO
  282. .B deny_email_enable
  283. If activated, you may provide a list of anonymous password e-mail responses
  284. which cause login to be denied. By default, the file containing this list is
  285. -/etc/vsftpd.banned_emails, but you may override this with the
  286. +/etc/vsftpd/banned_emails, but you may override this with the
  287. .BR banned_email_file
  288. setting.
  289. @@ -433,7 +433,7 @@ anonymous logins are prevented unless th
  290. file specified by the
  291. .BR email_password_file
  292. setting. The file format is one password per line, no extra whitespace. The
  293. -default filename is /etc/vsftpd.email_passwords.
  294. +default filename is /etc/vsftpd/email_passwords.
  295. Default: NO
  296. .TP
  297. @@ -764,7 +764,7 @@ passwords which are not permitted. This
  298. .BR deny_email_enable
  299. is enabled.
  300. -Default: /etc/vsftpd.banned_emails
  301. +Default: /etc/vsftpd/banned_emails
  302. .TP
  303. .B banner_file
  304. This option is the name of a file containing text to display when someone
  305. @@ -803,7 +803,7 @@ is enabled. If the option
  306. is enabled, then the list file becomes a list of users to NOT place in a
  307. chroot() jail.
  308. -Default: /etc/vsftpd.chroot_list
  309. +Default: /etvsftpd.confc/vsftpd.chroot_list
  310. .TP
  311. .B cmds_allowed
  312. This options specifies a comma separated list of allowed FTP commands (post
  313. @@ -864,7 +864,7 @@ This option can be used to provide an al
  314. .BR secure_email_list_enable
  315. setting.
  316. -Default: /etc/vsftpd.email_passwords
  317. +Default: /etc/vsftpd/email_passwords
  318. .TP
  319. .B ftp_username
  320. This is the name of the user we use for handling anonymous FTP. The home
  321. @@ -987,10 +987,10 @@ the manual page, on a per-user basis. Us
  322. with an example. If you set
  323. .BR user_config_dir
  324. to be
  325. -.BR /etc/vsftpd_user_conf
  326. +.BR /etc/vsftpd/user_conf
  327. and then log on as the user "chris", then vsftpd will apply the settings in
  328. the file
  329. -.BR /etc/vsftpd_user_conf/chris
  330. +.BR /etc/vsftpd/user_conf/chris
  331. for the duration of the session. The format of this file is as detailed in
  332. this manual page! PLEASE NOTE that not all settings are effective on a
  333. per-user basis. For example, many settings only prior to the user's session
  334. @@ -1026,7 +1026,7 @@ This option is the name of the file load
  335. .BR userlist_enable
  336. option is active.
  337. -Default: /etc/vsftpd.user_list
  338. +Default: /etc/vsftpd/user_list
  339. .TP
  340. .B vsftpd_log_file
  341. This option is the name of the file to which we write the vsftpd style
  342. Index: vsftpd-2.3.2/vsftpd.conf
  343. ===================================================================
  344. --- vsftpd-2.3.2.orig/vsftpd.conf
  345. +++ vsftpd-2.3.2/vsftpd.conf
  346. @@ -1,4 +1,4 @@
  347. -# Example config file /etc/vsftpd.conf
  348. +# Example config file /etc/vsftpd/vsftpd.conf
  349. #
  350. # The default compiled in settings are fairly paranoid. This sample file
  351. # loosens things up a bit, to make the ftp daemon more usable.
  352. @@ -12,14 +12,14 @@
  353. anonymous_enable=YES
  354. #
  355. # Uncomment this to allow local users to log in.
  356. -#local_enable=YES
  357. +local_enable=YES
  358. #
  359. # Uncomment this to enable any form of FTP write command.
  360. -#write_enable=YES
  361. +write_enable=YES
  362. #
  363. # Default umask for local users is 077. You may wish to change this to 022,
  364. # if your users expect that (022 is used by most other ftpd's)
  365. -#local_umask=022
  366. +local_umask=022
  367. #
  368. # Uncomment this to allow the anonymous FTP user to upload files. This only
  369. # has an effect if the above global write enable is activated. Also, you will
  370. @@ -52,7 +52,7 @@ connect_from_port_20=YES
  371. #
  372. # If you want, you can have your log file in standard ftpd xferlog format.
  373. # Note that the default log file location is /var/log/xferlog in this case.
  374. -#xferlog_std_format=YES
  375. +xferlog_std_format=YES
  376. #
  377. # You may change the default value for timing out an idle session.
  378. #idle_session_timeout=600
  379. @@ -87,7 +87,7 @@ connect_from_port_20=YES
  380. # useful for combatting certain DoS attacks.
  381. #deny_email_enable=YES
  382. # (default follows)
  383. -#banned_email_file=/etc/vsftpd.banned_emails
  384. +#banned_email_file=/etc/vsftpd/banned_emails
  385. #
  386. # You may specify an explicit list of local users to chroot() to their home
  387. # directory. If chroot_local_user is YES, then this list becomes a list of
  388. @@ -95,7 +95,7 @@ connect_from_port_20=YES
  389. #chroot_local_user=YES
  390. #chroot_list_enable=YES
  391. # (default follows)
  392. -#chroot_list_file=/etc/vsftpd.chroot_list
  393. +#chroot_list_file=/etc/vsftpd/chroot_list
  394. #
  395. # You may activate the "-R" option to the builtin ls. This is disabled by
  396. # default to avoid remote users being able to cause excessive I/O on large
  397. @@ -112,3 +112,7 @@ listen=YES
  398. # sockets, you must run two copies of vsftpd with two configuration files.
  399. # Make sure, that one of the listen options is commented !!
  400. #listen_ipv6=YES
  401. +
  402. +pam_service_name=vsftpd
  403. +userlist_enable=YES
  404. +tcp_wrappers=YES