diff options
author | woodsb02 <woodsb02@FreeBSD.org> | 2017-04-12 23:44:24 +0800 |
---|---|---|
committer | woodsb02 <woodsb02@FreeBSD.org> | 2017-04-12 23:44:24 +0800 |
commit | 97c5148e4eeef10b377e06d21daf8cdb8550afd9 (patch) | |
tree | 20dc47899c18e0b7def1a70348d9c5803a7baf93 /x11 | |
parent | 4238d5a9368a6df0e866bc8de62c5c2a39d490e4 (diff) | |
download | freebsd-ports-gnome-97c5148e4eeef10b377e06d21daf8cdb8550afd9.tar.gz freebsd-ports-gnome-97c5148e4eeef10b377e06d21daf8cdb8550afd9.tar.zst freebsd-ports-gnome-97c5148e4eeef10b377e06d21daf8cdb8550afd9.zip |
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
Diffstat (limited to 'x11')
-rw-r--r-- | x11/lightdm/Makefile | 2 | ||||
-rw-r--r-- | x11/lightdm/files/patch-src_process.c | 15 |
2 files changed, 13 insertions, 4 deletions
diff --git a/x11/lightdm/Makefile b/x11/lightdm/Makefile index 4638fc14925c..1095b20c6da1 100644 --- a/x11/lightdm/Makefile +++ b/x11/lightdm/Makefile @@ -3,7 +3,7 @@ PORTNAME= lightdm PORTVERSION= 1.20.0 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= x11 MASTER_SITES= https://launchpad.net/${PORTNAME}/${PORTVERSION:R}/${PORTVERSION}/+download/ 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); + |