Re: [apparmor] [patch 09/11] utils: split out aa-genprof command

2014-03-05 Thread Seth Arnold
On Wed, Mar 05, 2014 at 05:44:43PM -0800, Steve Beattie wrote: > This patch splits out the genprof tool functionality into a separate > command function, merging with the use_autodep function that already > existed. > > Signed-off-by: Steve Beattie Acked-by: Seth Arnold Note that the new strin

Re: [apparmor] [patch 08/11] utils: split out aa-audit function

2014-03-05 Thread Seth Arnold
On Wed, Mar 05, 2014 at 05:44:42PM -0800, Steve Beattie wrote: > This patch moves the audit functionality to an audit specific command > function. > > As an aside, the -r option is left in place here, because aa-audit > is a bit orthogonal to aa-enforce, aa-complain, and aa-disable. Hah, good cat

Re: [apparmor] [patch 07/11] utils: split out aa-complain function

2014-03-05 Thread Seth Arnold
On Wed, Mar 05, 2014 at 05:44:41PM -0800, Steve Beattie wrote: > This patch creates a separate tool.cmd_complain function, as well as > removes the -r remove option, to match aa-enforce and aa-disable. > It also cleans up some bits in aa-enforce now that aa-complain and > aa-enforce have been separ

Re: [apparmor] [patch 06/11] utils: split out aa-enforce function

2014-03-05 Thread Seth Arnold
On Wed, Mar 05, 2014 at 05:44:40PM -0800, Steve Beattie wrote: > This patch splits out the aa-enforce functionality into a separate > method in the aa_tools class. It also removes one last reference to > the no-longer-existent -r option in the aa-enforce manpage. > > Signed-off-by: Steve Beattie

Re: [apparmor] [patch 05/11] utils: let aa-disable take profile name as arguments

