summaryrefslogtreecommitdiffstats
path: root/kernel/sysctl.c
diff options
context:
space:
mode:
authorBastian Blank <bastian@waldi.eu.org>2007-04-23 14:41:14 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-04-24 08:23:08 -0700
commit91fcd412e957f433e9f1abeb0b1926dbeb66ca80 (patch)
tree0ae836c99a78db1e4a962ce064c471a79c9e20f3 /kernel/sysctl.c
parent94e22e13ad063c614b458a019b428ffc118e5c06 (diff)
downloadlinux-91fcd412e957f433e9f1abeb0b1926dbeb66ca80.tar.bz2
Allow reading tainted flag as user
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 <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>
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r--kernel/sysctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 1b255df4fcd0..c904748f2290 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;