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

From: Paul Moore
Date: Tue Jun 08 2021 - 22:12:34 EST


On Tue, Jun 8, 2021 at 2:32 AM Sergey Nazarov <s-nazarov@xxxxxxxxx> wrote:
>
> AUDIT_DISABLED defined in kernel/audit.h as element of enum audit_state
> and redefined in kernel/audit.c. This produces a warning when kernel builds
> with syscalls audit disabled and brokes kernel build if -Werror used.
> enum audit_state used in syscall audit code only. This patch changes
> enum audit_state constants prefix AUDIT to AUDIT_STATE to avoid
> AUDIT_DISABLED redefinition.
>
> v2: the comments of Richard Guy Briggs and Paul Moore were taken into account
>
> Signed-off-by: Sergey Nazarov <s-nazarov@xxxxxxxxx>
> ---
> kernel/audit.h | 8 ++++----
> kernel/auditsc.c | 34 +++++++++++++++++-----------------
> 2 files changed, 21 insertions(+), 21 deletions(-)

Merged into audit/next, thanks Sergey.

--
paul moore
www.paul-moore.com