aboutsummaryrefslogtreecommitdiff
path: root/pax-mark-vm.in
blob: 118bb617346354dc1250dc640445cd343f2c99a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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