Re: [apparmor] Using @{multiarch} in profile name

2015-06-07 Thread John Johansen
On 06/07/2015 06:45 PM, John Johansen wrote: > On 06/07/2015 05:25 PM, Cameron Norman wrote: >> Hello, >> >> I recently hit an issue where I wanted a profile that matched >> >> /usr/lib/@{multiarch}/bamf/bamfdaemon >> >> When I tried to use that as the profile name the parser spit this out: >> >> a

Re: [apparmor] Using @{multiarch} in profile name

2015-06-07 Thread John Johansen
On 06/07/2015 05:25 PM, Cameron Norman wrote: > Hello, > > I recently hit an issue where I wanted a profile that matched > > /usr/lib/@{multiarch}/bamf/bamfdaemon > > When I tried to use that as the profile name the parser spit this out: > > apparmor_parser: Regex grouping error: Invalid number

[apparmor] Using @{multiarch} in profile name

2015-06-07 Thread Cameron Norman
Hello, I recently hit an issue where I wanted a profile that matched /usr/lib/@{multiarch}/bamf/bamfdaemon When I tried to use that as the profile name the parser spit this out: apparmor_parser: Regex grouping error: Invalid number of items between {} apparmor_parser: Unable to parse input line

[apparmor] [Merge] lp:~cameronnemo/apparmor/abstraction-fdo-applications-fixups into lp:apparmor

2015-06-07 Thread Cameron Norman
Cameron Norman has proposed merging lp:~cameronnemo/apparmor/abstraction-fdo-applications-fixups into lp:apparmor. Requested reviews: AppArmor Developers (apparmor-dev) For more details, see: https://code.launchpad.net/~cameronnemo/apparmor/abstraction-fdo-applications-fixups/+merge/261336 --

Re: [apparmor] [utils] [patch] Remove re import from cleanprofile.py

2015-06-07 Thread Christian Boltz
Hello, Am Sonntag, 7. Juni 2015 schrieb Kshitij Gupta: > The following patch: > - removes re import > - uses apparmor.re_match_include instead of the regex Nice cleanup :-) (which also means to use the correct regex instead of the slightly wrong one cleanprofile.py had) > === modified file 'uti

[apparmor] [utils] [patch] Remove re import from cleanprofile.py

2015-06-07 Thread Kshitij Gupta
Hello, The following patch: - removes re import - uses apparmor.re_match_include instead of the regex === modified file 'utils/apparmor/cleanprofile.py' --- utils/apparmor/cleanprofile.py 2015-06-07 17:58:53 + +++ utils/apparmor/cleanprofile.py 2015-06-07 18:05:50 + @@ -11,8 +1

Re: [apparmor] [utils] [patch] cleanup import in cleanprofile.py

2015-06-07 Thread Christian Boltz
Hello, Am Sonntag, 7. Juni 2015 schrieb Kshitij Gupta: > The cleanprofile.py has an apparmor import, this patch modifies the > import to make it consistent with the rest of modules. Good idea, thanks! > === modified file 'utils/apparmor/cleanprofile.py' > --- utils/apparmor/cleanprofile.py

Re: [apparmor] [utils][patch]Fix indentation for return command in cleanprofile.py

2015-06-07 Thread Christian Boltz
Hello, Am Sonntag, 7. Juni 2015 schrieb Kshitij Gupta: > As discovered by cboltz there was a strange random behaviour of > crashing by aa-cleanprof. After a fun bughunt we traced it to 4 extra > white spaces before the return statement. The patch also adds a > sorted call on the key set to make th

[apparmor] [utils] [patch] cleanup import in cleanprofile.py

2015-06-07 Thread Kshitij Gupta
Hello, The cleanprofile.py has an apparmor import, this patch modifies the import to make it consistent with the rest of modules. === modified file 'utils/apparmor/cleanprofile.py' --- utils/apparmor/cleanprofile.py 2015-04-26 19:54:38 + +++ utils/apparmor/cleanprofile.py 2015-06-07

[apparmor] [utils][patch]Fix indentation for return command in cleanprofile.py

2015-06-07 Thread Kshitij Gupta
Hello, As discovered by cboltz there was a strange random behaviour of crashing by aa-cleanprof. After a fun bughunt we traced it to 4 extra white spaces before the return statement. The patch also adds a sorted call on the key set to make things more deterministic (for when we have to bughunt nex

[apparmor] [patch] Add profile_storage()

2015-06-07 Thread Christian Boltz
Hello, profile_storage() returns an empty, properly initialized profile. It doesn't explicitely init all keys (yet) and will be extended over time, with the final goal to get rid of hasher(). Also change various places in aa.py to use it (instead of an empty hasher or sub-hasher), and remove vari

[apparmor] [patch] Remove support for writing change hat declarations ("^hat, ")

2015-06-07 Thread Christian Boltz
Hello, change hat declarations ("^hat,") are no longer supported (see patch 46 for details). Therefore remove support for writing them. This also means to completely remove the 'declared' flag, which was only needed for hat declarations, and was (after applying patch 46) always set to False. Als

[apparmor] [patch] Ignore change hat declarations when parsing a profile

2015-06-07 Thread Christian Boltz
Hello, Hat declarations ("^hat,") were added in 2.3 for declaring external hats, but in the meantime aren't supported by the parser anymore (tested with 2.9.2 parser). Additionally, if a profile contains both a hat declaration and the hat ("^hat { ...}"), the hat declaration can overwrite the con

Re: [apparmor] Hat declarations

2015-06-07 Thread Christian Boltz
Hello, Am Samstag, 6. Juni 2015 schrieb John Johansen: > On 06/06/2015 05:17 PM, Christian Boltz wrote: > > are hat declarations like > > > > /foo { > > ^hat, > > } > > > > still allowed/valid? The tools accept them, but the 2.9.2 parser > > errors out with unexpected TOK_END_OF_RULE, expect