aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/24.3/04_all_pax-xattr.patch')
-rw-r--r--emacs/24.3/04_all_pax-xattr.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/emacs/24.3/04_all_pax-xattr.patch b/emacs/24.3/04_all_pax-xattr.patch
new file mode 100644
index 0000000..90346ba
--- /dev/null
+++ b/emacs/24.3/04_all_pax-xattr.patch
@@ -0,0 +1,45 @@
+Fix failure in unexec with hardened Linux kernel and XATTR_PAX_FLAGS=y.
+https://bugs.gentoo.org/456970
+
+--- emacs-24.3-orig/configure.ac
++++ emacs-24.3/configure.ac
+@@ -790,6 +790,18 @@
+ fi
+ fi
+
++AC_PATH_PROG(SETFATTR, setfattr)
++if test "X$SETFATTR" != X; then
++ AC_MSG_CHECKING([whether extended attributes are supported])
++ touch conftest.tmp
++ if $SETFATTR -n user.pax.flags conftest.tmp >/dev/null 2>&1; then
++ AC_MSG_RESULT(yes)
++ else
++ AC_MSG_RESULT(no); SETFATTR=""
++ fi
++ rm -f conftest.tmp
++fi
++
+ ## Need makeinfo >= 4.7 (?) to build the manuals.
+ AC_PATH_PROG(MAKEINFO, makeinfo, no)
+ dnl By this stage, configure has already checked for egrep and set EGREP,
+--- emacs-24.3-orig/src/Makefile.in
++++ emacs-24.3/src/Makefile.in
+@@ -115,6 +115,9 @@
+ ## memory randomization in temacs with "paxctl -r". See bug#11398.
+ PAXCTL = @PAXCTL@
+
++## If available, the full path to the setfattr program.
++SETFATTR = @SETFATTR@
++
+ ## Some systems define this to request special libraries.
+ LIBS_SYSTEM=@LIBS_SYSTEM@
+
+@@ -467,6 +470,8 @@
+ -o temacs $(START_FILES) $(obj) $(otherobj) $(lib)/libgnu.a $(LIBES)
+ test "$(CANNOT_DUMP)" = "yes" || \
+ test "X$(PAXCTL)" = X || $(PAXCTL) -r temacs$(EXEEXT)
++ test "$(CANNOT_DUMP)" = "yes" || test "X$(SETFATTR)" = X || \
++ $(SETFATTR) -n user.pax.flags -v r temacs$(EXEEXT)
+
+ ## The following oldxmenu-related rules are only (possibly) used if
+ ## HAVE_X11 && !USE_GTK, but there is no harm in always defining them