[RFC PATCH 4/5] audit: add a missing function definition when !CONFIG_AUDIT

Paul Moore <[email protected]> Fri, 24 Jul 2026 15:56:22 -0400
Newsgroups org.kernel.vger.audit
Message-ID <[email protected]>
The audit_string_contains_control() function does not have a dummy
function definition in the !CONFIG_AUDIT case.

Signed-off-by: Paul Moore <[email protected]>
---
 include/linux/audit.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/linux/audit.h b/include/linux/audit.h
index d327113c913d..ac8f5f77d442 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@ -237,6 +237,10 @@ void audit_log_format(struct audit_buffer *ab, const char *fmt, ...)
 { }
 static inline void audit_log_end(struct audit_buffer *ab)
 { }
+static inline bool audit_string_contains_control(const char *string, int len);
+{
+	return false;
+}
 static inline void audit_log_n_hex(struct audit_buffer *ab,
 				   const unsigned char *buf, int len)
 { }
-- 
2.55.0