summaryrefslogtreecommitdiff
path: root/kernels/paxutils
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-12-08 02:04:18 -0800
committerroot <root@rshg054.dnsready.net>2012-12-08 02:04:18 -0800
commitb8c6ff8db00ce5eec5e6f20a90e8f8ec993ef3d5 (patch)
treed5f2cb92d1607745717cde77e321269c384da4bb /kernels/paxutils
parent7de07e40e2c0c078a35c5092e1f2defb65d1741e (diff)
Sat Dec 8 01:58:23 PST 2012
Diffstat (limited to 'kernels/paxutils')
-rw-r--r--kernels/paxutils/PKGBUILD6
-rwxr-xr-xkernels/paxutils/paxutils26
2 files changed, 22 insertions, 10 deletions
diff --git a/kernels/paxutils/PKGBUILD b/kernels/paxutils/PKGBUILD
index 3d6d1e772..66896a32a 100644
--- a/kernels/paxutils/PKGBUILD
+++ b/kernels/paxutils/PKGBUILD
@@ -3,8 +3,8 @@
pkgname=paxutils
pkgdesc='PaX utilities to configure flags for several binaries to work with PaX kernels'
-pkgver=0.1.0
-pkgrel=2
+pkgver=0.1.1
+pkgrel=1
arch=(any)
url='https://projects.parabolagnulinux.org/abslibre.git/tree/kernels/paxutils/'
license=(GPL2)
@@ -13,7 +13,7 @@ replaces=('linux-pax-flags' 'linux-libre-pax-flags')
conflicts=('linux-pax-flags' 'linux-libre-pax-flags')
provides=('linux-pax-flags' 'linux-libre-pax-flags')
source=($pkgname)
-sha256sums=(bf1fda4919e7ed8052711c91933d9da5d86945ba44133c94e1952dedb4d1759b)
+sha256sums=(a47ebcde9ecb0a5d16825cdca3710ea8ab4fd111abae72216d44e1b0294e043a)
build() {
return 0
diff --git a/kernels/paxutils/paxutils b/kernels/paxutils/paxutils
index 22f5a8171..69662a646 100755
--- a/kernels/paxutils/paxutils
+++ b/kernels/paxutils/paxutils
@@ -1,14 +1,25 @@
#!/bin/bash
-[ "$UID" = "0" ] || {
- sudo $0
- exit $!
+function usage() {
+ echo $(basename $0) \[options\] >&2
+ echo
+ echo ' -h This help.'
+ echo ' -y Do not ask before changes.'
+ echo
+ exit 1
}
function homedir() {
egrep ^$1 /etc/passwd | cut -d: -f 6
}
+[ "$1" = '-h' ] && usage
+
+[ "$UID" = "0" ] || {
+ sudo $0 $@
+ exit $!
+}
+
declare -A perms
perms=(
@@ -19,6 +30,7 @@ perms=(
# MPROTECT and RANDMMAP off
['cPSmXEr']='
/usr/bin/elinks
+ /usr/bin/gnome-shell
/usr/bin/pyrogenesis
/usr/lib/iceweasel/iceweasel
/usr/lib/iceweasel/plugin-container
@@ -148,22 +160,22 @@ echo configuration for the following binaries:
for perm in ${!perms[@]}; do
for path in ${perms[$perm]}; do
- [ -f $path ] && echo " * $path"
+ [ -f "$path" ] && echo " * $path"
done
done
echo
echo Continue writing PaX headers? \[Y/n\]
-read a
+[ "$1" = '-y' ] && a=y || read a
case $a in
"Y"|"y"|"")
for perm in ${!perms[@]}; do
for path in ${perms[$perm]}; do
- [ -f $path ] && {
+ [ -f "$path" ] && {
echo $perm $path
- paxctl -$perm $path
+ paxctl -$perm "$path"
}
done
done