Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp21842537ybl; Mon, 6 Jan 2020 12:24:12 -0800 (PST) X-Google-Smtp-Source: APXvYqynVcVLRQejp71i+dhdHfmqxMcMQLuWt//2oHcD2CieqPx9nEYgcEz4mXb/UWIM93zXdlq0 X-Received: by 2002:a05:6808:a83:: with SMTP id q3mr6729485oij.0.1578342251968; Mon, 06 Jan 2020 12:24:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578342251; cv=none; d=google.com; s=arc-20160816; b=GCnv6kzCiacHoidgZS/w46bj4FQAoe9z84gpLFACckh4bX4zsLc+/Y37cQnOGZ3sQG aqjCDcGbjc4MAsjMNK4kKyoAUhWkuF5DFpTI5HCqqvsgBPDbjGijnU/acAeNHgTC3zPx h+JkKvI8cq1B1/CSiF+49OsEh5bZVh3ocVhOqcz0fiwKah30Zqss3sHmOAJp0O7y7bqX 4m+1r2hl4pj4JzFzz/LZDQrbr2RZznbwNYj5+xFIZ4vwRkLs7HJ4RJx4WsHSYIUQqqsV 1lEriLNwkL8VNbOsWqVvYNKJIrWRWGyiKYYEcSCU5N/cFijHx9bDLO9/iN9GKaBoT7MI KS2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=WvSSNrtyMOlEwL7kDPrpU7Qrf+0pBeCvS9XNXVzBqMc=; b=F/hnRHlJVwnuiV75RoJZHG20BAvRYPqhj+fi5HHYgATjAG1g68RQMNOdy/irrYjleG kZzCshudDz2vfEvRJ4pM30omNiv1zK2mJ4ZsSKyhH8h/GibHnS7lpms/tEKGPE+M8mH8 0NL6I5ParmoDX3L1E46XaHiHL0TqhdYz1VwHIFzxM4iQ+gX2DO5OX2CLgnqeLFx3IAjl Oh02g050whN4zRzgi9XNuMhi14j9PV738xz5xn0F+uIBsBD7CEO3xLDVu9sLWmeiXZfi WpP14/R8DiQKrRgjuOZtxiUEGjNqeuHak79ndEbtI/RgVFOUAikf1kZfOyViQJjvZ0M5 POmQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c126si34390683oib.239.2020.01.06.12.24.00; Mon, 06 Jan 2020 12:24:11 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726788AbgAFUXK (ORCPT + 99 others); Mon, 6 Jan 2020 15:23:10 -0500 Received: from Chamillionaire.breakpoint.cc ([193.142.43.52]:37648 "EHLO Chamillionaire.breakpoint.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726699AbgAFUXK (ORCPT ); Mon, 6 Jan 2020 15:23:10 -0500 Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.92) (envelope-from ) id 1ioYu2-0006hD-1J; Mon, 06 Jan 2020 21:23:06 +0100 Date: Mon, 6 Jan 2020 21:23:06 +0100 From: Florian Westphal To: Richard Guy Briggs Cc: Linux-Audit Mailing List , LKML , netfilter-devel@vger.kernel.org, Paul Moore , sgrubb@redhat.com, omosnace@redhat.com, fw@strlen.de, twoerner@redhat.com, eparis@parisplace.org, ebiederm@xmission.com, tgraf@infradead.org Subject: Re: [PATCH ghak25 v2 8/9] netfilter: add audit operation field Message-ID: <20200106202306.GO795@breakpoint.cc> References: <6768f7c7d9804216853e6e9c59e44f8a10f46b99.1577830902.git.rgb@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6768f7c7d9804216853e6e9c59e44f8a10f46b99.1577830902.git.rgb@redhat.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Richard Guy Briggs wrote: > diff --git a/include/linux/audit.h b/include/linux/audit.h > index 96cabb095eed..5eab4d898c26 100644 > --- a/include/linux/audit.h > +++ b/include/linux/audit.h > @@ -379,7 +379,7 @@ extern int __audit_log_bprm_fcaps(struct linux_binprm *bprm, > extern void __audit_fanotify(unsigned int response); > extern void __audit_tk_injoffset(struct timespec64 offset); > extern void __audit_ntp_log(const struct audit_ntp_data *ad); > -extern void __audit_nf_cfg(const char *name, u8 af, int nentries); > +extern void __audit_nf_cfg(const char *name, u8 af, int nentries, int op); Consider adding an enum instead of int op. > if (audit_enabled) > - audit_nf_cfg(repl->name, AF_BRIDGE, repl->nentries); > + audit_nf_cfg(repl->name, AF_BRIDGE, repl->nentries, 1); audit_nf_cfg(repl->name, AF_BRIDGE, repl->nentries, AUDIT_XT_OP_REPLACE); ... would be a bit more readable than '1'. The name is just an example, you can pick something else.