diff options
author | Sebastian Schmidt <yath@yath.de> | 2014-11-14 21:51:45 +0300 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2014-11-17 21:28:04 +0300 |
commit | 069fb0b63722f8c9f8b4bbce236793626c89af33 (patch) | |
tree | 9e017189673b5dff08e6a470bb600e52cac64c8c /include/linux/syslog.h | |
parent | 68c4a4f8abc60c9440ede9cd123d48b78325f7a3 (diff) | |
download | linux-069fb0b63722f8c9f8b4bbce236793626c89af33.tar.xz |
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 <jim.epost@gmail.com>
Signed-off-by: Sebastian Schmidt <yath@yath.de>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'include/linux/syslog.h')
-rw-r--r-- | include/linux/syslog.h | 8 |
1 files changed, 8 insertions, 0 deletions
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 */ |