Modify the server wrapper to not always start the server as root.
Callers of the server which start it in a way which is compatible with the server running without root rights can now set a XORG_RUN_AS_USER_OK env variable and then the wrapper will behave as if needs_root_rights = auto is specified, unless overriden from Xwrapper.config
This commit is contained in:
parent
5a00d433eb
commit
aaf1923ce2
@ -1,8 +1,8 @@
|
|||||||
From 17830918f1bebf3696c6660f602de84d3efeb1ac Mon Sep 17 00:00:00 2001
|
From 17830918f1bebf3696c6660f602de84d3efeb1ac Mon Sep 17 00:00:00 2001
|
||||||
From: Hans de Goede <hdegoede@redhat.com>
|
From: Hans de Goede <hdegoede@redhat.com>
|
||||||
Date: Thu, 17 Apr 2014 15:50:44 +0200
|
Date: Thu, 17 Apr 2014 15:50:44 +0200
|
||||||
Subject: [PATCH] Fedora hack: Make the suid-root wrapper always start the
|
Subject: [PATCH] Fedora hack: Make the suid-root wrapper start the server
|
||||||
server with root rights
|
with root rights
|
||||||
|
|
||||||
Do NOT upstream.
|
Do NOT upstream.
|
||||||
|
|
||||||
@ -10,14 +10,12 @@ Since most display managers are not ready yet to start Xorg in way which will
|
|||||||
keep it working without root-rights, see:
|
keep it working without root-rights, see:
|
||||||
https://fedoraproject.org/wiki/Changes/XorgWithoutRootRights
|
https://fedoraproject.org/wiki/Changes/XorgWithoutRootRights
|
||||||
|
|
||||||
Just keep starting X as root for now, but do it through the wrapper. This
|
Just keep starting X as root for now, but do it through the wrapper, by
|
||||||
allows people who want to test Xorg without root rights to create a
|
overriding the needs_root_rights = -1 (auto) default and setting it to 1.
|
||||||
/etc/X11/Xwrapper.config file with:
|
|
||||||
|
|
||||||
needs_root_rights = auto
|
We set a special environment variable when starting X in a way where root
|
||||||
|
rights are not needed (from gdm and startx) and keep the upstream
|
||||||
In there to test XorgWithoutRootRights without breaking people's setups due
|
needs_root_rights = -1 (auto) default in that case.
|
||||||
to non ready display-managers.
|
|
||||||
|
|
||||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||||
---
|
---
|
||||||
@ -28,15 +26,16 @@ diff --git a/hw/xfree86/xorg-wrapper.c b/hw/xfree86/xorg-wrapper.c
|
|||||||
index 90c8c11..539bfe4 100644
|
index 90c8c11..539bfe4 100644
|
||||||
--- a/hw/xfree86/xorg-wrapper.c
|
--- a/hw/xfree86/xorg-wrapper.c
|
||||||
+++ b/hw/xfree86/xorg-wrapper.c
|
+++ b/hw/xfree86/xorg-wrapper.c
|
||||||
@@ -153,7 +153,7 @@ int main(int argc, char *argv[])
|
@@ -191,6 +191,9 @@ int main(int argc, char *argv[])
|
||||||
int kms_cards = 0;
|
|
||||||
int total_cards = 0;
|
|
||||||
int allowed = CONSOLE_ONLY;
|
int allowed = CONSOLE_ONLY;
|
||||||
- int needs_root_rights = -1;
|
int needs_root_rights = -1;
|
||||||
+ int needs_root_rights = 1;
|
|
||||||
|
|
||||||
|
+ if (getenv("XORG_RUN_AS_USER_OK") == NULL)
|
||||||
|
+ needs_root_rights = 1;
|
||||||
|
+
|
||||||
progname = argv[0];
|
progname = argv[0];
|
||||||
|
|
||||||
|
parse_config(&allowed, &needs_root_rights);
|
||||||
--
|
--
|
||||||
1.9.0
|
1.9.0
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
Summary: X.Org X11 X server
|
Summary: X.Org X11 X server
|
||||||
Name: xorg-x11-server
|
Name: xorg-x11-server
|
||||||
Version: 1.17.1
|
Version: 1.17.1
|
||||||
Release: 6%{?gitdate:.%{gitdate}}%{dist}
|
Release: 7%{?gitdate:.%{gitdate}}%{dist}
|
||||||
URL: http://www.x.org
|
URL: http://www.x.org
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: User Interface/X
|
Group: User Interface/X
|
||||||
@ -640,6 +640,13 @@ find %{inst_srcdir}/hw/xfree86 -name \*.c -delete
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Mar 18 2015 Hans de Goede <hdegoede@redhat.com> - 1.17.1-7
|
||||||
|
- Modify the server wrapper to not always start the server as root.
|
||||||
|
Callers of the server which start it in a way which is compatible with the
|
||||||
|
server running without root rights can now set a XORG_RUN_AS_USER_OK env
|
||||||
|
variable and then the wrapper will behave as if needs_root_rights = auto
|
||||||
|
is specified, unless overriden from Xwrapper.config
|
||||||
|
|
||||||
* Wed Mar 04 2015 Adam Jackson <ajax@redhat.com> 1.17.1-6
|
* Wed Mar 04 2015 Adam Jackson <ajax@redhat.com> 1.17.1-6
|
||||||
- Fix int10 interrupt vector setup
|
- Fix int10 interrupt vector setup
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user