[apparmor] [patch] un-silence rcapparmor restart
John Johansen
john.johansen at canonical.com
Thu Sep 15 19:18:26 UTC 2011
On 09/14/2011 02:33 PM, Christian Boltz wrote:
> Hello,
>
> while debugging the issue in rc.apparmor.suse (see previous mail/patch),
> I noticed that "rcapparmor restart" is totally silent.
>
> The attached patch prints a message in __apparmor_restart().
>
> It also replaces the hardcoded "return 0" with $?. I'm quite sure this
> won't catch all errors, but it's still better than the hardcoded success
> message.
>
> See also the discussion in #apparmor with John in the last hours.
>
>
> === modified file 'parser/rc.apparmor.functions'
> --- parser/rc.apparmor.functions 2011-08-26 22:55:43 +0000
> +++ parser/rc.apparmor.functions 2011-09-14 21:31:38 +0000
> @@ -447,6 +447,8 @@
> return 4
> fi
>
> + aa_log_daemon_msg "Restarting AppArmor"
> +
> configure_owlsm
> parse_profiles reload
> # Clean out running profiles not associated with the current profile
> @@ -476,7 +478,10 @@
> ' | LC_COLLATE=C sort -r | while IFS= read profile ; do
> echo -n "$profile" > "$SFS_MOUNTPOINT/.remove"
> done
> - return 0
> + # will not catch all errors, but still better than nothing
> + rc=$?
> + aa_log_end_msg $rc
> + return $rc
> }
>
> apparmor_restart() {
>
Acked-by: John Johansen <john.johansen at canonical.com>
More information about the AppArmor
mailing list