Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932178AbbDQHh6 (ORCPT ); Fri, 17 Apr 2015 03:37:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47486 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932077AbbDQHhH (ORCPT ); Fri, 17 Apr 2015 03:37:07 -0400 From: Richard Guy Briggs To: containers@lists.linux-foundation.org, linux-kernel@vger.kernel.org, linux-audit@redhat.com Cc: Richard Guy Briggs , sgrubb@redhat.com, eparis@parisplace.org, pmoore@redhat.com, arozansk@redhat.com, ebiederm@xmission.com, serge@hallyn.com, zohar@linux.vnet.ibm.com, linux-api@vger.kernel.org Subject: [PATCH V6 10/10] audit: emit AUDIT_NS_INFO record with AUDIT_VIRT_CONTROL record Date: Fri, 17 Apr 2015 03:35:57 -0400 Message-Id: <6d1846744df4efe1c62a22283150d9c9ca1c2412.1429252659.git.rgb@redhat.com> In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1347 Lines: 40 Signed-off-by: Richard Guy Briggs --- include/uapi/linux/audit.h | 2 ++ kernel/audit.c | 2 ++ 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/include/uapi/linux/audit.h b/include/uapi/linux/audit.h index 567b45f..b6a55fe 100644 --- a/include/uapi/linux/audit.h +++ b/include/uapi/linux/audit.h @@ -163,6 +163,8 @@ #define AUDIT_KERNEL 2000 /* Asynchronous audit record. NOT A REQUEST. */ +#define AUDIT_VIRT_CONTROL 2500 /* Start, Pause, Stop VM */ + /* Rule flags */ #define AUDIT_FILTER_USER 0x00 /* Apply rule to user-generated messages */ #define AUDIT_FILTER_TASK 0x01 /* Apply rule at task creation (not syscall) */ diff --git a/kernel/audit.c b/kernel/audit.c index a7b1b61..8a01d88 100644 --- a/kernel/audit.c +++ b/kernel/audit.c @@ -943,6 +943,8 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh) } audit_set_portid(ab, NETLINK_CB(skb).portid); audit_log_end(ab); + if (msg_type == AUDIT_VIRT_CONTROL) + audit_log_ns_info(NULL); mutex_lock(&audit_cmd_mutex); } break; -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/