[vsftpd/f16] fixes #753365 - multiple issues with vsftpd's systemd unit removes exclusivity between listen and li

Jiri Skala jskala at fedoraproject.org
Tue Nov 15 13:05:36 UTC 2011


commit 8a7fda1256eed8ac6fba91e2e7f5fcc105c33632
Author: Jiri Skala <jskala at redhat.com>
Date:   Tue Nov 15 14:05:32 2011 +0100

    fixes #753365 - multiple issues with vsftpd's systemd unit
    removes exclusivity between listen and listen_ipv6 BZ#450853

 vsftpd-2.2.2-v6only.patch      |   44 ----------------------------------------
 vsftpd-2.3.4-noexclusive.patch |   13 +++++++++++
 vsftpd-2.3.4-sd.patch          |   22 ++++++++-----------
 vsftpd.service                 |   10 +++++++++
 vsftpd.spec                    |   22 ++++++++++---------
 vsftpd at .service                |   16 --------------
 6 files changed, 44 insertions(+), 83 deletions(-)
---
diff --git a/vsftpd-2.3.4-noexclusive.patch b/vsftpd-2.3.4-noexclusive.patch
new file mode 100644
index 0000000..4a088d3
--- /dev/null
+++ b/vsftpd-2.3.4-noexclusive.patch
@@ -0,0 +1,13 @@
+diff -up vsftpd-2.3.4/vsftpd.conf.5.noexclusive vsftpd-2.3.4/vsftpd.conf.5
+--- vsftpd-2.3.4/vsftpd.conf.5.noexclusive	2011-11-15 12:56:01.777161200 +0100
++++ vsftpd-2.3.4/vsftpd.conf.5	2011-11-15 12:59:22.037565778 +0100
+@@ -284,8 +284,7 @@ Default: NO
+ .TP
+ .B listen_ipv6
+ Like the listen parameter, except vsftpd will listen on an IPv6 socket instead
+-of an IPv4 one. This parameter and the listen parameter are mutually
+-exclusive.
++of an IPv4 one.
+ 
+ Default: NO
+ .TP
diff --git a/vsftpd-2.3.4-sd.patch b/vsftpd-2.3.4-sd.patch
index 5ee2ff8..c54aca2 100644
--- a/vsftpd-2.3.4-sd.patch
+++ b/vsftpd-2.3.4-sd.patch
@@ -1,38 +1,34 @@
 diff -up vsftpd-2.3.4/vsftpd.8.sd vsftpd-2.3.4/vsftpd.8
---- vsftpd-2.3.4/vsftpd.8.sd	2011-08-03 11:02:30.509291451 +0200
-+++ vsftpd-2.3.4/vsftpd.8	2011-08-03 15:50:00.024014865 +0200
+--- 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
  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 correct symbolic link to the vsftpd at .service file.The name of the symbolic link must contain the name of the configuration file. See systemd.unit(5) for details. Each instance of the vsftpd daemon is started separately. See systemd.unit(5).
++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).
  .Sh OPTIONS
  An optional
  configuration file or files
-@@ -55,6 +57,11 @@ the "ftpd_banner" setting is set to "bla
+@@ -55,6 +57,9 @@ 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 at .conf
-+.Pp
-+.Pa /lib/systemd/system/vsftpd at vsftpd.conf
++.Pa /lib/systemd/system/vsftpd.service
  .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-08-03 11:02:37.480372306 +0200
-+++ vsftpd-2.3.4/vsftpd.conf.5	2011-08-03 15:50:29.435371891 +0200
-@@ -13,6 +13,11 @@ inetd such as
+--- 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
  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 correct symbolic link to the vsftpd at .service file. The name 
-+of the symbolic link must contain the name of the configuration file. 
-+See systemd.unit(5) for details.
++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.
 +
  .SH FORMAT
  The format of vsftpd.conf is very simple. Each line is either a comment or
diff --git a/vsftpd.service b/vsftpd.service
new file mode 100644
index 0000000..8ebae44
--- /dev/null
+++ b/vsftpd.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Vsftpd ftp daemon
+After=network.target
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf
+
+[Install]
+WantedBy=multi-user.target
diff --git a/vsftpd.spec b/vsftpd.spec
index 3b796b9..371ff35 100644
--- a/vsftpd.spec
+++ b/vsftpd.spec
@@ -2,7 +2,7 @@
 
 Name: vsftpd
 Version: 2.3.4
