Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp21772235ybl; Mon, 6 Jan 2020 10:57:14 -0800 (PST) X-Google-Smtp-Source: APXvYqx0uQ8OkWcDID7UUSNmZ2/rI40odvqA736BITRhHAyn7WwjVgfn59JxSSdQbCkYqCHJc4hK X-Received: by 2002:a9d:75c5:: with SMTP id c5mr117964039otl.172.1578337034216; Mon, 06 Jan 2020 10:57:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578337034; cv=none; d=google.com; s=arc-20160816; b=unyYI0UitXJemrqt63OvpPey+u/JbNdiCbdng4qkuVyBhhtkgwU8sR6G/cNwRBFrJX n88gqpTBNwPglbf1ePUKYpePycm9pok6e9xeGAxZxZDl+xJX1GABMLH3se0vt6fgOxID WLS61KCntiyPU/U+KrqHx7tGZVWLmIDPm08URwd21VLbUgP9ZuKXwYqniEO59bb/hEbc tjD4Plef3iYZtJPWHcQ3Ok8u5IhBcPiFXAs1WlIVh0H210o6KToYfA3BAY3K1nNDRWTJ n4/PKwCALkAADFVk2u+ikkZDSDTatdUSQ4LFxNK+pwJAs5B0ryN9J5JttzsOrKSk7AVH xEoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=D0Jq/XsPiURLI1PVAfNfvZIlWS8x7slAAs4CTxeCAgY=; b=BPTtcSnpor4OlcFz2gni7DWDlVXcEXVD4vLRj1ct7bhl6O82ImSYdGWV0nesmpaxqW iA51iv1UGkyBh2A6I+1qeJvBBCfoPynfKjtPwkngzMiRznDrFXvKiJ78nQHhcwHCJEGO /pCNkaIYnGcYNFFnQyxjmlSbG7dz0dbqLQ5BNUxGbIfJPpjK376+Yu79esztg0qVgbYz llRDYl7bCmwKY0xiYUcvujTs7EQA+tzFybrHlxx4cr6NnjD86YAQJwATwqGbO8OfNc+5 TsL0XRm6sPy/E4GWv5ToXcayhc/wAJfRwHUMHztMKU7DoP86Hd+o8toyMgXXzt76eh/W ++iA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=aXeA533t; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z12si35209883otm.189.2020.01.06.10.57.02; Mon, 06 Jan 2020 10:57:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=aXeA533t; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726977AbgAFSzs (ORCPT + 99 others); Mon, 6 Jan 2020 13:55:48 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:40944 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726659AbgAFSzr (ORCPT ); Mon, 6 Jan 2020 13:55:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578336946; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:in-reply-to:in-reply-to:in-reply-to: references:references:references; bh=D0Jq/XsPiURLI1PVAfNfvZIlWS8x7slAAs4CTxeCAgY=; b=aXeA533tz5aHDHVfp899gfJnoz5vq2cRZqjZXOiBwNw8YGAZHX2hHKnngwcC6pvTRcjvJE wFCgRTVix59U3PFZ+xLUBuLNpYnUiHxnNSsKinNOL6nLZlgIQgTEr65lsFWZCbnltOyAUN G0rJqJ4GIYSxB2yUNnUZ/GREvLRHspY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-376-crFK0jXjMhWrZAGya-Bkcw-1; Mon, 06 Jan 2020 13:55:43 -0500 X-MC-Unique: crFK0jXjMhWrZAGya-Bkcw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 288F0108C22F; Mon, 6 Jan 2020 18:55:42 +0000 (UTC) Received: from madcap2.tricolour.ca (ovpn-112-34.phx2.redhat.com [10.3.112.34]) by smtp.corp.redhat.com (Postfix) with ESMTP id 42DB25D9D6; Mon, 6 Jan 2020 18:55:24 +0000 (UTC) From: Richard Guy Briggs To: Linux-Audit Mailing List , LKML , netfilter-devel@vger.kernel.org Cc: Paul Moore , sgrubb@redhat.com, omosnace@redhat.com, fw@strlen.de, twoerner@redhat.com, eparis@parisplace.org, ebiederm@xmission.com, tgraf@infradead.org, Richard Guy Briggs Subject: [PATCH ghak25 v2 5/9] netfilter: x_tables audit only on syscall rule Date: Mon, 6 Jan 2020 13:54:06 -0500 Message-Id: <48636daf8850e06a4d33e99a8a9ad534d2f525d8.1577830902.git.rgb@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Call new audit_nf_cfg() to store table parameters for later use with syscall records. See: https://github.com/linux-audit/audit-kernel/issues/25 See: https://github.com/linux-audit/audit-kernel/issues/35 Signed-off-by: Richard Guy Briggs --- net/netfilter/x_tables.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c index 0094853ab42a..c0416ae52f7f 100644 --- a/net/netfilter/x_tables.c +++ b/net/netfilter/x_tables.c @@ -1401,14 +1401,8 @@ struct xt_table_info *xt_replace_table(struct xt_table *table, } } -#ifdef CONFIG_AUDIT - if (audit_enabled) { - audit_log(audit_context(), GFP_KERNEL, - AUDIT_NETFILTER_CFG, - "table=%s family=%u entries=%u", - table->name, table->af, private->number); - } -#endif + if (audit_enabled) + audit_nf_cfg(table->name, table->af, private->number); return private; } -- 1.8.3.1