mirror of https://gitee.com/openkylin/linux.git
Allow reading tainted flag as user
The commit 34f5a39899
restricted reading
of the tainted value. The attached patch changes this back to a
write-only check and restores the read behaviour of older versions.
Signed-off-by: Bastian Blank <bastian@waldi.eu.org>
Cc: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
94e22e13ad
commit
91fcd412e9
|
@ -1676,7 +1676,7 @@ static int proc_dointvec_taint(ctl_table *table, int write, struct file *filp,
|
|||
{
|
||||
int op;
|
||||
|
||||
if (!capable(CAP_SYS_ADMIN))
|
||||
if (write && !capable(CAP_SYS_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
op = OP_OR;
|
||||
|
|
Loading…
Reference in New Issue