[apparmor] [patch] fix syntax error in "rcapparmor stop"

Steve Beattie steve at nxnw.org
Tue Oct 11 21:58:52 UTC 2011


On Tue, Oct 11, 2011 at 09:55:40PM +0200, Christian Boltz wrote:
> it doesn't happen too often that I use "rcapparmor stop", but it looks 
> like I should do it sometimes ;-)
> 
> # rcapparmor stop
> Unloading AppArmor profiles  sed: can't read LC_COLLATE=C: No such file or directory
> sed: can't read sort: No such file or directory
>                                                                                                                       done
> 
> The following patch fixes the syntax error in remove_profiles() in rc.
> apparmor.functions by adding a forgotten pipe.
> 
> svn diff --diff-options='-p' rc.apparmor.functions 
> === modified file 'parser/rc.apparmor.functions'
> --- parser/rc.apparmor.functions        2011-09-15 19:23:25 +0000
> +++ parser/rc.apparmor.functions        2011-10-11 19:19:30 +0000
> @@ -400,7 +400,7 @@ remove_profiles() {
>         retval=0
>         # We filter child profiles as removing the parent will remove
>         # the children
> -       sed -e "s/ (\(enforce\|complain\))$//" "$SFS_MOUNTPOINT/profiles" \
> +       sed -e "s/ (\(enforce\|complain\))$//" "$SFS_MOUNTPOINT/profiles" | \
>         LC_COLLATE=C sort | grep -v // | while read profile ; do
>                 echo -n "$profile" > "$SFS_MOUNTPOINT/.remove"
>                 rc=$?
> 

Bah, not sure how I missed that in the last round of bugfixing the
scripts.

Acked-By: Steve Beattie <sbeattie at ubuntu.com>

Thanks!

-- 
Steve Beattie
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20111011/989758df/attachment.pgp>


More information about the AppArmor mailing list