apparmor/utils
John Johansen 3607865b18 Merge branch 'cboltz-profile-list-2.13' into 'apparmor-2.13'
[2.12+2.13] Replace "existing_profiles" & fix minitools for named profiles

(This is the 2.13 version of !249 (merged) which had a few merge conflicts in the 2.13 branch, and needs a little change (last commit) on top)

This patchset introduces the ProfileList class which replaces "existing_profiles" in aa.py and fixes some bugs in aa-complain and the other minitools:

* aa-complain etc. never found profiles that have a profile name (the attachment wasn't checked)

* even if the profile name was given as parameter to aa-complain, it first did "which $parameter" so it never matched on named profiles

* profile names with alternations (without attachment specification) also never matched because the old code didn't use AARE.


References: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=882047#92 (search for "As usual" ;-)

See the individual commit messages for details.

All changes survived my tests (both manually and unittests), but as always when doing bigger changes to aa.py, more manual testing is always welcome ;-)

I propose this patch for 2.12 and 2.13.

Acked-by: John Johansen <john.johansen@canonical.com>
PR: https://gitlab.com/apparmor/apparmor/merge_requests/268
2018-12-08 06:36:34 +00:00
..
apparmor Merge branch 'cboltz-profile-list-2.13' into 'apparmor-2.13' 2018-12-08 06:36:34 +00:00
easyprof Add aa-easyprof and easyprof.py and related pieces from the Ubuntu 2014-02-13 17:53:40 -08:00
po translations: sync from launchpad translations 2018-04-15 06:54:44 -07:00
test Merge branch 'cboltz-profile-list-2.13' into 'apparmor-2.13' 2018-12-08 06:36:34 +00:00
vim all: Use HTTPS links for apparmor.net 2018-09-13 11:45:59 -07:00
aa-audit Switch utils to python3 2016-10-01 20:57:09 +02:00
aa-audit.pod all: Use HTTPS links for apparmor.net 2018-09-13 11:45:59 -07:00
aa-autodep Switch utils to python3 2016-10-01 20:57:09 +02:00
aa-autodep.pod all: Use HTTPS links for apparmor.net 2018-09-13 11:45:59 -07:00
aa-cleanprof drop dead code from tools.py 2017-06-26 21:27:06 +02:00
aa-cleanprof.pod all: Use HTTPS links for apparmor.net 2018-09-13 11:45:59 -07:00
aa-complain Switch utils to python3 2016-10-01 20:57:09 +02:00
aa-complain.pod all: Use HTTPS links for apparmor.net 2018-09-13 11:45:59 -07:00
aa-decode aa-decode: add the ability to support PROCTITLE string 2017-12-24 00:22:24 -08:00
aa-decode.pod manpages: incorporate podchecker; fix errors and (most) warnings 2014-09-15 11:30:47 -07:00
aa-disable Switch utils to python3 2016-10-01 20:57:09 +02:00
aa-disable.pod all: Use HTTPS links for apparmor.net 2018-09-13 11:45:59 -07:00
aa-easyprof Switch utils to python3 2016-10-01 20:57:09 +02:00
aa-easyprof.pod utils: Add option to aa-easyprof to specify the apparmor_parser path 2017-03-02 21:24:05 +00:00
aa-enforce Switch utils to python3 2016-10-01 20:57:09 +02:00
aa-enforce.pod all: Use HTTPS links for apparmor.net 2018-09-13 11:45:59 -07:00
aa-genprof split get_profile_filename into .._from_profile_name and .._from_attachment 2018-11-11 18:33:55 +01:00
aa-genprof.pod all: Use HTTPS links for apparmor.net 2018-09-13 11:45:59 -07:00
aa-logprof json support for logprof and genprof 2017-06-15 18:22:43 +02:00
aa-logprof.pod all: Use HTTPS links for apparmor.net 2018-09-13 11:45:59 -07:00
aa-mergeprof Replace existing_profiles & fix minitools for named profiles 2018-11-11 18:33:56 +01:00
aa-mergeprof.pod all: Use HTTPS links for apparmor.net 2018-09-13 11:45:59 -07:00
aa-notify aa-notify: Read user's configuration file from XDG_CONFIG_HOME 2018-10-04 23:37:39 -07:00
aa-notify.pod Merge branch 'aa-notify-manpage' into 'master' 2018-10-16 15:55:58 +00:00
aa-remove-unknown Don't print a literal '\n' in aa-remove-unknown help 2017-12-01 00:26:56 +01:00
aa-remove-unknown.pod utils: Add aa-remove-unknown utility to unload unknown profiles 2017-03-24 05:08:01 +00:00
aa-sandbox Switch utils to python3 2016-10-01 20:57:09 +02:00
aa-sandbox.pod manpages: incorporate podchecker; fix errors and (most) warnings 2014-09-15 11:30:47 -07:00
aa-status aa-status: split profile from exec name 2018-03-01 14:17:57 -08:00
aa-status.pod all: Use HTTPS links for apparmor.net 2018-09-13 11:45:59 -07:00
aa-unconfined utils: Require apparmor.aa users to call init_aa() 2017-03-02 21:21:53 +00:00
aa-unconfined.pod all: Use HTTPS links for apparmor.net 2018-09-13 11:45:59 -07:00
check_po.pl Ignore untranslated texts in check_po.pl 2017-11-27 23:47:52 +01:00
logprof.conf Merge branch 'zsh' into 'master' 2018-09-24 17:35:10 +00:00
logprof.conf.pod all: Use HTTPS links for apparmor.net 2018-09-13 11:45:59 -07:00
Makefile utils: Add aa-remove-unknown utility to unload unknown profiles 2017-03-24 05:08:01 +00:00
notify.conf comment out use_group to remove group restrictions 2018-03-18 19:56:29 +01:00
python-tools-setup.py utils: stop rewriting shbang lines in setup script 2017-10-26 00:52:31 -07:00
README.md Merge in Kshitij Gupta <kgupta8592@gmail.com>'s rewrite of the 2014-02-12 15:54:00 -08:00
severity.db Update perl abstraction, logprof.conf, severity.db and tests for Debian/Ubuntu 2014-08-20 19:14:24 -05:00

Known Bugs: Will allow multiple letters in the () due to translation/unicode issues with regexing the key. User input will probably bug out in a different locale.