Commit graph

17 commits

Author SHA1 Message Date
Christian Boltz
da8230fe95 remove superfluous/outdated comment about m / ix
For the records: the valid statement from the comment is:
    # m is not implied by ix


Acked-by: Kshitij Gupta <kgupta8592@gmail.com>
2015-01-30 21:08:17 +01:00
Christian Boltz
1203923be3 more aa-mergeprof fixes
- change --help for files - "Profile(s) to merge" instead of "base profile"
- display the profile to save when asking to save it
- disable searching for existing network rules in abstractions because 
  it crashes. This doesn't hurt too much, see 
  https://bugs.launchpad.net/apparmor/+bug/1382241


Acked-by: Steve Beattie <steve@nxnw.org>
2014-10-16 23:35:06 +02:00
Christian Boltz
aeebcbc243 various aa-mergeprof fixes
- remove some debug output (which Kshitij intentionally kept in the 
  draft patch)
- add a UI_Info to display which profile will be merged
- disable the mergeprofiles.clear_common() call because it crashes
  (https://bugs.launchpad.net/apparmor/+bug/1382236)
- disable (M)ore (CMD_OTHER) because it crashes
- make (F)inish work everywhere
- change the help text so that it doesn't mention 3-way-merge until we
  implement it
2014-10-16 23:25:33 +02:00
Christian Boltz
4f4eded593 aa-mergeprof: don't ask for includes that are already there
Acked-by: Steve Beattie <steve@nxnw.org>
2014-10-16 20:22:52 +02:00
Christian Boltz
4f9183b23e aa-mergeprof cmdline changes, disable 3-way-merge for now
This is the rebased version of the patch by
Kshitij Gupta <kgupta8592@gmail.com>


(mostly) original patch description:

Changes to facilitate 2-way merge (maybe also 3-way) of multiple
profiles as discussed on IRC

This patch
- moves reset method to reset_aa function
- modifies message displayed to user
- allows processing of multiple files in 2-way merge
- disables 3-way merge till new syntax has been decided

The changes reflect the approach of providing arbitrary number of
files using wildcards or explicitly.

The changes map the profiles in the given files to their respective
files in the local directory specified using -d. Then the merges take
place profile-wise.


Acked-by: Steve Beattie <steve@nxnw.org>.
2014-10-16 20:06:45 +02:00
Kshitij Gupta
52cd4835e2 Refractor prompts in utils.
The following patch:
- creates a class for prompt questions moving away from Perl hash hack
for the purpose.
- moves some functions to the methods for that class
- fix options being incorrectly passed to questionPrompt in aa-mergeprof

Acked-by: Christian Boltz <apparmor@cboltz.de>
2014-10-07 18:36:01 +05:30
Kshitij Gupta
b7ff639d73 Fix warnings generated due to unnamed arguments in translatable strings.
This patch:
- replaces unnamed arguments with named arguments wherever more than 1
one arguments ware present in a message
- minor fix in aa-unconfined for pname argument in 2 strings
- updated pot files (as a side-effect of testing with make)

Acked-by: Christian Boltz <apparmor@cboltz.de>
2014-09-14 23:47:00 +05:30
Christian Boltz
9e4c01f8d3 Add a warning to aa-mergeprof --help that the syntax will change in the
future. Also remove --auto, which is not implemented yet.
2014-09-04 01:49:47 +02:00
Christian Boltz
356e7cb199 aa-mergeprof: honor -d parameter
(it was ignored until now)

Acked-by: Kshitij Gupta <kgupta8592@gmail.com>.
2014-08-04 20:19:08 +02:00
Christian Boltz
241544ad8a modify aa-mergeprof to:
- allow users to merge two profiles (2-way merge) using aa-mergeprof by
  making the third profile optional
- re-enable code that cleaned up base and other profile and using it in
  deleted count (was disabled due to pyflakes thinking it was unused)

Patch by Kshitij Gupta <kgupta8592@gmail.com>


Acked-by: Christian Boltz <apparmor@cboltz.de>
2014-07-29 12:39:12 +02:00
Christian Boltz
be6cb6724d fix aa-mergeprof to
- import apparmor.ui as aaui
- call aaui.UI_*() instead of apparmor.aa.UI_*()
- use apparmor.aamode.AA_MAY_EXEC instead of apparmor.aa.AA_MAY_EXEC


Acked-by: Kshitij Gupta <kgupta8592@gmail.com>.
2014-07-28 00:24:26 +02:00
Steve Beattie
ec7676bdec utils/aa-*: adjust python shebang lines to ease rewriting to an
alternate python if installed via the python-tools-setup.py script.
2014-02-14 14:42:19 -08:00
Steve Beattie
f652178a02 aa-mergeprof: fixup some of the whitespace issues 2014-02-13 08:31:59 -08:00
Steve Beattie
d318ff6100 Fix up last pyflakes issues with tools 2014-02-13 08:24:02 -08:00
Steve Beattie
15a95e3b36 Fix up some more pyflakes issues with the tools 2014-02-13 08:20:59 -08:00
Steve Beattie
32e0931588 Fix up execute permissions that were lost in the merger for some reason. 2014-02-12 16:59:27 -08:00
Steve Beattie
f989dd0132 Merge in Kshitij Gupta <kgupta8592@gmail.com>'s rewrite of the
logprof/genprof and related utilities in python. Because the branch that
was worked on was not based on the apparmor tree, not all of the history
can be maintained for files that are not newly created or entirely
rewritten in the branch.

(This merge also includes a subsequent commit to the branch
I was merging from which includes my missed bzr add of
utils/apparmor/translations.py)
2014-02-12 15:54:00 -08:00