apparmor/utils
Christian Boltz 0232617e89 Fix strip_quotes() to handle empty strings
strip_quotes() assumed its parameter is at least one character long, and
errored out on an empty string.

It also converted a string consisting of a single quote to an empty
string because that single quote had a quote as first and last char.

This commit fixes these two bugs.

Also rewrite TestStripQuotes to use tests[], and add some test for an empty
string, a one-char path (just a slash) and a single quote.

(cherry picked from commit 373e8e23b1)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2020-05-26 00:45:50 -07:00
..
apparmor Fix strip_quotes() to handle empty strings 2020-05-26 00:45:50 -07:00
easyprof Add aa-easyprof and easyprof.py and related pieces from the Ubuntu 2014-02-13 17:53:40 -08:00
po Merge branch 'cboltz-2.12-fix-utils-po' into 'apparmor-2.12' 2018-10-03 16:30:11 +00:00
test Fix strip_quotes() to handle empty strings 2020-05-26 00:45:50 -07:00
vim Merge branch 'cboltz-vim-alias' into 'master' 2020-05-10 22:55:06 +00: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:52:11 -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:52:11 -07:00
aa-cleanprof Switch utils to python3 2016-10-01 20:57:09 +02:00
aa-cleanprof.pod all: Use HTTPS links for apparmor.net 2018-09-13 11:52:11 -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:52:11 -07:00
aa-decode aa-decode: add the ability to support PROCTITLE string 2017-12-24 00:26:17 -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:52:11 -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:52:11 -07:00
aa-genprof utils: Point to the correct Profiles wiki page 2018-09-13 11:52:11 -07:00
aa-genprof.pod all: Use HTTPS links for apparmor.net 2018-09-13 11:52:11 -07:00
aa-logprof utils: Require apparmor.aa users to call init_aa() 2017-03-02 21:21:53 +00:00
aa-logprof.pod all: Use HTTPS links for apparmor.net 2018-09-13 11:52:11 -07:00
aa-mergeprof utils: Require apparmor.aa users to call init_aa() 2017-03-02 21:21:53 +00:00
aa-mergeprof.pod all: Use HTTPS links for apparmor.net 2018-09-13 11:52:11 -07:00
aa-notify aa-notify: Read user's configuration file from XDG_CONFIG_HOME 2018-10-04 23:40:13 -07:00
aa-notify.pod aa-notify man page: update user's configuration file path 2018-10-21 19:40:43 -07:00
aa-remove-unknown Merge branch 'cboltz-remove-unknown-newline' into 'master' 2017-12-01 10:09:58 +00: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 Merge branch 'cboltz-status-parenthesis' into 'master' 2019-09-23 18:56:04 +00:00
aa-status.pod all: Use HTTPS links for apparmor.net 2018-09-13 11:52:11 -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:52:11 -07:00
check_po.pl utitlity to look for problems in the po files. 2007-08-15 19:24:49 +00:00
logprof.conf Merge branch 'zsh' into 'master' 2018-09-24 17:35:31 +00:00
logprof.conf.pod all: Use HTTPS links for apparmor.net 2018-09-13 11:52:11 -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-07-11 22:45:42 -07:00
python-tools-setup.py utils: fix python install for rule/ subdirectory 2015-01-13 13:03:11 -08: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.