From 9c280be8265f70d1abf1e02deda24cbcb9759df6160503dd1b8fa65e8074a2f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 26 May 2014 13:00:04 +0000 Subject: [PATCH] - Add socket service for vsftpd to avoid the need for xinetd here. OBS-URL: https://build.opensuse.org/package/show/network/vsftpd?expand=0&rev=62 --- vsftpd.changes | 5 +++++ vsftpd.socket | 9 +++++++++ vsftpd.spec | 6 ++++++ vsftpd@.service | 8 ++++++++ 4 files changed, 28 insertions(+) create mode 100644 vsftpd.socket create mode 100644 vsftpd@.service diff --git a/vsftpd.changes b/vsftpd.changes index 6567a8d..5cd6e34 100644 --- a/vsftpd.changes +++ b/vsftpd.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon May 26 12:52:56 UTC 2014 - tchvatal@suse.com + +- Add socket service for vsftpd to avoid the need for xinetd here. + ------------------------------------------------------------------- Mon May 26 12:42:21 UTC 2014 - tchvatal@suse.com diff --git a/vsftpd.socket b/vsftpd.socket new file mode 100644 index 0000000..9ea9480 --- /dev/null +++ b/vsftpd.socket @@ -0,0 +1,9 @@ +[Unit] +Conflicts=vsftpd.service + +[Socket] +ListenStream=21 +Accept=yes + +[Install] +WantedBy=sockets.target diff --git a/vsftpd.spec b/vsftpd.spec index 389e17c..36d36eb 100644 --- a/vsftpd.spec +++ b/vsftpd.spec @@ -43,7 +43,9 @@ Source4: README.SUSE Source5: %name.xml Source6: %name.firewall Source7: vsftpd.service +Source8: vsftpd@.service Source9: %name.keyring +Source10: vsftpd.socket Source1000: https://security.appspot.com/downloads/%{name}-%{version}.tar.gz.asc Patch1: vsftpd-2.0.4-lib64.diff Patch3: vsftpd-2.0.4-xinetd.diff @@ -135,6 +137,8 @@ install -d $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/ install -m 644 %{S:6} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name} %if 0%{?suse_version} > 1140 install -D -m 0644 %SOURCE7 %{buildroot}/%{_unitdir}/%{name}.service +install -D -m 0644 %SOURCE8 %{buildroot}/%{_unitdir}/%{name}@.service +install -D -m 0644 %SOURCE10 %{buildroot}/%{_unitdir}/%{name}.socket %endif %pre @@ -175,6 +179,8 @@ fi %defattr(-,root,root) %if 0%{?suse_version} > 1140 %{_unitdir}/%{name}.service +%{_unitdir}/%{name}.socket +%{_unitdir}/%{name}@.service %endif /usr/sbin/%name /usr/sbin/rc%name diff --git a/vsftpd@.service b/vsftpd@.service new file mode 100644 index 0000000..99c408f --- /dev/null +++ b/vsftpd@.service @@ -0,0 +1,8 @@ +[Unit] +Description=Very Secure FTP Daemon + +[Service] +Type=simple +ExecStart=/usr/sbin/vsftpd /etc/vsftpd.conf -obackground=NO -olisten=NO -olisten_ipv6=NO +StandardInput=socket +SuccessExitStatus=2