termux-packages/x11-packages/xorg-server-xvfb/xorg-server-1.20.1_hw_xfree86_xorg-wrapper.c.patch

28 lines
1.1 KiB
Diff
Raw Normal View History

diff -uNr xorg-server-1.20.1/hw/xfree86/xorg-wrapper.c xorg-server-1.20.1.mod/hw/xfree86/xorg-wrapper.c
--- xorg-server-1.20.1/hw/xfree86/xorg-wrapper.c 2018-08-07 19:31:04.000000000 +0300
+++ xorg-server-1.20.1.mod/hw/xfree86/xorg-wrapper.c 2018-10-03 00:50:13.091358398 +0300
@@ -251,23 +251,6 @@
}
#endif
- /* If we've found cards, and all cards support kms, drop root rights */
- if (needs_root_rights == 0 || (total_cards && kms_cards == total_cards)) {
- gid_t realgid = getgid();
- uid_t realuid = getuid();
-
- if (setresgid(-1, realgid, realgid) != 0) {
- fprintf(stderr, "%s: Could not drop setgid privileges: %s\n",
- progname, strerror(errno));
- exit(1);
- }
- if (setresuid(-1, realuid, realuid) != 0) {
- fprintf(stderr, "%s: Could not drop setuid privileges: %s\n",
- progname, strerror(errno));
- exit(1);
- }
- }
-
snprintf(buf, sizeof(buf), "%s/Xorg", SUID_WRAPPER_DIR);
/* Check if the server is executable by our real uid */