Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp21772320ybl; Mon, 6 Jan 2020 10:57:22 -0800 (PST) X-Google-Smtp-Source: APXvYqyPAulFEMyfs1IRJaWeqNJ5gakDvbI08J899gzbA1CWhikfWVtAtjWrd1pXLJp9UIqni5Tx X-Received: by 2002:a05:6808:143:: with SMTP id h3mr6342549oie.61.1578337042105; Mon, 06 Jan 2020 10:57:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578337042; cv=none; d=google.com; s=arc-20160816; b=A/+sVs+gGSYzgQEP9xqNarTu64fopTrprBpIywVK+hqO6QlCT5OG2QgsBOKB5IGQyI CIAF7t6bZ03P1ruTznD0VqY+sZrDH/7djgV/isL7ETAW7HgrNJWryXCZZH3vFIXy6RIC 7sOLT9QbVKKVqlLJ0UG/AENGi1BHR3bAC7yWqT/ZshlHBzQ8U3jf3tzBweb/RYpqMc2w To9PYZW4O9ngPkru9kjdOSB9cIr0p5g1iwNPS+VI2Gp5x0s9dPPr8RRqI5uGe40gjwb+ d/nFV3K5+TuszOenwgp/x/U/xQc2Y+4iKJR5Zazqk5dLtEFjFdOK55LxcVw0xACCutcv vrxw== 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=MlTPBzneVtYNNjunC5VrHTisOJyPpDHhYjuAHEQxRGs=; b=pWoKe01LD7YqLjsYVYwE4E02noiG4fQGAcooxp5lu5ix8Zy2OvrryeQ2Tymu8S3H5a NE/RHjQA9XJkNxpjOC+P46kkOqhd6e4TNF5YjU0iSY0cooQP0tSvE1WyQdI4o5uy8Adt gvzQWkJuYj6iaUP5U4hXQxB2gYAlfFDW35MP8Nvv10M7ixEheCJ0m6XU4yohoTSfl7s+ GMU42+Cv6cDeSVJ/ozTuOxM3ErsopyNqDPeGt5mrd0j1xmVyQzALTHF9YDRcxvbI0tzE QjFkibWDOP/N1+6J1/89DO+euZhRCxI1nLQZ5bdYyuhwcf4R5fZXFYfvgtozOPBRbcUw t8xA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="aq2+/KrI"; 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 y24si31452905oih.24.2020.01.06.10.57.10; Mon, 06 Jan 2020 10:57:22 -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="aq2+/KrI"; 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 S1727027AbgAFSz6 (ORCPT + 99 others); Mon, 6 Jan 2020 13:55:58 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:55120 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726784AbgAFSz6 (ORCPT ); Mon, 6 Jan 2020 13:55:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578336957; 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=MlTPBzneVtYNNjunC5VrHTisOJyPpDHhYjuAHEQxRGs=; b=aq2+/KrITuK2XmbF30VYQtMcccddNjzj02OK3xSuvD25yrM0DxmVCemNfAW1SKuPFL0ZfE ynTj2X3E5fZ3hPMPzP5WLoIjzVd62c2OlxT8W8A9sUzmUfYtPdA8FJhi03u5x9Y28JELNd kScYTM3ALZE5CciKdDwsf/kIMbFUtnQ= 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-258-IhwVYfG6M6e3qWwIeHVFBw-1; Mon, 06 Jan 2020 13:55:53 -0500 X-MC-Unique: IhwVYfG6M6e3qWwIeHVFBw-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 D68041013DA4; Mon, 6 Jan 2020 18:55:51 +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 230685DE54; Mon, 6 Jan 2020 18:55:42 +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 6/9] netfilter: ebtables audit only on syscall rule Date: Mon, 6 Jan 2020 13:54:07 -0500 Message-Id: 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/bridge/netfilter/ebtables.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c index b3c784ae33a0..57dc11c0f349 100644 --- a/net/bridge/netfilter/ebtables.c +++ b/net/bridge/netfilter/ebtables.c @@ -1048,14 +1048,8 @@ static int do_replace_finish(struct net *net, struct ebt_replace *repl, vfree(table); vfree(counterstmp); -#ifdef CONFIG_AUDIT - if (audit_enabled) { - audit_log(audit_context(), GFP_KERNEL, - AUDIT_NETFILTER_CFG, - "table=%s family=%u entries=%u", - repl->name, AF_BRIDGE, repl->nentries); - } -#endif + if (audit_enabled) + audit_nf_cfg(repl->name, AF_BRIDGE, repl->nentries); return ret; free_unlock: -- 1.8.3.1