Skip to content

Commit

Permalink
syslog: Provide stub check_syslog_permissions
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sebastian Schmidt authored and Tony Luck committed Nov 17, 2014
1 parent 68c4a4f commit 069fb0b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions include/linux/syslog.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

0 comments on commit 069fb0b

Please sign in to comment.