Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Apr 2017 15:44:24 +0000 (UTC)
From:      Ben Woods <woodsb02@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r438362 - in head/x11/lightdm: . files
Message-ID:  <201704121544.v3CFiOGL004975@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: woodsb02
Date: Wed Apr 12 15:44:24 2017
New Revision: 438362
URL: https://svnweb.freebsd.org/changeset/ports/438362

Log:
  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

Modified:
  head/x11/lightdm/Makefile
  head/x11/lightdm/files/patch-src_process.c

Modified: head/x11/lightdm/Makefile
==============================================================================
--- head/x11/lightdm/Makefile	Wed Apr 12 15:23:26 2017	(r438361)
+++ head/x11/lightdm/Makefile	Wed Apr 12 15:44:24 2017	(r438362)
@@ -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/
 

Modified: head/x11/lightdm/files/patch-src_process.c
==============================================================================
--- head/x11/lightdm/files/patch-src_process.c	Wed Apr 12 15:23:26 2017	(r438361)
+++ head/x11/lightdm/files/patch-src_process.c	Wed Apr 12 15:44:24 2017	(r438362)
@@ -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);
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201704121544.v3CFiOGL004975>