summaryrefslogtreecommitdiff
path: root/x11-servers/xorg-server/files/hw_xfree86_Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'x11-servers/xorg-server/files/hw_xfree86_Makefile.am')
-rw-r--r--x11-servers/xorg-server/files/hw_xfree86_Makefile.am14
1 files changed, 14 insertions, 0 deletions
diff --git a/x11-servers/xorg-server/files/hw_xfree86_Makefile.am b/x11-servers/xorg-server/files/hw_xfree86_Makefile.am
new file mode 100644
index 000000000000..6d9e0a0d26c6
--- /dev/null
+++ b/x11-servers/xorg-server/files/hw_xfree86_Makefile.am
@@ -0,0 +1,14 @@
+* Don't overwrite Xorg binary with Xorg.sh when SUID_WRAPPER_DIR == bindir
+* Instead, relink bin/X to Xorg.wrap rather than to Xorg (which isn't Xorg.sh)
+*
+--- hw/xfree86/Makefile.am.orig 2017-03-16 05:24:43 UTC
++++ hw/xfree86/Makefile.am
+@@ -114,7 +114,7 @@ endif
+ if SUID_WRAPPER
+ $(MKDIR_P) $(DESTDIR)$(SUID_WRAPPER_DIR)
+ mv $(DESTDIR)$(bindir)/Xorg $(DESTDIR)$(SUID_WRAPPER_DIR)/Xorg
+- ${INSTALL} -m 755 Xorg.sh $(DESTDIR)$(bindir)/Xorg
++ (test ! -f $(DESTDIR)$(bindir)/Xorg && ${INSTALL} -m 755 Xorg.sh $(DESTDIR)$(bindir)/Xorg || cd $(DESTDIR)$(bindir) && rm -f X && $(LN_S) Xorg.wrap$(EXEEXT) X)
+ -chown 0 $(DESTDIR)$(SUID_WRAPPER_DIR)/Xorg.wrap && chmod u+s $(DESTDIR)$(SUID_WRAPPER_DIR)/Xorg.wrap
+ endif
+