diff options
| author | ThiƩbaud Weksteen <tweek@google.com> | 2024-12-05 12:21:00 +1100 |
|---|---|---|
| committer | Paul Moore <paul@paul-moore.com> | 2024-12-15 19:33:07 -0500 |
| commit | 2ef6fc99e0d922a54073e7b6d6465c62f4d3b62b (patch) | |
| tree | 00c624dab350d9cf22772ea712341bc448cf3a3c /security/lsm_audit.c | |
| parent | 4aa176193475d37441cc52b84088542f3a59899a (diff) | |
selinux: add netlink nlmsg_type audit message
Add a new audit message type to capture nlmsg-related information. This
is similar to LSM_AUDIT_DATA_IOCTL_OP which was added for the other
SELinux extended permission (ioctl).
Adding a new type is preferred to adding to the existing
lsm_network_audit structure which contains irrelevant information for
the netlink sockets (i.e., dport, sport).
Signed-off-by: ThiƩbaud Weksteen <tweek@google.com>
[PM: change "nlnk-msgtype" to "nl-msgtype" as discussed]
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security/lsm_audit.c')
| -rw-r--r-- | security/lsm_audit.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/security/lsm_audit.c b/security/lsm_audit.c index 9a8352972086..b2f565c0990a 100644 --- a/security/lsm_audit.c +++ b/security/lsm_audit.c @@ -425,6 +425,9 @@ static void dump_common_audit_data(struct audit_buffer *ab, case LSM_AUDIT_DATA_ANONINODE: audit_log_format(ab, " anonclass=%s", a->u.anonclass); break; + case LSM_AUDIT_DATA_NLMSGTYPE: + audit_log_format(ab, " nl-msgtype=%hu", a->u.nlmsg_type); + break; } /* switch (a->type) */ } |