aboutsummaryrefslogtreecommitdiffstats
path: root/main/vsftpd/vsftpd-clearenv.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/vsftpd/vsftpd-clearenv.patch')
-rw-r--r--main/vsftpd/vsftpd-clearenv.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/main/vsftpd/vsftpd-clearenv.patch b/main/vsftpd/vsftpd-clearenv.patch
new file mode 100644
index 0000000000..748cc9481b
--- /dev/null
+++ b/main/vsftpd/vsftpd-clearenv.patch
@@ -0,0 +1,21 @@
+diff -ru vsftpd-3.0.2.orig/sysdeputil.c vsftpd-3.0.2/sysdeputil.c
+--- vsftpd-3.0.2.orig/sysdeputil.c 2014-06-19 15:54:37.000000000 -0300
++++ vsftpd-3.0.2/sysdeputil.c 2014-06-19 16:31:14.267550219 -0300
+@@ -37,6 +37,7 @@
+
+ #include <sys/prctl.h>
+ #include <signal.h>
++#include <stdlib.h>
+
+ /* Configuration.. here are the possibilities */
+ #undef VSF_SYSDEP_HAVE_CAPABILITIES
+@@ -931,7 +932,8 @@
+ p_env++;
+ }
+ /* Oops :-) */
+- environ = 0;
++ /* environ = 0; */
++ clearenv();
+ s_p_proctitle = (char*) argv[0];
+ vsf_sysutil_memclr(s_p_proctitle, s_proctitle_space);
+ }