@@ -1,31 +1,20 @@
---- oneprocess.c.orig 2014-08-27 17:23:16.745533649 +0200
-+++ oneprocess.c 2014-08-27 17:35:44.639397879 +0200
-@@ -108,6 +108,19 @@
- 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);
- }
+--- main.c.orig 2012-09-16 06:27:13.000000000 +0200
++++ main.c 2014-08-27 18:08:44.355514485 +0200
+@@ -5,6 +5,10 @@
+ * main.c
+ */
---- twoprocess.c.orig 2014-08-27 17:23:25.037527532 +0200
-+++ twoprocess.c 2014-08-27 17:36:13.910612688 +0200
-@@ -139,6 +139,19 @@
- seccomp_sandbox_init();
- seccomp_sandbox_setup_prelogin(p_sess);
- seccomp_sandbox_lockdown();
++#include <stdio.h>
++#include <unistd.h>
++#include <syslog.h>
++
+ #include "session.h"
+ #include "utility.h"
+ #include "tunables.h"
+@@ -243,6 +247,19 @@
+ tunable_chown_uploads = 0;
+ }
+ }
+ pid_t pid;
+ FILE *pidf;
+ pid = getpid();
@@ -39,6 +28,6 @@
+ fclose(pidf);
+ }
+ }
- init_connection(p_sess);
- /* NOTREACHED */
- }
+ if (tunable_one_process_model)
+ {
+ vsf_one_process_start(&the_session);
|