https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
8 lines
117 B
Bash
8 lines
117 B
Bash
# PaX-mark binaries.
|
|
paxmark() {
|
|
local flags="$1"
|
|
shift
|
|
|
|
paxctl -c "$@"
|
|
paxctl -zex -${flags} "$@"
|
|
}
|