2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-09-01 14:55:10 +00:00

drop most of apparmor_kill()

AppArmor can't be built as a kernel module since years, which also means
it's impossible to unload it.
This commit is contained in:
Christian Boltz
2019-03-15 22:55:51 +01:00
parent 6416ccebf6
commit 0e3d6ee43a

View File

@@ -359,22 +359,13 @@ apparmor_stop() {
} }
apparmor_kill() { apparmor_kill() {
aa_log_daemon_msg "Unloading AppArmor modules "
if ! is_apparmor_loaded ; then if ! is_apparmor_loaded ; then
aa_log_failure_msg "AppArmor module is not loaded" aa_log_failure_msg "AppArmor module is not loaded"
return 1 return 1
fi fi
if is_apparmor_present ; then aa_log_failure_msg "apparmor_kill() is no longer supported because AppArmor can't be built as a module"
MODULE=apparmor return 1
else
aa_log_failure_msg "AppArmor is builtin"
return 1
fi
/sbin/modprobe -qr $MODULE
rc=$?
aa_log_end_msg $rc
return $rc
} }
__apparmor_restart() { __apparmor_restart() {