aboutsummaryrefslogtreecommitdiffstats
path: root/main/vsftpd/vsftpd-clearenv.patch
blob: 748cc9481bf973e0ed4fb893074bd1f482a2dbad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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);
 }