#!/sbin/runscript # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/sys-fs/trustees/files/trustees.rc6,v 1.2 2004/07/15 01:00:55 agriffis Exp $ depend() { need checkfs before net } checkrules() { if [ ! -d /proc/trustee ] ; then eerror "Kernel does not have support for Trustee ACLs." return 1 fi if [ -d "${TRUSTEE_FILES}" ] ; then TRUSTEE_FILES="${TRUSTEE_FILES}/*" fi for i in ${TRUSTEE_FILES} ; do if [ ! -f "${i}" ] ; then eerror "${i}: no such file." return 1 fi done if [ -z "${i}" ] ; then eerror "No files specified in /etc/conf.d/trustees." return 1 fi } start() { checkrules || return 1 ebegin "Purging trustee permissions from kernel memory" /usr/sbin/settrustee -D &>/dev/null eend $? einfo "Loading trustee permissions from:" for i in ${TRUSTEE_FILES} ; do ebegin " ${i}" /usr/sbin/settrustee -f "${i}" &>/dev/null eend $? done } stop() { ebegin "Purging trustee permissions from kernel memory" /usr/sbin/settrustee -D &>/dev/null eend $? }