aboutsummaryrefslogtreecommitdiff
path: root/pax-mark-vm.in
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2013-05-08 12:52:58 +0200
committerGuido Günther <agx@sigxcpu.org>2013-05-08 12:52:58 +0200
commit9a8e56049ebf9f0878c7fe3efc0921df8aa6a0ba (patch)
tree7d61a00fa8d6ec4667663370cc42b04be03ec569 /pax-mark-vm.in
Imported Upstream version 7u21-2.3.9upstream/7u21-2.3.9upstream
Diffstat (limited to 'pax-mark-vm.in')
-rw-r--r--pax-mark-vm.in13
1 files changed, 13 insertions, 0 deletions
diff --git a/pax-mark-vm.in b/pax-mark-vm.in
new file mode 100644
index 0000000..118bb61
--- /dev/null
+++ b/pax-mark-vm.in
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+# Taken from Gentoo's pax-utils.eclass
+list_paxables() {
+ file "$@" 2> /dev/null | grep -E 'ELF.*(executable|shared object)' | sed -e 's/: .*$//'
+}
+
+if test "@PAX_COMMAND@" != "not specified"; then
+ for paxable in `list_paxables "${1}"/bin/* "${1}"/jre/bin/*`; do
+ echo "PaX mark @PAX_COMMAND_ARGS@ ${paxable}"
+ @PAX_COMMAND@ @PAX_COMMAND_ARGS@ "${paxable}"
+ done
+fi