aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederic Lepied <flepied@mandriva.com>2002-02-05 03:09:16 +0000
committerFrederic Lepied <flepied@mandriva.com>2002-02-05 03:09:16 +0000
commit56000fe8004d6c8eaab3cfe9aef83e1f2cde4f92 (patch)
tree9131fbe0669b2ec0e62d3721f1d4f06686930b98
parent2aae05f8f53ebbdaa6aef96484914a8ccb595a76 (diff)
downloadmsec-56000fe8004d6c8eaab3cfe9aef83e1f2cde4f92.tar
msec-56000fe8004d6c8eaab3cfe9aef83e1f2cde4f92.tar.gz
msec-56000fe8004d6c8eaab3cfe9aef83e1f2cde4f92.tar.bz2
msec-56000fe8004d6c8eaab3cfe9aef83e1f2cde4f92.tar.xz
msec-56000fe8004d6c8eaab3cfe9aef83e1f2cde4f92.zip
pass the same options used for msec.py to Perms.py
-rwxr-xr-xshare/msec23
1 files changed, 17 insertions, 6 deletions
diff --git a/share/msec b/share/msec
index 423766c..cf88468 100755
--- a/share/msec
+++ b/share/msec
@@ -9,13 +9,24 @@
#---------------------------------------------------------------
MSEC=/usr/share/msec/msec.py
+OPT=""
for a in "$@"; do
+ if [ "$a" = '-o' ]; then
+ OPT="$OPT -o"
+ NEXT=1
+ else
+ if [ "$NEXT" = 1 ]; then
+ OPT="$OPT $a"
+ fi
+ NEXT=0
+ fi
+
last="$a"
done
if [ -n "$last" ]; then
- case $last in
+ case "$last" in
[0-5]) ;;
*) [ -x /usr/share/msec/$last.py ] && MSEC=/usr/share/msec/$last.py;;
esac
@@ -29,8 +40,8 @@ else
esac
fi
-if [ ! -x $MSEC ]; then
- echo "/usr/share/msec/$last.py not found or not executable. Aborting" 1>&2
+if [ ! -x "$MSEC" ]; then
+ echo "$MSEC found or not executable. Aborting" 1>&2
exit 1
fi
@@ -41,8 +52,8 @@ if $MSEC "$@"; then
LOCAL=
[ -f /etc/security/msec/perm.local ] && LOCAL=/etc/security/msec/perm.local
-
- /usr/share/msec/Perms.py /etc/security/msec/perm.$PERM_LEVEL $LOCAL
+
+ /usr/share/msec/Perms.py $OPT /etc/security/msec/perm.$PERM_LEVEL $LOCAL
fi
-# msec.sh ends here
+# msec ends here