From: John Johansen Date: Mon, 16 Jan 2017 08:43:05 +0000 (-0800) Subject: apparmor: fix change_hat debug output X-Git-Tag: v4.11-rc1~138^2~46 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c3e1e584ad3853b3f13ea4bd0aabd43e6c9b9fda;p=platform%2Fkernel%2Flinux-exynos.git apparmor: fix change_hat debug output Signed-off-by: John Johansen --- diff --git a/security/apparmor/procattr.c b/security/apparmor/procattr.c index 4cb5f3d..a9a9ee6 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, ""); return aa_change_hat(hats, count, token, test); }