3 # Copyright (C) 2007 Casey Schaufler <casey@schaufler-ca.com>
4 # Copyright (C) 2011 Nokia Corporation.
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, version 2.
10 # This program is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # General Public License for more details.
15 # You should have received a copy of the GNU General Public
16 # License along with this program; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21 # Casey Schaufler <casey@schaufler-ca.com>
23 # chkconfig: 2345 08 08
24 # description: Initialize Smack configuration
27 # Required-Start: $local_fs
29 # Default-Start: 2 3 4 5
31 # Short-Description: Set up Smack configuration
32 # Description: Smack is an implementation of Mandatory Access Control. \
33 # The access control rules are loaded using the smackfs \
38 # Make sure that /smack is mounted
39 # Ensure that the mount point is a directory
42 if [ ! -e /smack ] ; then
46 if [ ! -d /smack ] ; then
47 if [ -e /smack ] ; then
53 /bin/mount smackfs -t smackfs /smack >& /dev/null
57 # Load any Smack access rules
60 if [ -f /etc/smack/accesses ] ; then
61 /sbin/smackload < /etc/smack/accesses
66 # Unload any Smack access rules
69 /sbin/smackload -c < /smack/load
73 # Load any Smack CIPSO mappings
76 if [ -f /etc/smack/cipso ] ; then
77 /sbin/smackcipso < /etc/smack/cipso
88 if [ ! -e /smack/load ] ; then
92 reload|force-reload|restart|try-restart)