[-]
[+]
|
Changed |
project.diff
|
@@ -8,10 +8,13 @@
Source4: README.SUSE
Source5: %{name}.xml
Source6: %{name}.firewall
-@@ -56,11 +57,15 @@ Patch15: vsftpd-enable-dev-log-se
+@@ -56,11 +57,18 @@ Patch15: vsftpd-enable-dev-log-se
Patch16: vsftpd-root-squashed-chroot.patch
#PATCH-FIX-UPSTREAM: bnc#870122
Patch17: vsftpd-enable-gettimeofday-sec.patch
++
++Patch50: vsftpd-3.0.2-pidfile.patch
++
+%if 0%{?suse_version} >= 1230
BuildRequires: gpg-offline
+%endif
@@ -24,7 +27,7 @@
Requires: logrotate
Requires(pre): %{_sbindir}/useradd
Provides: ftp-server
-@@ -79,7 +84,9 @@ vsftpd was always faster, supporting ove
+@@ -79,7 +87,9 @@ vsftpd was always faster, supporting ove
tests.
%prep
@@ -34,7 +37,16 @@
%setup -q
%patch1
%patch3 -p1
-@@ -114,10 +121,15 @@ install -D -m 644 $RPM_SOURCE_DIR/%{name
+@@ -98,6 +108,8 @@ tests.
+ %patch16 -p1
+ %patch17 -p1
+
++%patch50 -p0
++
+ %build
+ %define seccomp_opts -D_GNU_SOURCE -DUSE_SECCOMP
+ rm -f dummyinc/sys/capability.h
+@@ -114,10 +126,15 @@ install -D -m 644 $RPM_SOURCE_DIR/%{name
install -D -m 644 $RPM_SOURCE_DIR/%{name}.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
install -D -m 644 %{name}.conf.5 %{buildroot}/%{_mandir}/man5/%{name}.conf.5
install -D -m 644 %{name}.8 %{buildroot}/%{_mandir}/man8/%{name}.8
@@ -50,7 +62,7 @@
install -d %{buildroot}/%{_datadir}/omc/svcinfo.d/
install -D -m 644 %{SOURCE5} %{buildroot}/%{_datadir}/omc/svcinfo.d/
install -d %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/
-@@ -125,22 +137,41 @@ install -m 644 %{SOURCE6} %{buildroot}%{
+@@ -125,22 +142,41 @@ install -m 644 %{SOURCE6} %{buildroot}%{
%pre
%{_sbindir}/useradd -r -g nogroup -s /bin/false -c "Secure FTP User" -d %{_localstatedir}/lib/empty ftpsecure 2> /dev/null || :
|
[-]
[+]
|
Added |
vsftpd-3.0.2-pidfile.patch
^
|
@@ -0,0 +1,48 @@
+--- oneprocess.c.orig 2014-08-27 17:23:16.745533649 +0200
++++ oneprocess.c 2014-08-27 17:26:13.569600383 +0200
+@@ -108,6 +108,21 @@
+ seccomp_sandbox_init();
+ seccomp_sandbox_setup_postlogin(p_sess);
+ seccomp_sandbox_lockdown();
++
++ pid_t pid;
++ FILE *pidf;
++ pid = getpid();
++ if (pid > 0) {
++ pidf = fopen ("/var/run/vsftpd/vsftpd.pid", "w");
++ if (!pidf) {
++ openlog("vsftpd", LOG_PID, LOG_DAEMON);
++ syslog(LOG_ERR, "Can't write PID %d to /var/run/vsftpd/vsftpd.pid", (int)pid);
++ } else {
++ fprintf(pidf, "%d\n", (int)pid);
++ fclose(pidf);
++ }
++ }
++
+ init_connection(p_sess);
+ }
+
+--- twoprocess.c.orig 2014-08-27 17:23:25.037527532 +0200
++++ twoprocess.c 2014-08-27 17:26:35.281614929 +0200
+@@ -139,6 +139,21 @@
+ seccomp_sandbox_init();
+ seccomp_sandbox_setup_prelogin(p_sess);
+ seccomp_sandbox_lockdown();
++
++ pid_t pid;
++ FILE *pidf;
++ pid = getpid();
++ if (pid > 0) {
++ pidf = fopen ("/var/run/vsftpd/vsftpd.pid", "w");
++ if (!pidf) {
++ openlog("vsftpd", LOG_PID, LOG_DAEMON);
++ syslog(LOG_ERR, "Can't write PID %d to /var/run/vsftpd/vsftpd.pid", (int)pid);
++ } else {
++ fprintf(pidf, "%d\n", (int)pid);
++ fclose(pidf);
++ }
++ }
++
+ init_connection(p_sess);
+ /* NOTREACHED */
+ }
|
[-]
[+]
|
Changed |
vsftpd.init
^
|
@@ -24,8 +24,8 @@
#
### BEGIN INIT INFO
# Provides: ftpd
-# Required-Start: $syslog network-remotefs
-# Required-Stop: $syslog network-remotefs
+# Required-Start: $syslog $remote_fs network-remotefs
+# Required-Stop: $syslog $remote_fs network-remotefs
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Description: very secure ftp daemon
@@ -52,6 +52,9 @@
rc_reset
+mkdir -p /var/run/vsftpd
+chown ftpsecure:nogroup /var/run/vsftpd || :
+
case "$1" in
start)
echo -n "Starting vsftpd "
|