From ede4e4514698612e226763ea8b6ae8ce13f2173d Mon Sep 17 00:00:00 2001 From: "John (J5) Palmieri" Date: Mon, 14 Jan 2008 15:07:48 -0500 Subject: add _dbus_geteuid to fix EXTERNAL authentication in setuid applications 2008-01-14 John (J5) Palmieri * Patch by Andrea Luzzardi : creates a _dbus_geteuid function to fix EXTERNAL authentication in setuid applications * dbus/dbus-sysdeps-unix.c (_dbus_geteuid): used to get the effective uid of the running program (_dbus_credentials_add_from_current_process): use geteuid instead of getuid (_dbus_append_user_from_current_process): use geteuid instead of getuid * dbus/dbus-sysdeps-util-unix.c (_dbus_change_to_daemon_user): use geteuid instead of getuid (_dbus_unix_user_is_at_console): use geteuid instead of getuid * dbus/dbus-sysdeps-win.c (_dbus_geteuid): add a windows equivilant that returns DBUS_UID_UNSET --- dbus/dbus-sysdeps-win.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'dbus/dbus-sysdeps-win.c') diff --git a/dbus/dbus-sysdeps-win.c b/dbus/dbus-sysdeps-win.c index 3c6c31be..a67e502a 100644 --- a/dbus/dbus-sysdeps-win.c +++ b/dbus/dbus-sysdeps-win.c @@ -834,7 +834,16 @@ out1: * @returns process UID */ dbus_uid_t -_dbus_getuid(void) +_dbus_getuid (void) +{ + return DBUS_UID_UNSET; +} + +/** Gets our effective UID + * @returns process effective UID + */ +dbus_uid_t +_dbus_geteuid (void) { return DBUS_UID_UNSET; } -- cgit