aboutsummaryrefslogtreecommitdiffstats
path: root/share/msec
diff options
context:
space:
mode:
authorFrederic Lepied <flepied@mandriva.com>2002-01-17 19:56:19 +0000
committerFrederic Lepied <flepied@mandriva.com>2002-01-17 19:56:19 +0000
commit68ebfc5fc46591d84ed1b0887c1c0b19ba7aa47d (patch)
tree4e2d7e6f16f8bb65f61c2913dfe35fd767e62040 /share/msec
parent1ff71ce4eb92eeeb629ce2669a8db801f182249c (diff)
downloadmsec-68ebfc5fc46591d84ed1b0887c1c0b19ba7aa47d.tar
msec-68ebfc5fc46591d84ed1b0887c1c0b19ba7aa47d.tar.gz
msec-68ebfc5fc46591d84ed1b0887c1c0b19ba7aa47d.tar.bz2
msec-68ebfc5fc46591d84ed1b0887c1c0b19ba7aa47d.tar.xz
msec-68ebfc5fc46591d84ed1b0887c1c0b19ba7aa47d.zip
0.17
Diffstat (limited to 'share/msec')
-rwxr-xr-xshare/msec48
1 files changed, 48 insertions, 0 deletions
diff --git a/share/msec b/share/msec
new file mode 100755
index 0000000..423766c
--- /dev/null
+++ b/share/msec
@@ -0,0 +1,48 @@
+#!/bin/sh
+#---------------------------------------------------------------
+# Project : Mandrake Linux
+# Module : share
+# File : msec
+# Version : $Id$
+# Author : Frederic Lepied
+# Created On : Thu Dec 13 11:36:50 2001
+#---------------------------------------------------------------
+
+MSEC=/usr/share/msec/msec.py
+
+for a in "$@"; do
+ last="$a"
+done
+
+if [ -n "$last" ]; then
+ case $last in
+ [0-5]) ;;
+ *) [ -x /usr/share/msec/$last.py ] && MSEC=/usr/share/msec/$last.py;;
+ esac
+else
+ # no args so try to guess if a custom msec is needed
+ . /etc/sysconfig/msec
+
+ case "$SECURE_LEVEL" in
+ [0-5]) ;;
+ *) MSEC=/usr/share/msec/$SECURE_LEVEL.py;;
+ esac
+fi
+
+if [ ! -x $MSEC ]; then
+ echo "/usr/share/msec/$last.py not found or not executable. Aborting" 1>&2
+ exit 1
+fi
+
+if $MSEC "$@"; then
+ . /etc/sysconfig/msec
+
+ [ -z "$PERM_LEVEL" ] && PERM_LEVEL=$SECURE_LEVEL
+
+ 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
+fi
+
+# msec.sh ends here