diff options
Diffstat (limited to 'security/commoncap.c')
-rw-r--r-- | security/commoncap.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/security/commoncap.c b/security/commoncap.c index 677fad9d5cba..cf01b2eebb60 100644 --- a/security/commoncap.c +++ b/security/commoncap.c | |||
@@ -897,9 +897,10 @@ error: | |||
897 | int cap_syslog(int type, bool from_file) | 897 | int cap_syslog(int type, bool from_file) |
898 | { | 898 | { |
899 | /* /proc/kmsg can open be opened by CAP_SYS_ADMIN */ | 899 | /* /proc/kmsg can open be opened by CAP_SYS_ADMIN */ |
900 | if (type != 1 && from_file) | 900 | if (type != SYSLOG_ACTION_OPEN && from_file) |
901 | return 0; | 901 | return 0; |
902 | if ((type != 3 && type != 10) && !capable(CAP_SYS_ADMIN)) | 902 | if ((type != SYSLOG_ACTION_READ_ALL && |
903 | type != SYSLOG_ACTION_SIZE_BUFFER) && !capable(CAP_SYS_ADMIN)) | ||
903 | return -EPERM; | 904 | return -EPERM; |
904 | return 0; | 905 | return 0; |
905 | } | 906 | } |