[vsftpd] - fixes usage pasv_address option in combination with external IP - updated man pages - multile inst

Jiri Skala jskala at fedoraproject.org
Wed Sep 4 12:11:19 UTC 2013


commit e7a02f0bd04af1e651b0b488e5fae137275b8b2d
Author: Jiri Skala <jskala at redhat.com>
Date:   Wed Sep 4 14:11:06 2013 +0200

    - fixes usage pasv_address option in combination with external IP
    - updated man pages - multile instances using vsftpd.target

 vsftpd-2.3.4-sd.patch        |   64 ++++++++++++++++++++++++++++++++----------
 vsftpd-3.0.2-pasv-addr.patch |   24 +++++++++++++++
 vsftpd.spec                  |    8 ++++-
 3 files changed, 80 insertions(+), 16 deletions(-)
---
diff --git a/vsftpd-2.3.4-sd.patch b/vsftpd-2.3.4-sd.patch
index c54aca2..706365a 100644
--- a/vsftpd-2.3.4-sd.patch
+++ b/vsftpd-2.3.4-sd.patch
@@ -1,35 +1,69 @@
-diff -up vsftpd-2.3.4/vsftpd.8.sd vsftpd-2.3.4/vsftpd.8
---- vsftpd-2.3.4/vsftpd.8.sd	2011-11-14 15:22:50.363265369 +0100
-+++ vsftpd-2.3.4/vsftpd.8	2011-11-15 08:32:55.270895429 +0100
-@@ -25,6 +25,8 @@ in
+diff -up vsftpd-3.0.2/vsftpd.8.sd vsftpd-3.0.2/vsftpd.8
+--- vsftpd-3.0.2/vsftpd.8.sd	2013-09-04 13:04:40.383348837 +0200
++++ vsftpd-3.0.2/vsftpd.8	2013-09-04 13:45:00.370277842 +0200
+@@ -25,6 +25,23 @@ in
  Direct execution of the
  .Nm vsftpd
  binary will then launch the FTP service ready for immediate client connections.
 +.Pp
