2
0
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:
intrigeri
2018-10-30 12:23:11 +00:00
parent 473d1f5daa
commit 7c396bcd3e

View File

@@ -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