1 Star 0 Fork 44

丈青山/xorg-x11-server

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0001-Fedora-hack-Make-the-suid-root-wrapper-always-start-.patch 1.34 KB
一键复制 编辑 原始数据 按行查看 历史
t.feng 提交于 2020-03-16 22:51 . patch init
From 38ae53c94a88c7bd5877c72a12582b60865e07ff Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Thu, 17 Apr 2014 15:50:44 +0200
Subject: [PATCH] Fedora hack: Make the suid-root wrapper start the server with
root rights
Do NOT upstream.
Since most display managers are not ready yet to start Xorg in way which will
keep it working without root-rights, see:
https://fedoraproject.org/wiki/Changes/XorgWithoutRootRights
Just keep starting X as root for now, but do it through the wrapper, by
overriding the needs_root_rights = -1 (auto) default and setting it to 1.
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
needs_root_rights = -1 (auto) default in that case.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
hw/xfree86/xorg-wrapper.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/hw/xfree86/xorg-wrapper.c b/hw/xfree86/xorg-wrapper.c
index 4c37cfc..ae5d27f 100644
--- a/hw/xfree86/xorg-wrapper.c
+++ b/hw/xfree86/xorg-wrapper.c
@@ -198,6 +198,9 @@ int main(int argc, char *argv[])
int needs_root_rights = -1;
char *const empty_envp[1] = { NULL, };
+ if (getenv("XORG_RUN_AS_USER_OK") == NULL)
+ needs_root_rights = 1;
+
progname = argv[0];
parse_config(&allowed, &needs_root_rights);
--
2.4.3
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhang__3125/xorg-x11-server.git
git@gitee.com:zhang__3125/xorg-x11-server.git
zhang__3125
xorg-x11-server
xorg-x11-server
master

搜索帮助