[apparmor] [patch] Fix available buttons after switching audit flag in aa-logprof

Kshitij Gupta kgupta8592 at gmail.com
Tue May 26 08:23:45 UTC 2015


Hello,

On Mon, May 25, 2015 at 5:20 AM, Christian Boltz <apparmor at cboltz.de> wrote:

> Hello,
>
> when switching the audit flag for network events in aa-logprof
> (technically, it happens in aa.py ask_the_question()), the "(I)gnore"
> button gets "lost".
>
> This patch fixes the list of available buttons.
>
>
> I propose this patch for trunk and 2.9.
>
>
> [ 26-logprof-fix-buttons-after-audit.diff ]
>
> === modified file utils/apparmor/aa.py
> --- utils/apparmor/aa.py        2015-05-25 00:47:50.323591893 +0200
> +++ utils/apparmor/aa.py        2015-05-25 01:45:28.597491886 +0200
> @@ -2009,10 +2009,10 @@
>                                  audit = ''
>                                  if audit_toggle:
>                                      audit = 'audit'
> -                                    q.functions = ['CMD_ALLOW',
> 'CMD_DENY', 'CMD_AUDIT_OFF',
> +                                    q.functions = ['CMD_ALLOW',
> 'CMD_DENY', 'CMD_IGNORE_ENTRY', 'CMD_AUDIT_OFF',
>                                                        'CMD_ABORT',
> 'CMD_FINISHED']
>                                  else:
> -                                    q.functions = ['CMD_ALLOW',
> 'CMD_DENY', 'CMD_AUDIT_NEW',
> +                                    q.functions = ['CMD_ALLOW',
> 'CMD_DENY', 'CMD_IGNORE_ENTRY', 'CMD_AUDIT_NEW',
>                                                        'CMD_ABORT',
> 'CMD_FINISHED']
>                                  q.headers = [_('Profile'),
> combine_name(profile, hat)]
>                                  q.headers += [_('Network Family'), audit
> + family]
>
> Not sure if why it happens in other cases(if it does), here a possible
reasoning would be "if user selected Audit button, they dont wish to ignore
it".

That said giving more options to user doesn't seem like a bad idea.

Thanks for the patch.

Acked-by: Kshitij Gupta <kgupta8592 at gmail.com>.

Regards,

Kshitij Gupta

>
>
> Regards,
>
> Christian Boltz
> --
> [...] sollte für einen Ortskundigen also kinderleicht zu finden sein.
> Wir sind die Leute, die den dicken weißgrünen Europcar Lastwagen so
> bescheuert mitten auf der Straße geparkt haben.
> [Kristian Köhntopp zieht um]
>
>
> --
> AppArmor mailing list
> AppArmor at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/apparmor
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20150526/6104891d/attachment.html>


More information about the AppArmor mailing list