linux/fs/notify
Richard Guy Briggs 032bffd494 fanotify,audit: Allow audit to use the full permission event response
This patch passes the full response so that the audit function can use all
of it. The audit function was updated to log the additional information in
the AUDIT_FANOTIFY record.

Currently the only type of fanotify info that is defined is an audit
rule number, but convert it to hex encoding to future-proof the field.
Hex encoding suggested by Paul Moore <paul@paul-moore.com>.

The {subj,obj}_trust values are {0,1,2}, corresponding to no, yes, unknown.

Sample records:
  type=FANOTIFY msg=audit(1600385147.372:590): resp=2 fan_type=1 fan_info=3137 subj_trust=3 obj_trust=5
  type=FANOTIFY msg=audit(1659730979.839:284): resp=1 fan_type=0 fan_info=0 subj_trust=2 obj_trust=2

Suggested-by: Steve Grubb <sgrubb@redhat.com>
Link: https://lore.kernel.org/r/3075502.aeNJFYEL58@x2
Tested-by: Steve Grubb <sgrubb@redhat.com>
Acked-by: Steve Grubb <sgrubb@redhat.com>
Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Message-Id: <bcb6d552e517b8751ece153e516d8b073459069c.1675373475.git.rgb@redhat.com>
2023-02-07 12:53:53 +01:00
..
dnotify dnotify: use fsnotify group lock helpers 2022-04-25 14:37:34 +02:00
fanotify fanotify,audit: Allow audit to use the full permission event response 2023-02-07 12:53:53 +01:00
inotify fs: inotify: Fix typo in inotify comment 2022-07-01 14:49:56 +02:00
fdinfo.c fanotify: prepare for setting event flags in ignore mask 2022-07-01 14:51:13 +02:00
fdinfo.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
fsnotify.c fsnotify: Fix comment typo 2022-07-26 13:38:47 +02:00
fsnotify.h fsnotify: remove unused declaration 2022-09-09 11:40:03 +02:00
group.c fsnotify: create helpers for group mark_mutex lock 2022-04-25 14:37:22 +02:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mark.c fsnotify: allow adding an inode mark without pinning inode 2022-04-25 14:42:45 +02:00
notification.c fsnotify: Pass group argument to free_event 2021-10-27 12:34:18 +02:00