From: Sebastian Schmidt Date: Fri, 14 Nov 2014 18:51:45 +0000 (-0800) Subject: syslog: Provide stub check_syslog_permissions X-Git-Tag: firefly_0821_release~176^2~2702^2~2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=069fb0b63722f8c9f8b4bbce236793626c89af33;p=firefly-linux-kernel-4.4.55.git 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: Jim Davis Signed-off-by: Sebastian Schmidt Acked-by: Kees Cook Signed-off-by: Tony Luck --- diff --git a/include/linux/syslog.h b/include/linux/syslog.h index 9def5297dbb7..4b7b875a7ce1 100644 --- a/include/linux/syslog.h +++ b/include/linux/syslog.h @@ -48,6 +48,14 @@ #define SYSLOG_FROM_PROC 1 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); +#else +static inline int check_syslog_permissions(int type, bool from_file) +{ + return 0; +} +#endif #endif /* _LINUX_SYSLOG_H */