mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 14:41:27 +00:00
check_syslog_permissions() cleanup
Patch fixes drawbacks in heck_syslog_permissions() noticed by AKPM: "from_file handling makes me cry. That's not a boolean - it's an enumerated value with two values currently defined. But the code in check_syslog_permissions() treats it as a boolean and also hardwires the knowledge that SYSLOG_FROM_PROC == 1 (or == `true`). And the name is wrong: it should be called from_proc to match SYSLOG_FROM_PROC." Signed-off-by: Vasily Averin <vvs@virtuozzo.com> Cc: Kees Cook <keescook@chromium.org> Cc: Josh Boyer <jwboyer@redhat.com> Cc: Eric Paris <eparis@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
d194e5d666
commit
3ea4331c60
2 changed files with 8 additions and 8 deletions
|
@ -47,12 +47,12 @@
|
|||
#define SYSLOG_FROM_READER 0
|
||||
#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, int source);
|
||||
|
||||
#ifdef CONFIG_PRINTK
|
||||
int check_syslog_permissions(int type, bool from_file);
|
||||
int check_syslog_permissions(int type, int source);
|
||||
#else
|
||||
static inline int check_syslog_permissions(int type, bool from_file)
|
||||
static inline int check_syslog_permissions(int type, int source)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue