summaryrefslogtreecommitdiffstats
path: root/dbus/dbus-sysdeps-unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'dbus/dbus-sysdeps-unix.c')
-rw-r--r--dbus/dbus-sysdeps-unix.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c
index 2ce7427b..c4866bbb 100644
--- a/dbus/dbus-sysdeps-unix.c
+++ b/dbus/dbus-sysdeps-unix.c
@@ -1643,7 +1643,7 @@ _dbus_credentials_add_from_current_process (DBusCredentials *credentials)
if (!_dbus_credentials_add_unix_pid(credentials, _dbus_getpid()))
return FALSE;
- if (!_dbus_credentials_add_unix_uid(credentials, _dbus_getuid()))
+ if (!_dbus_credentials_add_unix_uid(credentials, _dbus_geteuid()))
return FALSE;
return TRUE;
@@ -1664,7 +1664,7 @@ dbus_bool_t
_dbus_append_user_from_current_process (DBusString *str)
{
return _dbus_string_append_uint (str,
- _dbus_getuid ());
+ _dbus_geteuid ());
}
/**
@@ -1686,6 +1686,15 @@ _dbus_getuid (void)
return getuid ();
}
+/** Gets our effective UID
+ * @returns process effective UID
+ */
+dbus_uid_t
+_dbus_geteuid (void)
+{
+ return geteuid ();
+}
+
/**
* The only reason this is separate from _dbus_getpid() is to allow it
* on Windows for logging but not for other purposes.