Skip to contentSkip to conversation

Allow reading tainted flag as user

PATCH In review Bastian Blank 2 participants 3 messages Apr 22, 2007 Proc sysctl

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

Signature · 2 lines
The joys of love made her human and the agonies of love destroyed her.
		-- Spock, "Requiem for Methuselah", stardate 5842.8
#1 lore raw
Quoted 5 lines · On Sun, 22 Apr 2007 10:39:41 +0200 Bastian Blank <[email protected]> wrote:

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.

there's no patch here.

And I'd be interested to see it, because Ted's patch converted it from 0444 to 0644, which sounds right.

#2 lore raw
Quoted 9 lines · Andrew Morton
Quoted 5 lines · On Sun, 22 Apr 2007 10:39:41 +0200 Bastian Blank <[email protected]> wrote:

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.

there's no patch here.

Ups.

kernel/sysctl.c +1 -1
index 1b255df..c904748 100644
@@ -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;
Signature · 1 line
Captain's Log, star date 21:34.5...