diff options
-rw-r--r-- | drivers/staging/android/ram_console.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/staging/android/ram_console.c b/drivers/staging/android/ram_console.c index d956b8441442..b242be246cd8 100644 --- a/drivers/staging/android/ram_console.c +++ b/drivers/staging/android/ram_console.c @@ -99,6 +99,9 @@ static ssize_t ram_console_read_old(struct file *file, char __user *buf, char *str; int ret; + if (dmesg_restrict && !capable(CAP_SYSLOG)) + return -EPERM; + /* Main last_kmsg log */ if (pos < old_log_size) { count = min(len, (size_t)(old_log_size - pos)); |