2014-03-05 Thread Seth Arnold
On Wed, Mar 05, 2014 at 05:44:39PM -0800, Steve Beattie wrote: > This patch modifies the aa-disable tool implementation to allow it to > take a profile name (rather than a program name) as the argument(s) > for what to disable, as this was supported behavior in the perl > tools. (The rest of the co

Re: [apparmor] [patch 04/11] utils: two minor cleanups in aa.py

2014-03-05 Thread Seth Arnold
On Wed, Mar 05, 2014 at 05:44:38PM -0800, Steve Beattie wrote: > This patch removes a debugging print statement accidentally left in, > as well as a duplicated initialization to a variable, and moves the > variable init closer to the declaration that the variable is a global > (diff represents the

Re: [apparmor] [patch 03/11] utils: dont delete tmpdir when debugging test-aa-easyprof.py

2014-03-05 Thread Seth Arnold
On Wed, Mar 05, 2014 at 05:44:37PM -0800, Steve Beattie wrote: > It's not useful to report the location of the temporary directory for > each test if you're going to immediately delete it. > > Signed-off-by: Steve Beattie Acked-by: Seth Arnold > --- > utils/test/test-aa-easyprof.py |3 ++-

Re: [apparmor] [patch 02/11] utils: fix apparmor.ui references in aa-genprof

2014-03-05 Thread Seth Arnold
On Wed, Mar 05, 2014 at 05:44:36PM -0800, Steve Beattie wrote: > aa-genprof was incorrectly trying to refer to UI_xxx functions in > apparmor.aa rather than the correct apparmor.ui. This patch fixes the > issue. > > Signed-off-by: Steve Beattie Acked-by: Seth Arnold Thanks > --- > utils/aa-g

Re: [apparmor] [patch 01/11] utils: remove generated vim manpage on make clean

2014-03-05 Thread Seth Arnold
On Wed, Mar 05, 2014 at 05:44:35PM -0800, Steve Beattie wrote: > Signed-off-by: Steve Beattie Acked-by: Seth Arnold > --- > utils/vim/Makefile |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > Index: b/utils/vim/Makefile > =

[apparmor] [patch 06/11] utils: split out aa-enforce function

2014-03-05 Thread Steve Beattie
This patch splits out the aa-enforce functionality into a separate method in the aa_tools class. It also removes one last reference to the no-longer-existent -r option in the aa-enforce manpage. Signed-off-by: Steve Beattie --- utils/aa-enforce|4 ++-- utils/aa-enforce.pod|2

[apparmor] [patch 08/11] utils: split out aa-audit function

2014-03-05 Thread Steve Beattie
This patch moves the audit functionality to an audit specific command function. As an aside, the -r option is left in place here, because aa-audit is a bit orthogonal to aa-enforce, aa-complain, and aa-disable. Signed-off-by: Steve Beattie --- utils/aa-audit |5 +++-- utils/apparmo

[apparmor] [patch 05/11] utils: let aa-disable take profile name as arguments

2014-03-05 Thread Steve Beattie
This patch modifies the aa-disable tool implementation to allow it to take a profile name (rather than a program name) as the argument(s) for what to disable, as this was supported behavior in the perl tools. (The rest of the commands that make use of the aa_tools.act() method have not been exercis

[apparmor] [patch 10/11] utils: add very limited dbus rule support

2014-03-05 Thread Steve Beattie
This patch adds very limited support for very dumb parsing of dbus rules. Basically, it stores dbus rules as raw strings wrapped in a class. There's class structure to indicate how I'd like to see fuller future support for dbus rules to be implemented and act as a guidepost for how to handle most

[apparmor] [patch 03/11] utils: dont delete tmpdir when debugging test-aa-easyprof.py

2014-03-05 Thread Steve Beattie
It's not useful to report the location of the temporary directory for each test if you're going to immediately delete it. Signed-off-by: Steve Beattie --- utils/test/test-aa-easyprof.py |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Index: b/utils/test/test-aa-easyprof.py ==

[apparmor] [patch 01/11] utils: remove generated vim manpage on make clean

2014-03-05 Thread Steve Beattie
Signed-off-by: Steve Beattie --- utils/vim/Makefile |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: b/utils/vim/Makefile === --- a/utils/vim/Makefile +++ b/utils/vim/Makefile @@ -30,4 +30,4 @@ check: $(call p

[apparmor] [patch 04/11] utils: two minor cleanups in aa.py

2014-03-05 Thread Steve Beattie
This patch removes a debugging print statement accidentally left in, as well as a duplicated initialization to a variable, and moves the variable init closer to the declaration that the variable is a global (diff represents the latter a little oddly). Signed-off-by: Steve Beattie --- utils/appar

[apparmor] [patch 00/11] utils: cleanups and dbus parsing

2014-03-05 Thread Steve Beattie
This patchset fixes a few issues with the python tools, continues the process of splitting out the mini-tools into using separate cmd_xxx functions in the Tool class, and adds some very simple support for parsing dbus rules. I'm not convinced the dbus parsing patches handle the rewrite of modified

[apparmor] [patch 11/11] utils: add simple parsing of multi-line rules

2014-03-05 Thread Steve Beattie
D-Bus rules in particular seem to get written as multi-line rules. This patch adds very simple hackish support for multiple lines. Essentially, what it does is if the parsing of a line doesn't match anything and falls all the way through, it saves the line and prepends it to the next line that occu

[apparmor] [patch 02/11] utils: fix apparmor.ui references in aa-genprof

2014-03-05 Thread Steve Beattie
aa-genprof was incorrectly trying to refer to UI_xxx functions in apparmor.aa rather than the correct apparmor.ui. This patch fixes the issue. Signed-off-by: Steve Beattie --- utils/aa-genprof | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) Index: b/utils/aa-genprof ==

[apparmor] [patch 07/11] utils: split out aa-complain function

2014-03-05 Thread Steve Beattie
This patch creates a separate tool.cmd_complain function, as well as removes the -r remove option, to match aa-enforce and aa-disable. It also cleans up some bits in aa-enforce now that aa-complain and aa-enforce have been separated. Signed-off-by: Steve Beattie --- utils/aa-complain |

[apparmor] [patch 09/11] utils: split out aa-genprof command

2014-03-05 Thread Steve Beattie
This patch splits out the genprof tool functionality into a separate command function, merging with the use_autodep function that already existed. Signed-off-by: Steve Beattie --- utils/aa-autodep|4 ++-- utils/apparmor/tools.py | 32 ++-- 2 files change

Re: [apparmor] test-aa-easyprof.py fails because of UsrMove

2014-03-05 Thread Christian Boltz
Hello, Am Mittwoch, 5. März 2014 schrieb Steve Beattie: > On Wed, Mar 05, 2014 at 09:27:29PM +0100, Christian Boltz wrote: > > I finally applied Steve's small change to preserve the tempdirs (and > > another one to tell me the used tempdir - BTW: is there a "clean" > > way to do this? I had to abu

Re: [apparmor] test-aa-easyprof.py fails because of UsrMove

2014-03-05 Thread Steve Beattie
On Wed, Mar 05, 2014 at 09:27:29PM +0100, Christian Boltz wrote: > I finally applied Steve's small change to preserve the tempdirs (and > another one to tell me the used tempdir - BTW: is there a "clean" way to > do this? I had to abuse a "self.assertTrue(0 == 1, "tempdir %s" % > self.tempdir)"

Re: [apparmor] test-aa-easyprof.py fails because of UsrMove

2014-03-05 Thread Christian Boltz
Hello, Am Dienstag, 4. März 2014 schrieb Kshitij Gupta: > On Sat, Mar 1, 2014 at 3:41 AM, Christian Boltz wrote: > > test-aa-easyprof.py depends on /bin/ls being a real binary. > > In practise, it is a symlink to /usr/bin/ls on some distributions. ... > @Christian > With the patch from @Steve in p