aboutsummaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorJohn Johansen2017-01-16 00:43:05 -0800
committerJohn Johansen2017-01-16 01:18:48 -0800
commitc3e1e584ad3853b3f13ea4bd0aabd43e6c9b9fda (patch)
tree6073fca05153aaf5ae874b185361034fe0727d34 /security
parent5ef50d014c59240c2cac38594377583c4e9ea4fa (diff)
apparmor: fix change_hat debug output
Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security')
-rw-r--r--security/apparmor/procattr.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/security/apparmor/procattr.c b/security/apparmor/procattr.c
index 4cb5f3dc906d..a9a9ee6659ae 100644
--- a/security/apparmor/procattr.c
+++ b/security/apparmor/procattr.c
@@ -139,12 +139,13 @@ int aa_setprocattr_changehat(char *args, size_t size, int test)
for (count = 0; (hat < end) && count < 16; ++count) {
char *next = hat + strlen(hat) + 1;
hats[count] = hat;
+ AA_DEBUG("%s: (pid %d) Magic 0x%llx count %d hat '%s'\n"
+ , __func__, current->pid, token, count, hat);
hat = next;
}
- }
-
- AA_DEBUG("%s: Magic 0x%llx Hat '%s'\n",
- __func__, token, hat ? hat : NULL);
+ } else
+ AA_DEBUG("%s: (pid %d) Magic 0x%llx count %d Hat '%s'\n",
+ __func__, current->pid, token, count, "<NULL>");
return aa_change_hat(hats, count, token, test);
}