From 1c5651c00b83d6fdf9f2c1bd0edd0c440e01ef30 Mon Sep 17 00:00:00 2001 From: Ben Woods Date: Wed, 12 Apr 2017 15:44:24 +0000 Subject: x11/lightdm: Use correct replacement for clearenv() The previous patch to replace the Linux clearenv(3) function did not actually clear the environment, but instead created a new environment variable named environ with the value "NULL". PR: 218564 Reported by: jbeich Obtained from: FreeBSD env(1) command MFH: 2017Q2 --- x11/lightdm/files/patch-src_process.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'x11/lightdm/files') diff --git a/x11/lightdm/files/patch-src_process.c b/x11/lightdm/files/patch-src_process.c index df43c5e4d2e3..b285bd8a30ed 100644 --- a/x11/lightdm/files/patch-src_process.c +++ b/x11/lightdm/files/patch-src_process.c @@ -1,11 +1,20 @@ ---- src/process.c.orig 2016-12-08 21:38:14 UTC +--- src/process.c.orig 2017-04-12 15:33:03 UTC +++ src/process.c -@@ -231,7 +231,7 @@ process_start (Process *process, gboolea +@@ -228,11 +228,16 @@ process_start (Process *process, gboolean block) + + /* Set environment */ + if (process->priv->clear_environment) ++ { #ifdef HAVE_CLEARENV clearenv (); #else - environ = NULL; -+ putenv ("environ=NULL"); ++ extern char **environ; ++ char *cleanenv[1]; ++ environ = cleanenv; ++ cleanenv[0] = NULL; #endif ++ } for (i = 0; i < env_length; i++) setenv (env_keys[i], env_values[i], TRUE); + -- cgit v1.2.3