[apparmor] [utils][patch] Fix incorrect options being displayed for capabilites in aa.py

Christian Boltz apparmor at cboltz.de
Mon Sep 8 11:05:06 UTC 2014


Hello,

Am Montag, 8. September 2014 schrieb Kshitij Gupta:
> Due to options being passed incorrectly to the UI functions the user
> (in this case @cboltz) was being presented with the following (hard)
> choice:
> 
> Profil:      /usr/lib/cups/backend/boomaga
> Capability:  sys_ptrace
> Schweregrad: unknown
> 
>  [1 - ['#include <abstractions/ubuntu-konsole>', 'capability
> sys_ptrace']]
> [(A)llow] / (D)eny / (I)gnore / Audi(t) / Abo(r)t / (F)inish

I wouldn't call that a hard choice - the default always fits ;-)
(fun fact for those who didn't follow us on IRC yesterday: aa-logprof 
adds the #include and the capability wihout any error)

> The following patch:
> - ensures the options are passed correctly in the expected form.
> 
> === modified file 'utils/apparmor/aa.py'
> --- utils/apparmor/aa.py        2014-09-04 01:18:33 +0000
> +++ utils/apparmor/aa.py        2014-09-07 21:47:38 +0000
> @@ -1556,7 +1556,7 @@
> 
>                      if options:
>                          options.append('capability %s' % capability)
> -                        q['options'] = [options]
> +                        q['options'] = options
>                          q['selected'] = default_option - 1
> 
>                      q['headers'] = [_('Profile'),
> combine_name(profile, hat)]

Nice catch!

Acked-by: Christian Boltz <apparmor at cboltz.de>


Regards,

Christian Boltz
-- 
Kann man KDE1 Anwendungen benutzen? Ich kenne nur noch zusätzlich KDE2,
was ich schrecklich finde, da es sich entweder aufhängt oder langsam
ist.  Manchmal auch beides zusammen. KDE3 schafft es wenigstens den
Krashmanager anzuzeigen, wenn ein Programm abstürzt. ;-)
[Ferdinand Ihringer in suse-linux]




More information about the AppArmor mailing list