apparmor 4.0.0~alpha2-0ubuntu1 has extra content in aa-status --json output

Bug #2032994 reported by Alex Murray
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apparmor (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

aa-status --json now includes an extra line of output before the actual json output which breaks tools like jq:

$ sudo aa-status --json
apparmor module is loaded.
{"version": "2", "profiles": {"/snap/snapd/19993/usr/lib/snapd/snap-confine": "enforce", "/snap/snapd/19993/usr/lib/snapd/snap-confine//mount-namespace-capture-helper": "enforce", "/usr/bin/man": "enforce", "/usr/bin/pidgin": "enforce", "/usr/bin/pidgin//sanitized_helper": "enforce", "/usr/bin/totem": "enforce", "/usr/bin/totem-audio-preview": "enforce", "/usr/bin/totem-video-thumbnailer": "enforce", "/usr/bin/totem//sanitized_helper": "enforce", "/usr/lib/NetworkManager/nm-dhcp-client.action": "enforce", "/usr/lib/NetworkManager/nm-dhcp-helper": "enforce", "/usr/lib/connman/scripts/dhclient-script": "enforce", "/usr/lib/snapd/snap-confine": "enforce", "/usr/lib/snapd/snap-confine//mount-namespace-capture-helper": "enforce", "/{,usr/}sbin/dhclient": "enforce", "apt-cacher-ng": "enforce", "lsb_release": "enforce", "man_filter": "enforce", "man_groff": "enforce", "nvidia_modprobe": "enforce", "nvidia_modprobe//kmod": "enforce", "rsyslogd": "enforce", "snap-update-ns.lxd": "enforce", "snap.lxd.activate": "enforce", "snap.lxd.benchmark": "enforce", "snap.lxd.buginfo": "enforce", "snap.lxd.check-kernel": "enforce", "snap.lxd.daemon": "enforce", "snap.lxd.hook.configure": "enforce", "snap.lxd.hook.install": "enforce", "snap.lxd.hook.remove": "enforce", "snap.lxd.lxc": "enforce", "snap.lxd.lxc-to-lxd": "enforce", "snap.lxd.lxd": "enforce", "snap.lxd.migrate": "enforce", "snap.lxd.user-daemon": "enforce", "tcpdump": "enforce", "/usr/bin/irssi": "complain", "/usr/bin/ch-checkns": "unconfined", "/usr/bin/ch-run": "unconfined", "/usr/bin/crun": "unconfined", "/usr/bin/flatpak": "unconfined"}, "processes": {"/usr/sbin/rsyslogd": [{"profile": "rsyslogd", "pid": "583", "status": "enforce"}]}
}

$ sudo aa-status --json | jq .
parse error: Invalid numeric literal at line 1, column 9

Proposed fix upstreeam https://gitlab.com/apparmor/apparmor/-/merge_requests/1097

Revision history for this message
Alex Murray (alexmurray) wrote :

I included the proposed upstream fix in apparmor 4.0.0~alpha2-0ubuntu2 - https://launchpadlibrarian.net/683597733/apparmor_4.0.0~alpha2-0ubuntu2_source.changes

Changed in apparmor (Ubuntu):
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apparmor - 4.0.0~alpha2-0ubuntu2

---------------
apparmor (4.0.0~alpha2-0ubuntu2) mantic; urgency=medium

  * Fix invalid JSON output from aa-status --json via upstream patch
    (LP: #2032994)
    - d/p/u/binutils-aa_status.c-quiet-verbose-outputs-when-json.patch

 -- Alex Murray <email address hidden> Fri, 25 Aug 2023 09:48:24 +0930

Changed in apparmor (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.