Re: [PATCH] audit: Rename enum audit_state constants to avoid AUDIT_DISABLED redefinition

From: Paul Moore
Date: Mon Jun 07 2021 - 14:18:23 EST


On Mon, Jun 7, 2021 at 1:51 PM Richard Guy Briggs <rgb@xxxxxxxxxx> wrote:
> On 2021-06-07 13:07, Paul Moore wrote:
> > On Mon, Jun 7, 2021 at 5:58 AM Sergey Nazarov <s-nazarov@xxxxxxxxx> wrote:
> > > Hi, Paul!
> > > I think this could be easer. It's enouth to rename AUDIT_DISABLE only.
> > > enum audit_state deals with per-task syscalls audit context, so we can
> > > use AUDIT_CONTEXT_DISABLED for example. If it's okay, I can send a new
> > > patch version.
> >
> > Hi Sergey,
> >
> > I personally prefer the AUDIT_STATE_* enums and would rather see that.
>
> I find AUDITSC_* or AUDIT*CONTEXT* are more helpful since that makes it
> clear it is about syscall context while STATE doesn't make that clear.

We've seen how this will grow to incorporate more than just a syscall
context, see the io_uring work that is ongoing.

Let me be very clear this time, please use the AUDIT_STATE_* enums.

--
paul moore
www.paul-moore.com