From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Guy Briggs Subject: [PATCH ghau40 v2 1/5] AUDIT_CONTAINER message type basic support Date: Fri, 16 Mar 2018 05:12:25 -0400 Message-ID: <1521191549-19764-2-git-send-email-rgb@redhat.com> References: <1521191549-19764-1-git-send-email-rgb@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1521191549-19764-1-git-send-email-rgb-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Linux-Audit Mailing List , linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, LKML , netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org, luto-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, carlos-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, madzcar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org, simo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, eparis-FjpueFixGhCM4zKIHC2jIg@public.gmane.org This defines the message number for the container ID registration record should the kernel headers not be up to date, gives the record number a name for printing and allows the record to be interpreted since it is in the 1000 range like AUDIT_LOGIN. Signed-off-by: Richard Guy Briggs --- lib/libaudit.h | 4 ++++ lib/msg_typetab.h | 1 + lib/netlink.c | 1 + 3 files changed, 6 insertions(+) diff --git a/lib/libaudit.h b/lib/libaudit.h index b681e8d..6d431b9 100644 --- a/lib/libaudit.h +++ b/lib/libaudit.h @@ -242,6 +242,10 @@ extern "C" { #define AUDIT_GET_FEATURE 1019 /* Get which features are enabled */ #endif +#ifndef AUDIT_CONTAINER +#define AUDIT_CONTAINER 1020 /* Container creation notice */ +#endif + #ifndef AUDIT_MMAP #define AUDIT_MMAP 1323 /* Descriptor and flags in mmap */ #endif diff --git a/lib/msg_typetab.h b/lib/msg_typetab.h index 966865f..e2fd536 100644 --- a/lib/msg_typetab.h +++ b/lib/msg_typetab.h @@ -44,6 +44,7 @@ _S(AUDIT_LOGIN, "LOGIN" ) //_S(AUDIT_TTY_SET, "TTY_SET" ) //_S(AUDIT_SET_FEATURE, "SET_FEATURE" ) //_S(AUDIT_GET_FEATURE, "GET_FEATURE" ) +_S(AUDIT_CONTAINER, "CONTAINER" ) _S(AUDIT_USER_AUTH, "USER_AUTH" ) _S(AUDIT_USER_ACCT, "USER_ACCT" ) _S(AUDIT_USER_MGMT, "USER_MGMT" ) diff --git a/lib/netlink.c b/lib/netlink.c index 5b2028f..8847875 100644 --- a/lib/netlink.c +++ b/lib/netlink.c @@ -184,6 +184,7 @@ static int adjust_reply(struct audit_reply *rep, int len) break; case AUDIT_USER: case AUDIT_LOGIN: + case AUDIT_CONTAINER: case AUDIT_KERNEL: case AUDIT_FIRST_USER_MSG...AUDIT_LAST_USER_MSG: case AUDIT_FIRST_USER_MSG2...AUDIT_LAST_USER_MSG2: -- 1.8.3.1