-Release: 5%{?dist}
+Release: 6%{?dist}
 Summary: Very Secure Ftp Daemon
 
 Group: System Environment/Daemons
@@ -16,7 +16,7 @@ Source3: vsftpd.ftpusers
 Source4: vsftpd.user_list
 Source5: vsftpd.init
 Source6: vsftpd_conf_migrate.sh
-Source7: vsftpd at .service
+Source7: vsftpd.service
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -51,9 +51,9 @@ Patch13: vsftpd-2.2.0-openssl.patch
 Patch14: vsftpd-2.2.0-wildchar.patch
 
 Patch16: vsftpd-2.2.2-clone.patch
-Patch17: vsftpd-2.2.2-v6only.patch
 Patch18: vsftpd-2.3.4-tout.patch
 Patch19: vsftpd-2.3.4-sd.patch
+Patch20: vsftpd-2.3.4-noexclusive.patch
 
 %description
 vsftpd is a Very Secure FTP daemon. It was written completely from
@@ -88,9 +88,9 @@ cp %{SOURCE1} .
 %patch13 -p1 -b .openssl
 %patch14 -p1 -b .wildchar
 %patch16 -p1 -b .clone
-%patch17 -p1 -b .v6only
 %patch18 -p1 -b .tout
 %patch19 -p1 -b .sd
+%patch20 -p1 -b .noexclusive
 
 %build
 %ifarch s390x sparcv9 sparc64
@@ -119,7 +119,6 @@ install -m 600 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/vsftpd/user_list
 install -m 755 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/vsftpd
 install -m 744 %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/vsftpd/vsftpd_conf_migrate.sh
 install -m 644 %{SOURCE7} $RPM_BUILD_ROOT/lib/systemd/system/
-ln -s /lib/systemd/system/vsftpd at .service $RPM_BUILD_ROOT/lib/systemd/system/vsftpd at vsftpd.service
                             
 mkdir -p $RPM_BUILD_ROOT/%{_var}/ftp/pub
 
@@ -131,8 +130,8 @@ rm -rf $RPM_BUILD_ROOT
 
 %preun
 if [ $1 = 0 ]; then
-	/bin/systemctl disable vsftpd at vsftpd.service > /dev/null 2>&1 || :
-	/bin/systemctl stop vsftpd at vsftpd.service > /dev/null 2>&1 || :
+	/bin/systemctl disable vsftpd.service > /dev/null 2>&1 || :
+	/bin/systemctl stop vsftpd.service > /dev/null 2>&1 || :
 fi
 
 %postun
@@ -140,15 +139,14 @@ fi
 
 %triggerun --  %{name} < 2.3.4-5
 	/sbin/chkconfig --del vsftpd >/dev/null 2>&1 || :
-	/bin/systemctl try-restart vsftpd at vsftpd.service >/dev/null 2>&1 || :
+	/bin/systemctl try-restart vsftpd.service >/dev/null 2>&1 || :
 
 %triggerpostun -n %{name}-sysvinit -- %{name} < 2.3.4-5
 	/sbin/chkconfig --add vsftpd >/dev/null 2>&1 || :
 
 %files
 %defattr(-,root,root,-)
-/lib/systemd/system/vsftpd at .service
-/lib/systemd/system/vsftpd at vsftpd.service
+/lib/systemd/system/vsftpd.service
 %{_sbindir}/vsftpd
 %dir %{_sysconfdir}/vsftpd
 %{_sysconfdir}/vsftpd/vsftpd_conf_migrate.sh
@@ -167,6 +165,10 @@ fi
 %{_sysconfdir}/rc.d/init.d/vsftpd
 
 %changelog
+* Tue Nov 15 2011 Jiri Skala <jskala at redhat.com> - 2.3.4-6
+fixes #753365 - multiple issues with vsftpd's systemd unit
+removes exclusivity between listen and listen_ipv6 BZ#450853
+
 * Wed Aug 03 2011 Jiri Skala <jskala at redhat.com> - 2.3.4-5
 - fixes #719434 - Provide native systemd unit file
 - moving SysV initscript into subpackage


More information about the scm-commits mailing list