projects/linux·commit 91fcd412

Allow reading tainted flag as user

91fcd412 · Bastian Blank <[email protected]> · 2007-04-23 14:41:14 -07:00

The commit 34f5a39899f3f3e815da64f48ddb72942d86c366 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 <[email protected]>
Cc: Theodore Ts'o <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
91fcd412e957f433e9f1abeb0b1926dbeb66ca80
Parents
94e22e13

Changes

1 files changed · +1 −1

FileStatusAddDelContent
kernel/sysctl.cmodified+1−1View file

kernel/sysctl.c

View file
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 1b255df..c904748 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -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;