[apparmor] [patch] prevent adding multiple quotes in file rules
Kshitij Gupta
kgupta8592 at gmail.com
Sat Oct 11 21:26:40 UTC 2014
Hello,
On Sun, Oct 12, 2014 at 12:21 AM, Christian Boltz <apparmor at cboltz.de> wrote:
> Hello,
>
> aa-cleanprof (and others?) duplicate quotes in file rules
>
> If a profile contains
> "/bin/foo bar" mrix,
> and I run aa-cleanprof on it several times, I end up with
> """"""/bin/foo bar"""""" mrix,
>
> This patch calls strip_quotes on the pathname.
> (If needed, the quotes are re-added when writing the profile - tested
> with aa-cleanprof.)
>
> References: https://bugs.launchpad.net/apparmor/+bug/1328707
>
Does this go to your: add-a-test-for-it pile?
>
> === modified file 'utils/apparmor/aa.py'
> --- utils/apparmor/aa.py 2014-10-08 17:41:31 +0000
> +++ utils/apparmor/aa.py 2014-10-11 18:46:14 +0000
> @@ -2903,7 +2903,7 @@
> if matches[3]:
> file_prefix = True
>
> - path = matches[4].strip()
> + path = strip_quotes(matches[4].strip())
> mode = matches[5]
> nt_name = matches[6]
> if nt_name:
> @@ -4200,7 +4200,7 @@
> if matches[2]:
> user = True
>
> - path = matches[4].strip()
> + path = strip_quotes(matches[4].strip())
> mode = matches[5]
> nt_name = matches[6]
> if nt_name:
>
>
lgtm. Thanks.
Acked-by: Kshitij Gupta <kgupta8592 at gmail.com>.
Regards,
Kshitij Gupta
>
>
> Regards,
>
> Christian Boltz
> --
>> Was ist ein "umbrella bug"?
> Eine Regenschirm-Wanze ;-)
> [> Al Bogner und Andreas Winkelmann in suse-linux]
>
>
> --
> AppArmor mailing list
> AppArmor at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/apparmor
More information about the AppArmor
mailing list