mirror of
https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9.git
synced 2026-09-09 12:05:30 +08:00
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2175323 Upstream Status: audit/next_for_v6.5-rc1 commit e455ca40dbcf2cd50d1e59bf4b2752b300bcdad4 Author: Arnd Bergmann <arnd@arndb.de> Date: Wed May 17 15:10:52 2023 +0200 audit: avoid missing-prototype warnings Building with 'make W=1' reveals two function definitions without a previous prototype in the audit code: lib/compat_audit.c:32:5: error: no previous prototype for 'audit_classify_compat_syscall' [-Werror=missing-prototypes] kernel/audit.c:1813:14: error: no previous prototype for 'audit_serial' [-Werror=missing-prototypes] The first one needs a declaration from linux/audit.h but cannot include that header without causing conflicting (compat) syscall number definitions, so move the it into linux/audit_arch.h. The second one is declared conditionally based on CONFIG_AUDITSYSCALL but needed as a local function even when that option is disabled, so move the declaration out of the #ifdef block. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Paul Moore <paul@paul-moore.com> Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
27 lines
559 B
C
27 lines
559 B
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
/* audit_arch.h -- Arch layer specific support for audit
|
|
*
|
|
* Copyright 2021 Red Hat Inc., Durham, North Carolina.
|
|
* All Rights Reserved.
|
|
*
|
|
* Author: Richard Guy Briggs <rgb@redhat.com>
|
|
*/
|
|
#ifndef _LINUX_AUDIT_ARCH_H_
|
|
#define _LINUX_AUDIT_ARCH_H_
|
|
|
|
enum auditsc_class_t {
|
|
AUDITSC_NATIVE = 0,
|
|
AUDITSC_COMPAT,
|
|
AUDITSC_OPEN,
|
|
AUDITSC_OPENAT,
|
|
AUDITSC_SOCKETCALL,
|
|
AUDITSC_EXECVE,
|
|
AUDITSC_OPENAT2,
|
|
|
|
AUDITSC_NVALS /* count */
|
|
};
|
|
|
|
extern int audit_classify_compat_syscall(int abi, unsigned syscall);
|
|
|
|
#endif
|