Blame SOURCES/0001-Fedora-hack-Make-the-suid-root-wrapper-always-start-.patch

877270
From 38ae53c94a88c7bd5877c72a12582b60865e07ff Mon Sep 17 00:00:00 2001
877270
From: Hans de Goede <hdegoede@redhat.com>
877270
Date: Thu, 17 Apr 2014 15:50:44 +0200
877270
Subject: [PATCH] Fedora hack: Make the suid-root wrapper start the server with
877270
 root rights
877270
877270
Do NOT upstream.
877270
877270
Since most display managers are not ready yet to start Xorg in way which will
877270
keep it working without root-rights, see:
877270
https://fedoraproject.org/wiki/Changes/XorgWithoutRootRights
877270
877270
Just keep starting X as root for now, but do it through the wrapper, by
877270
overriding the needs_root_rights = -1 (auto) default and setting it to 1.
877270
877270
We set a special environment variable when starting X in a way where root
877270
rights are not needed (from gdm and startx) and keep the upstream
877270
needs_root_rights = -1 (auto) default in that case.
877270
877270
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
877270
---
877270
 hw/xfree86/xorg-wrapper.c | 3 +++
877270
 1 file changed, 3 insertions(+)
877270
877270
diff --git a/hw/xfree86/xorg-wrapper.c b/hw/xfree86/xorg-wrapper.c
877270
index 4c37cfc..ae5d27f 100644
877270
--- a/hw/xfree86/xorg-wrapper.c
877270
+++ b/hw/xfree86/xorg-wrapper.c
877270
@@ -198,6 +198,9 @@ int main(int argc, char *argv[])
877270
     int needs_root_rights = -1;
877270
     char *const empty_envp[1] = { NULL, };
877270
 
877270
+    if (getenv("XORG_RUN_AS_USER_OK") == NULL)
877270
+        needs_root_rights = 1;
877270
+
877270
     progname = argv[0];
877270
 
877270
     parse_config(&allowed, &needs_root_rights);
877270
-- 
877270
2.4.3
877270