diff options
author | 2013-01-11 03:08:39 +0000 | |
---|---|---|
committer | 2013-01-11 03:08:39 +0000 | |
commit | 9a2b09eaf24fa19cbf2d5831b065a2922c1d0f44 (patch) | |
tree | 58336fb73d92190c8f679aea294a1dcde08c6403 /sys-auth/polkit/files | |
parent | Version bump. (diff) | |
download | gentoo-2-9a2b09eaf24fa19cbf2d5831b065a2922c1d0f44.tar.gz gentoo-2-9a2b09eaf24fa19cbf2d5831b065a2922c1d0f44.tar.bz2 gentoo-2-9a2b09eaf24fa19cbf2d5831b065a2922c1d0f44.zip |
old
(Portage version: 2.2.0_alpha149/cvs/Linux x86_64, signed Manifest commit with key 4868F14D)
Diffstat (limited to 'sys-auth/polkit/files')
-rw-r--r-- | sys-auth/polkit/files/polkit-0.109-XAUTHORITY-fallback.patch | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/sys-auth/polkit/files/polkit-0.109-XAUTHORITY-fallback.patch b/sys-auth/polkit/files/polkit-0.109-XAUTHORITY-fallback.patch deleted file mode 100644 index cf00b929c021..000000000000 --- a/sys-auth/polkit/files/polkit-0.109-XAUTHORITY-fallback.patch +++ /dev/null @@ -1,58 +0,0 @@ -From d6acecdd0ebb42e28ff28e04e0207cb01fa20910 Mon Sep 17 00:00:00 2001 -From: David Zeuthen <zeuthen@gmail.com> -Date: Wed, 19 Dec 2012 19:28:29 +0000 -Subject: Set XAUTHORITY environment variable if is unset - -The way it works is that if XAUTHORITY is unset, then its default -value is $HOME/.Xauthority. But since we're changing user identity -this will not work since $HOME will now change. Therefore, if -XAUTHORITY is unset, just set its default value before changing -identity. This bug only affected login managers using X Window -Authorization but not explicitly setting the XAUTHORITY variable. - -You can argue that XAUTHORITY is broken since it forces uid-changing -apps like pkexec(1) to do more work - and get involved in intimate -details of how X works and so on - but that doesn't change how things -work. - -Based on a patch from Peter Wu <lekensteyn@gmail.com>. - -https://bugs.freedesktop.org/show_bug.cgi?id=51623 - -Signed-off-by: David Zeuthen <zeuthen@gmail.com> ---- -diff --git a/src/programs/pkexec.c b/src/programs/pkexec.c -index 840eb3c..da9784a 100644 ---- a/src/programs/pkexec.c -+++ b/src/programs/pkexec.c -@@ -608,6 +608,28 @@ main (int argc, char *argv[]) - g_ptr_array_add (saved_env, g_strdup (value)); - } - -+ /* $XAUTHORITY is "special" - if unset, we need to set it to ~/.Xauthority. Yes, -+ * this is broken but it's unfortunately how things work (see fdo #51623 for -+ * details) -+ */ -+ if (g_getenv ("XAUTHORITY") == NULL) -+ { -+ const gchar *home; -+ -+ /* pre-2.36 GLib does not examine $HOME (it always looks in /etc/passwd) and -+ * this is not what we want -+ */ -+ home = g_getenv ("HOME"); -+ if (home == NULL) -+ home = g_get_home_dir (); -+ -+ if (home != NULL) -+ { -+ g_ptr_array_add (saved_env, g_strdup ("XAUTHORITY")); -+ g_ptr_array_add (saved_env, g_build_filename (home, ".Xauthority", NULL)); -+ } -+ } -+ - /* Nuke the environment to get a well-known and sanitized environment to avoid attacks - * via e.g. the DBUS_SYSTEM_BUS_ADDRESS environment variable and similar. - */ --- -cgit v0.9.0.2-2-gbebe |