aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBastian Blank <bastian@waldi.eu.org>2007-04-23 17:41:14 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-04-24 11:23:08 -0400
commit91fcd412e957f433e9f1abeb0b1926dbeb66ca80 (patch)
tree0ae836c99a78db1e4a962ce064c471a79c9e20f3
parent94e22e13ad063c614b458a019b428ffc118e5c06 (diff)
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>
-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,
1676{ 1676{
1677 int op; 1677 int op;
1678 1678
1679 if (!capable(CAP_SYS_ADMIN)) 1679 if (write && !capable(CAP_SYS_ADMIN))
1680 return -EPERM; 1680 return -EPERM;
1681 1681
1682 op = OP_OR; 1682 op = OP_OR;