提交 069fb0b6 编写于 作者: S Sebastian Schmidt 提交者: Tony Luck

syslog: Provide stub check_syslog_permissions

When building without CONFIG_PRINTK, we need to provide a stub
check_syslog_permissions. As there is no way to turn on the
dmesg_restrict sysctl without CONFIG_PRINTK, return success.
Reported-by: NJim Davis <jim.epost@gmail.com>
Signed-off-by: NSebastian Schmidt <yath@yath.de>
Acked-by: NKees Cook <keescook@chromium.org>
Signed-off-by: NTony Luck <tony.luck@intel.com>
上级 68c4a4f8
...@@ -48,6 +48,14 @@ ...@@ -48,6 +48,14 @@
#define SYSLOG_FROM_PROC 1 #define SYSLOG_FROM_PROC 1
int do_syslog(int type, char __user *buf, int count, bool from_file); int do_syslog(int type, char __user *buf, int count, bool from_file);
#ifdef CONFIG_PRINTK
int check_syslog_permissions(int type, bool from_file); int check_syslog_permissions(int type, bool from_file);
#else
static inline int check_syslog_permissions(int type, bool from_file)
{
return 0;
}
#endif
#endif /* _LINUX_SYSLOG_H */ #endif /* _LINUX_SYSLOG_H */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册