aboutsummaryrefslogtreecommitdiffstats
path: root/main/paxmark
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2017-07-24 15:29:46 +0000
committerJakub Jirutka <jakub@jirutka.cz>2017-07-28 01:03:56 +0200
commit18308a6e42b82ad5a6c3ddf46c63c6601b9fac84 (patch)
treec07aec3a4de527c3b9a194a3719ff11934fadd31 /main/paxmark
parent831eb5589dc9d1ef397f27c9c4e402e82f8bda57 (diff)
downloadaports-18308a6e42b82ad5a6c3ddf46c63c6601b9fac84.tar.bz2
aports-18308a6e42b82ad5a6c3ddf46c63c6601b9fac84.tar.xz
main/paxmark: follow POSIX with 'return' vs 'exit'
The 'return' builtin is used for functions and dot scripts only: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#return This means that paxmark has undefined behaviour. When /bin/sh is bash, an error is output: /usr/sbin/paxmark: line 32: return: can only `return' from a function or sourced script This commit replaces 'return' with POSIX standard 'exit'.
Diffstat (limited to 'main/paxmark')
-rw-r--r--main/paxmark/APKBUILD6
-rw-r--r--main/paxmark/paxmark4
2 files changed, 4 insertions, 6 deletions
diff --git a/main/paxmark/APKBUILD b/main/paxmark/APKBUILD
index f3c35d2f22..12cfccba40 100644
--- a/main/paxmark/APKBUILD
+++ b/main/paxmark/APKBUILD
@@ -1,6 +1,6 @@
# Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=paxmark
-pkgver=0.10
+pkgver=0.11
pkgrel=0
pkgdesc="Manage PaX marking of executables"
url="http://alpinelinux.org"
@@ -22,6 +22,4 @@ package() {
ln -s paxmark "$pkgdir"/usr/sbin/paxmark.sh || return 1
}
-md5sums="b8ccb3b5d6e40213e83d38d9cc62c639 paxmark"
-sha256sums="43983aec547bfd805e64457f37f58ccb55081b4d21bf8d3763b7005c6ae2d1b4 paxmark"
-sha512sums="2701ce00dba7e21b397443063bd4218a9f733b3d2a419ad2a2cab62d099a0997cc7f06952d7d57828bda2cb95d74fe1f067c5f585f529ae2613e49ddfdf7fc53 paxmark"
+sha512sums="c43b5a48a8ac14b027114f712820b1fb8b0e209fcfe1a69eb64b4c68289a3bb3f26c3ea40350cbfdaa97329b4a8e1de2582025e5221c3016aff85bb75118e665 paxmark"
diff --git a/main/paxmark/paxmark b/main/paxmark/paxmark
index a279ed98d9..f80eb69ffe 100644
--- a/main/paxmark/paxmark
+++ b/main/paxmark/paxmark
@@ -2,7 +2,7 @@
ret=0
flags="${1//[!zPpEeMmRrSs]}"
-[ -n "${flags}" ] || return 0
+[ -n "${flags}" ] || exit 0
shift
# Create XATTR_PAX marking using attr
@@ -29,5 +29,5 @@ for f in "$@"; do
attr -q -s pax.flags -V "${xval}" "${f}" >/dev/null || ret=1
done
-return $ret
+exit $ret