apparmor/binutils
Christian Boltz f72c001643
aa-status: Fix malformed json output
In some cases (if profiles in complain and enforce mode are loaded), the
`i` loop runs more than once, which also means `j == 0` is true in the
middle of the json. This causes invalid json.

This patch fixes this.

This is a regression related to 22aa9b6161
/ https://gitlab.com/apparmor/apparmor/-/merge_requests/964 /
https://gitlab.com/apparmor/apparmor/-/issues/295
which fixed another case of invalid json if a process was unconfined
while having a profile defined.

Note: I also tested this patch for the "unconfined, but has a profile
defined" case to ensure it doesn't break what
22aa9b6161 fixed.
2023-05-19 22:25:05 +02:00
..
po treewide: spelling/typo fixes in code strings 2020-12-01 12:47:18 -08:00
aa-enabled.pod Fix typos 2020-10-25 11:54:56 +00:00
aa-exec.pod docs: update documentation to point bug reporting to gitlab 2020-05-05 00:10:53 -07:00
aa-features-abi.pod Fix typos 2020-10-25 11:54:56 +00:00
aa-status.pod aa-status: update man page with filter information 2023-05-03 01:22:33 -07:00
aa_enabled.c Fix typos 2020-10-25 11:54:56 +00:00
aa_exec.c Error out on conflicting aa-exec parameters 2020-05-21 17:04:40 +02:00
aa_features_abi.c binutils/aa-features-abi: fix failure to close fd due to shadowed var decl 2021-09-27 13:07:11 -07:00
aa_status.c aa-status: Fix malformed json output 2023-05-19 22:25:05 +02:00
cJSON.c aa-status: add json pretty printing using cJSON 2020-05-07 01:12:28 -07:00
cJSON.h aa-status: add json pretty printing using cJSON 2020-05-07 01:12:28 -07:00
Makefile apparmor: fix manpage order 2020-10-07 06:30:33 -07:00