]> git.baikalelectronics.ru Git - kernel.git/commit
lsm_audit: avoid overloading the "key" audit field
authorOndrej Mosnacek <omosnace@redhat.com>
Tue, 14 Sep 2021 13:15:16 +0000 (15:15 +0200)
committerPaul Moore <paul@paul-moore.com>
Mon, 20 Sep 2021 02:47:04 +0000 (22:47 -0400)
commitcc6da570de8c679414dc9246d6367fb13494105e
tree7c03f0b777553148d2d26db0c9c58130a385dd98
parentd83f3c8e72bafacec13c9e68f95b118dc407e3e2
lsm_audit: avoid overloading the "key" audit field

The "key" field is used to associate records with the rule that
triggered them, os it's not a good idea to overload it with an
additional IPC key semantic. Moreover, as the classic "key" field is a
text field, while the IPC key is numeric, AVC records containing the IPC
key info actually confuse audit userspace, which tries to interpret the
number as a hex-encoded string, thus showing garbage for example in the
ausearch "interpret" output mode.

Hence, change it to "ipc_key" to fix both issues and also make the
meaning of this field more clear.

Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
Reviewed-by: Richard Guy Briggs <rgb@redhat.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/lsm_audit.c