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