summaryrefslogtreecommitdiff
path: root/dbus/dbus-sysdeps.c
diff options
context:
space:
mode:
Diffstat (limited to 'dbus/dbus-sysdeps.c')
-rw-r--r--dbus/dbus-sysdeps.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/dbus/dbus-sysdeps.c b/dbus/dbus-sysdeps.c
index 04fb8d76..976c7e4b 100644
--- a/dbus/dbus-sysdeps.c
+++ b/dbus/dbus-sysdeps.c
@@ -182,12 +182,18 @@ _dbus_setenv (const char *varname,
const char*
_dbus_getenv (const char *varname)
{
+#if defined(HAVE_SECURE_GETENV)
+ return secure_getenv (varname);
+#elif defined(HAVE___SECURE_GETENV)
+ return __secure_getenv (varname);
+#else
/* Don't respect any environment variables if the current process is
* setuid. This is the equivalent of glibc's __secure_getenv().
*/
if (_dbus_check_setuid ())
return NULL;
return getenv (varname);
+#endif
}
/**