Commit 375cbee1 authored by Simon McVittie's avatar Simon McVittie Committed by Philip Withnall
Browse files

gdbus: Rename a variable to be less misleading

We're using "setuid" here as shorthand for any elevated privileges
that should make us distrust the caller: setuid, setgid, filesystem
capabilities, more obscure Linux things that set the AT_SECURE flag
(such as certain AppArmor transitions), and their equivalents on
other operating systems. This is fine if we do it consistently, but
I'm about to add a check for whether we are *literally* setuid,
which would be particularly confusing without a rename.
Signed-off-by: Simon McVittie's avatarSimon McVittie <>
parent 72eadbde
......@@ -1280,7 +1280,7 @@ g_dbus_address_get_for_bus_sync (GBusType bus_type,
GCancellable *cancellable,
GError **error)
gboolean is_setuid = GLIB_PRIVATE_CALL (g_check_setuid) ();
gboolean has_elevated_privileges = GLIB_PRIVATE_CALL (g_check_setuid) ();
gchar *ret, *s = NULL;
const gchar *starter_bus;
GError *local_error;
......@@ -1324,7 +1324,7 @@ g_dbus_address_get_for_bus_sync (GBusType bus_type,
switch (bus_type)
if (is_setuid)
if (has_elevated_privileges)
ret = NULL;
ret = g_strdup (g_getenv ("DBUS_SYSTEM_BUS_ADDRESS"));
......@@ -1336,7 +1336,7 @@ g_dbus_address_get_for_bus_sync (GBusType bus_type,
if (is_setuid)
if (has_elevated_privileges)
ret = NULL;
ret = g_strdup (g_getenv ("DBUS_SESSION_BUS_ADDRESS"));
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment