summaryrefslogtreecommitdiffstats
path: root/security/apparmor/ipc.c
diff options
context:
space:
mode:
authorJohn Johansen <john.johansen@canonical.com>2018-02-01 11:24:10 +0100
committerJohn Johansen <john.johansen@canonical.com>2018-02-09 11:30:00 -0800
commit98cf5bbff413eadf1b9cb195a7b80cc61c72a50e (patch)
tree14260d80410c7756c0b2898c2429ba41f06a8d5a /security/apparmor/ipc.c
parentb5beb07ad32ab533027aa988d96a44965ec116f7 (diff)
downloadlinux-98cf5bbff413eadf1b9cb195a7b80cc61c72a50e.tar.bz2
apparmor: fix logging of the existence test for signals
The existence test is not being properly logged as the signal mapping maps it to the last entry in the named signal table. This is done to help catch bugs by making the 0 mapped signal value invalid so that we can catch the signal value not being filled in. When fixing the off-by-one comparision logic the reporting of the existence test was broken, because the logic behind the mapped named table was hidden. Fix this by adding a define for the name lookup and using it. Cc: Stable <stable@vger.kernel.org> Fixes: f7dc4c9a855a1 ("apparmor: fix off-by-one comparison on MAXMAPPED_SIG") Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor/ipc.c')
-rw-r--r--security/apparmor/ipc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/apparmor/ipc.c b/security/apparmor/ipc.c
index b40678f3c1d5..586facd35f7c 100644
--- a/security/apparmor/ipc.c
+++ b/security/apparmor/ipc.c
@@ -174,7 +174,7 @@ static void audit_signal_cb(struct audit_buffer *ab, void *va)
audit_signal_mask(ab, aad(sa)->denied);
}
}
- if (aad(sa)->signal < MAXMAPPED_SIG)
+ if (aad(sa)->signal < MAXMAPPED_SIGNAME)
audit_log_format(ab, " signal=%s", sig_names[aad(sa)->signal]);
else
audit_log_format(ab, " signal=rtmin+%d",