]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
UBUNTU: SAUCE: apparmor: drop prefixing abs root labels with '='
authorJohn Johansen <john.johansen@canonical.com>
Tue, 6 Oct 2020 21:35:10 +0000 (14:35 -0700)
committerPaolo Pisati <paolo.pisati@canonical.com>
Tue, 2 Nov 2021 07:24:50 +0000 (08:24 +0100)
This prefix was not ever meant to go to the logs, and is just a debug
hint. Unfortunately it is showing up in the logs resulting in a double
'=' eg.

  subj==firefox

which has the potential to break some log parsing tools.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Andrea Righi <andrea.righi@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
security/apparmor/label.c

index e68bcedca976b9340919216cfd7bdfa55deb268b..464766cf1ef2297106d0e2373e05c9472fa64322 100644 (file)
@@ -1632,13 +1632,10 @@ int aa_label_snxprint(char *str, size_t size, struct aa_ns *ns,
        AA_BUG(!str && size != 0);
        AA_BUG(!label);
 
-       if (flags & FLAG_ABS_ROOT) {
+       if (flags & FLAG_ABS_ROOT)
                ns = root_ns;
-               len = snprintf(str, size, "=");
-               update_for_len(total, len, size, str);
-       } else if (!ns) {
+       else if (!ns)
                ns = labels_ns(label);
-       }
 
        label_for_each(i, label, profile) {
                if (aa_ns_visible(ns, profile->ns, flags & FLAG_VIEW_SUBNS)) {