2023-07-21 11:35:35

by Xiu Jianfeng

[permalink] [raw]
Subject: [PATCH -next] audit: correct audit_filter_inodes() definition

After changes in commit 0590b9335a1c ("fixing audit rule ordering mess,
part 1"), audit_filter_inodes() returns void, so if CONFIG_AUDITSYSCALL
not defined, it should be do {} while(0).

Signed-off-by: Xiu Jianfeng <[email protected]>
---
kernel/audit.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/audit.h b/kernel/audit.h
index 94738bce40b2..a60d2840559e 100644
--- a/kernel/audit.h
+++ b/kernel/audit.h
@@ -334,7 +334,7 @@ static inline int audit_signal_info_syscall(struct task_struct *t)
return 0;
}

-#define audit_filter_inodes(t, c) AUDIT_STATE_DISABLED
+#define audit_filter_inodes(t, c) do { } while (0)
#endif /* CONFIG_AUDITSYSCALL */

extern char *audit_unpack_string(void **bufp, size_t *remain, size_t len);
--
2.34.1



2023-07-21 17:05:18

by Paul Moore

[permalink] [raw]
Subject: Re: [PATCH] audit: correct audit_filter_inodes() definition

On Jul 21, 2023 Xiu Jianfeng <[email protected]> wrote:
>
> After changes in commit 0590b9335a1c ("fixing audit rule ordering mess,
> part 1"), audit_filter_inodes() returns void, so if CONFIG_AUDITSYSCALL
> not defined, it should be do {} while(0).
>
> Signed-off-by: Xiu Jianfeng <[email protected]>
> ---
> kernel/audit.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

Merged into audit/next, thanks.

--
paul-moore.com