* 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