aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2012-12-12 17:28:22 +0000
committerAnthony G. Basile <blueness@gentoo.org>2012-12-12 15:00:34 -0500
commitb88d85414facf52baa04e939d19028714ec987f8 (patch)
tree468fc002e722ff604ca7af4498efef2eb4843cb0 /tests
parentAdd logic for NEED_PAX_DECLS when gelf.h is present but lacks them (diff)
downloadelfix-b88d85414facf52baa04e939d19028714ec987f8.tar.gz
elfix-b88d85414facf52baa04e939d19028714ec987f8.tar.bz2
elfix-b88d85414facf52baa04e939d19028714ec987f8.zip
src/paxctl-ng.c: do not use '-' when setting null XATTR PAX flags
There was a bug in the implementation of XATTR PAX flags where it was assumed that '-' would be ignored in kernel. However, anything other than PpEeMmRrSs is considered invalid and results in a fail. See pax_parse_xattr_pax() in fs/binfmt_elf.c for a pax patched kernel. The pxtpax test was updated as well. X-Gentoo-Bug: 446518 X-Gentoo-Bug-URL: https://bugs.gentoo.org/446518
Diffstat (limited to 'tests')
-rwxr-xr-xtests/pxtpax/dotest.sh31
1 files changed, 20 insertions, 11 deletions
diff --git a/tests/pxtpax/dotest.sh b/tests/pxtpax/dotest.sh
index 1003d0a..4e7c371 100755
--- a/tests/pxtpax/dotest.sh
+++ b/tests/pxtpax/dotest.sh
@@ -8,24 +8,33 @@ PAXCTLNG="../../src/paxctl-ng"
${PAXCTLNG} -cv ${DAEMON} 2>&1 1>/dev/null
-echo "xattr process"
-for pf in "p" "P"; do
- for ef in "e" "E"; do
- for mf in "m" "M"; do
- for rf in "r" "R"; do
- for sf in "s" "S"; do
- flags="${pf}${ef}${mf}${rf}${sf}"
- echo -n ${flags} " "
- ${PAXCTLNG} -"${flags}" ${DAEMON} 2>&1 1>/dev/null
+for pf in "p" "P" "-"; do
+ for ef in "e" "E" "-"; do
+ for mf in "m" "M" "-"; do
+ for rf in "r" "R" "-"; do
+ for sf in "s" "S" "-"; do
+
+ pflags="${pf}${ef}${mf}${rf}${sf}"
+ echo "SET TO :" ${pflags}
+
+ flags="${pf/-/Pp}${ef/-/Ee}${mf/-/Mm}${rf/-/Rr}${sf/-/Ss}"
+ ${PAXCTLNG} -"${flags}" ${DAEMON} >/dev/null 2>&1
+
+ sflags=$(${PAXCTLNG} -v ${DAEMON})
+ sflags=$(echo ${sflags} | awk '{print $3}')
+ echo "GOT :" ${sflags}
+
${INITSH} start
if [ -f "${PIDFILE}" ]
then
rflags=$(cat /proc/$(cat ${PIDFILE})/status | grep ^PaX | awk '{ print $2 }')
- echo -n ${rflags}
+ echo -n "RUNNING: "${rflags}
${INITSH} stop
else
- echo -n "no daemon"
+ echo -n "RUNNING: no daemon"
fi
+
+ echo
echo
done
done