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

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