apparmor/utils
Christian Boltz 6cc3a3642d
Prevent ANSI terminal injection in aa-unconfined
/proc/$pid/cmdline can be changed by an application, therefore escape it
before printing.

The program name in /proc/$pid/exe can also contain any characters
(except \0 and shashes) and needs escaping.

Note: repr() wraps the string into single quotes, which we have to
remove to avoid changing the output format.

The test program from issue 364 now gets displayed as

    28443 /path/to/issue364 (/\x1b]0;X\x07) not confined

Fixes: https://gitlab.com/apparmor/apparmor/-/issues/364
2024-01-20 23:42:30 +01:00
..
apparmor ask_exec(): no longer skip exec events in hats 2023-12-28 23:12:10 +01:00
easyprof Add aa-easyprof and easyprof.py and related pieces from the Ubuntu 2014-02-13 17:53:40 -08:00
po Update utils/po/ with Launchpad translations revision #2507 2023-02-01 22:28:45 -05:00
test Merge parser: Add support for a default_allow mode 2023-12-23 08:38:18 +00:00
vim apparmor.vim: add support for the 'all' rule 2023-09-10 18:38:48 +02:00
aa-audit Order imports and module-level dunder name assignments. 2022-08-21 11:15:07 -04:00
aa-audit.pod docs: update documentation to point bug reporting to gitlab 2020-05-05 00:10:53 -07:00
aa-autodep Order imports and module-level dunder name assignments. 2022-08-21 11:15:07 -04:00
aa-autodep.pod docs: update documentation to point bug reporting to gitlab 2020-05-05 00:10:53 -07:00
aa-cleanprof Order imports and module-level dunder name assignments. 2022-08-21 11:15:07 -04:00
aa-cleanprof.pod docs: update documentation to point bug reporting to gitlab 2020-05-05 00:10:53 -07:00
aa-complain Order imports and module-level dunder name assignments. 2022-08-21 11:15:07 -04:00
aa-complain.pod docs: update documentation to point bug reporting to gitlab 2020-05-05 00:10:53 -07:00
aa-decode aa-decode: "fix" all remaining shellcheck style violations 2022-02-13 19:43:48 +00:00
aa-decode.pod docs: update documentation to point bug reporting to gitlab 2020-05-05 00:10:53 -07:00
aa-disable Order imports and module-level dunder name assignments. 2022-08-21 11:15:07 -04:00
aa-disable.pod docs: update documentation to point bug reporting to gitlab 2020-05-05 00:10:53 -07:00
aa-easyprof Order imports and module-level dunder name assignments. 2022-08-21 11:15:07 -04:00
aa-easyprof.pod docs: update documentation to point bug reporting to gitlab 2020-05-05 00:10:53 -07:00
aa-enforce Order imports and module-level dunder name assignments. 2022-08-21 11:15:07 -04:00
aa-enforce.pod docs: update documentation to point bug reporting to gitlab 2020-05-05 00:10:53 -07:00
aa-genprof Add option to log aa-logprof json input and output 2023-07-30 21:28:35 +02:00
aa-genprof.pod docs: update documentation to point bug reporting to gitlab 2020-05-05 00:10:53 -07:00
aa-logprof Add aa-logprof test framework 2023-08-13 21:02:50 +02:00
aa-logprof.pod treewide: spelling/typo fixes in comments and docs 2020-12-01 12:47:11 -08:00
aa-mergeprof Order imports and module-level dunder name assignments. 2022-08-21 11:15:07 -04:00
aa-mergeprof.pod docs: update documentation to point bug reporting to gitlab 2020-05-05 00:10:53 -07:00
aa-notify Format aa-notify to follow PEP-8 2023-03-30 22:30:34 -07:00
aa-notify.desktop Add .desktop file for aa-notify 2022-02-12 09:34:26 +00:00
aa-notify.pod docs: update documentation to point bug reporting to gitlab 2020-05-05 00:10:53 -07:00
aa-remove-unknown Mark variables as dummy in a way that shellcheck 0.7.0 supports 2022-02-13 19:43:48 +00:00
aa-remove-unknown.pod docs: update documentation to point bug reporting to gitlab 2020-05-05 00:10:53 -07:00
aa-sandbox Order imports and module-level dunder name assignments. 2022-08-21 11:15:07 -04:00
aa-sandbox.pod docs: update documentation to point bug reporting to gitlab 2020-05-05 00:10:53 -07:00
aa-unconfined Prevent ANSI terminal injection in aa-unconfined 2024-01-20 23:42:30 +01:00
aa-unconfined.pod docs: update documentation to point bug reporting to gitlab 2020-05-05 00:10:53 -07:00
check_po.pl Ignore untranslated texts in check_po.pl 2017-11-27 23:47:52 +01:00
logprof.conf Add option to log aa-logprof json input and output 2023-07-30 21:28:35 +02:00
logprof.conf.pod docs: update documentation to point bug reporting to gitlab 2020-05-05 00:10:53 -07:00
Makefile replace deprecated distutils with setuptools 2021-11-11 20:23:35 -03:00
notify.conf comment out use_group to remove group restrictions 2018-03-18 19:56:29 +01:00
python-tools-setup.py Order imports and module-level dunder name assignments. 2022-08-21 11:15:07 -04:00
README.md Merge in Kshitij Gupta <kgupta8592@gmail.com>'s rewrite of the 2014-02-12 15:54:00 -08:00
severity.db Add CAP_CHECKPOINT_RESTORE to severity.db 2020-10-14 14:01:55 +02: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.