mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-30 22:05:27 +00:00
rc.apparmor.functions: drop force-complain handling code, that now duplicates parser's functionality.
This commit is contained in:
@@ -134,21 +134,6 @@ skip_profile() {
|
||||
return 0
|
||||
}
|
||||
|
||||
force_complain() {
|
||||
local profile=$1
|
||||
|
||||
# if profile not in complain mode
|
||||
if ! egrep -q "^/.*[ \t]+flags[ \t]*=[ \t]*\([ \t]*complain[ \t]*\)[ \t]+{" $profile ; then
|
||||
local link="${PROFILE_DIR}/force-complain/`basename ${profile}`"
|
||||
if [ -e "$link" ] ; then
|
||||
aa_log_warning_msg "found $link, forcing complain mode"
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
parse_profiles() {
|
||||
# get parser arg
|
||||
case "$1" in
|
||||
@@ -198,11 +183,7 @@ parse_profiles() {
|
||||
continue
|
||||
fi
|
||||
if [ -f "${profile}" ] ; then
|
||||
COMPLAIN=""
|
||||
if force_complain "${profile}" ; then
|
||||
COMPLAIN="-C"
|
||||
fi
|
||||
$PARSER $ABSTRACTIONS $PARSER_ARGS $COMPLAIN "$profile" > /dev/null
|
||||
$PARSER $ABSTRACTIONS $PARSER_ARGS "$profile" > /dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
aa_log_failure_msg "$profile failed to load"
|
||||
STATUS=1
|
||||
|
Reference in New Issue
Block a user