summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2012-06-21 16:12:46 +1200
committerRobert Ancell <robert.ancell@canonical.com>2012-06-21 16:12:46 +1200
commit8aee58b3a81d6945beedd476a3c84854cc032f1a (patch)
tree8ad5383e217ad92a4b47228a893e94fbc27e040b
parent5b94055c793aada5d5f02b210744ba75e78f0e07 (diff)
downloadlightdm-8aee58b3a81d6945beedd476a3c84854cc032f1a.tar.gz
Handle clearenv() not being defined
-rw-r--r--NEWS4
-rw-r--r--configure.ac2
-rw-r--r--src/process.c5
3 files changed, 10 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index ebfe9517..7ea3b07e 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+Overview of changes in lightdm 1.3.2
+
+ * Handle clearenv() not being defined
+
Overview of changes in lightdm 1.3.1
* Fix wrapper path in AppArmor profile (broken since 1.1.1)
diff --git a/configure.ac b/configure.ac
index f2c133bb..3dfe1d5c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,7 +21,7 @@ dnl ###########################################################################
AC_CHECK_HEADERS(security/pam_appl.h, [], AC_MSG_ERROR(PAM not found))
-AC_CHECK_FUNCS(setresgid setresuid)
+AC_CHECK_FUNCS(setresgid setresuid clearenv)
PKG_CHECK_MODULES(LIGHTDM, [
glib-2.0 >= 2.24
diff --git a/src/process.c b/src/process.c
index 2910cd99..a4246659 100644
--- a/src/process.c
+++ b/src/process.c
@@ -18,6 +18,7 @@
#include <signal.h>
#include <grp.h>
#include <glib/gstdio.h>
+#include <config.h>
#include "process.h"
@@ -158,7 +159,11 @@ process_run (Process *process)
}
if (process->priv->clear_environment)
+#ifdef HAVE_CLEARENV
clearenv ();
+#else
+ environ = NULL;
+#endif
g_hash_table_iter_init (&iter, process->priv->env);
while (g_hash_table_iter_next (&iter, &key, &value))