-+Systemd changes the vsftpd start-up. When the SysV initscript attempts to start one instance of the vsftpd daemon for each of /etc/vsftpd/*.conf file, each configuration file requires a proper unit file. Each instance of the vsftpd daemon is started separately. See systemd.unit(5).
++Systemd changes the vsftpd daemon start-up. The vsftpd package contains vsftpd-generator script generating symbolic links to /var/run/systemd/generator/vsftpd.target.wants directory. The generator is called during e.g. 'systemctl --system daemon-reload'. All these symbolic links link /usr/lib/systemd/system/vsftpd at .service file.
++The vsftpd daemon(s) is/are controlled by one of following ways:
++.Pp
++1. Single daemon using default /etc/vsftpd/vsftpd.conf configuration file
++.br
++# systemctl {start,stop,...} vsftpd[.service]
++.Pp
++2. Single daemon using /etc/vsftpd/<conf-name>.conf
++.br
++# systemctl {start,stop,...} vsftpd@<conf-name>[.service]
++.Pp
++3. All instances together
++.br
++# systemctl {restart,stop} vsftpd.target
++.Pp
++See systemd.unit(5), systemd.target(5) for further details.
  .Sh OPTIONS
  An optional
  configuration file or files
-@@ -55,6 +57,9 @@ the "ftpd_banner" setting is set to "bla
+@@ -55,6 +72,13 @@ the "ftpd_banner" setting is set to "bla
  setting and any identical setting that was in the config file.
  .Sh FILES
  .Pa /etc/vsftpd/vsftpd.conf
 +.Pp
-+.Pa /lib/systemd/system/vsftpd.service
++.Pa /usr/lib/systemd/system/vsftpd.service
++.Pp
++.Pa /usr/lib/systemd/system/vsftpd at .service
++.Pp
++.Pa /usr/lib/systemd/system/vsftpd.target
  .Sh SEE ALSO
  .Xr vsftpd.conf 5
 +.Xr systemd.unit 5
  .end
-diff -up vsftpd-2.3.4/vsftpd.conf.5.sd vsftpd-2.3.4/vsftpd.conf.5
---- vsftpd-2.3.4/vsftpd.conf.5.sd	2011-11-14 15:22:50.546267713 +0100
-+++ vsftpd-2.3.4/vsftpd.conf.5	2011-11-15 08:48:42.872580090 +0100
-@@ -13,6 +13,9 @@ inetd such as
+diff -up vsftpd-3.0.2/vsftpd.conf.5.sd vsftpd-3.0.2/vsftpd.conf.5
+--- vsftpd-3.0.2/vsftpd.conf.5.sd	2013-09-04 13:04:40.391348915 +0200
++++ vsftpd-3.0.2/vsftpd.conf.5	2013-09-04 13:44:57.573250302 +0200
+@@ -12,7 +12,23 @@ inetd such as
+ .BR xinetd
  to launch vsftpd with different configuration files on a per virtual host
  basis.
- 
-+Systemd changes the vsftpd daemon start-up. Each configuration file 
-+requires a proper unit file that can be obtained by cloning and modifying default vsftpd.service. This additional unit file should be placed to /etc/systemd/system. See systemd.unit(5) for details.
-+
+-
++.P
++Systemd changes the vsftpd daemon start-up. The vsftpd package contains vsftpd-generator script generating symbolic links to /var/run/systemd/generator/vsftpd.target.wants directory. The generator is called during e. g. 'systemctl --system daemon-reload'. All these symbolic links link /usr/lib/systemd/system/vsftpd at .service file.
++The vsftpd daemon(s) is/are controlled by one of following ways:
++.P
++1. Single daemon using default /etc/vsftpd/vsftpd.conf configuration file
++.br
++# systemctl {start,stop,...} vsftpd[.service]
++.P
++2. Single daemon using /etc/vsftpd/<config-filename>.conf
++.br
++# systemctl {start,stop,...} vsftpd@<config-filename-without-extension>[.service]
++.P
++3. All instances together
++.br
++# systemctl {restart,stop} vsftpd.target
++.P
++See systemd.unit(5), systemd.target(5) for further details.
  .SH FORMAT
  The format of vsftpd.conf is very simple. Each line is either a comment or
  a directive. Comment lines start with a # and are ignored. A directive line
diff --git a/vsftpd-3.0.2-pasv-addr.patch b/vsftpd-3.0.2-pasv-addr.patch
new file mode 100644
index 0000000..e91261d
--- /dev/null
+++ b/vsftpd-3.0.2-pasv-addr.patch
@@ -0,0 +1,24 @@
+diff -up vsftpd-3.0.2/privops.c.pasv-addr vsftpd-3.0.2/privops.c
+--- vsftpd-3.0.2/privops.c.pasv-addr	2013-09-03 15:57:47.796756184 +0200
++++ vsftpd-3.0.2/privops.c	2013-09-03 15:57:58.873752201 +0200
+@@ -160,7 +160,19 @@ vsf_privop_pasv_listen(struct vsf_sessio
+       p_sess->pasv_listen_fd = vsf_sysutil_get_ipv4_sock();
+     }
+     vsf_sysutil_activate_reuseaddr(p_sess->pasv_listen_fd);
+-    vsf_sysutil_sockaddr_clone(&s_p_sockaddr, p_sess->p_local_addr);
++    if (tunable_pasv_address != 0)
++    {
++      vsf_sysutil_sockaddr_alloc_ipv4(&s_p_sockaddr);
++      /* Use passive address as specified in configuration */
++      if (vsf_sysutil_inet_aton(tunable_pasv_address, s_p_sockaddr) == 0)
++      {
++        die("invalid pasv_address");
++      }
++    }
++    else
++    {
++      vsf_sysutil_sockaddr_clone(&s_p_sockaddr, p_sess->p_local_addr);
++    }
+     vsf_sysutil_sockaddr_set_port(s_p_sockaddr, the_port);
+     retval = vsf_sysutil_bind(p_sess->pasv_listen_fd, s_p_sockaddr);
+     if (!vsf_sysutil_retval_is_error(retval))
diff --git a/vsftpd.spec b/vsftpd.spec
index 11f4829..4b39c14 100644
--- a/vsftpd.spec
+++ b/vsftpd.spec
@@ -3,7 +3,7 @@
 
 Name: vsftpd
 Version: 3.0.2
-Release: 5%{?dist}
+Release: 6%{?dist}
 Summary: Very Secure Ftp Daemon
 
 Group: System Environment/Daemons
@@ -60,6 +60,7 @@ Patch22: vsftpd-2.3.5-aslim.patch
 Patch23: vsftpd-3.0.0-tz.patch
 Patch24: vsftpd-3.0.0-xferlog.patch
 Patch25: vsftpd-3.0.0-logrotate.patch
+Patch26: vsftpd-3.0.2-pasv-addr.patch
 
 %description
 vsftpd is a Very Secure FTP daemon. It was written completely from
@@ -100,6 +101,7 @@ cp %{SOURCE1} .
 %patch23 -p1 -b .tz
 %patch24 -p1 -b .xferlog
 %patch25 -p1 -b .logrotate
+%patch26 -p1 -b .pasv-addr
 
 %build
 %ifarch s390x sparcv9 sparc64
@@ -170,6 +172,10 @@ rm -rf $RPM_BUILD_ROOT
 %{_sysconfdir}/rc.d/init.d/vsftpd
 
 %changelog
+* Wed Sep 04 2013 Jiri Skala <jskala at redhat.com> - 3.0.2-6
+- fixes usage pasv_address option in combination with external IP
+- updated man pages - multile instances using vsftpd.target
+
 * Thu Aug 15 2013 Jiri Skala <jskala at redhat.com> - 3.0.2-5
 - replaced systemd path by _unitdir macro
 - fixes #7194344 - multiple instances (target, generator)


More information about the scm-commits mailing list