]> git.hungrycats.org Git - linux/commitdiff
[PATCH] fix permissions on the `tainted' sysctl
authorRusty Russell <rusty@rustcorp.com.au>
Tue, 24 Aug 2004 04:41:58 +0000 (21:41 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 24 Aug 2004 04:41:58 +0000 (21:41 -0700)
From: Arjan van de Ven <arjanv@redhat.com>

The patch below sets the tainted sysctl file to read only, otherwise
userspace can just overwrite/reset it.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel/sysctl.c

index 4a361348038eff4c2dd4bfa9f3f064685e1bfad7..b3fc45ab0d62d02d5c79b6106961153f18481008 100644 (file)
@@ -300,7 +300,7 @@ static ctl_table kern_table[] = {
                .procname       = "tainted",
                .data           = &tainted,
                .maxlen         = sizeof(int),
-               .mode           = 0644,
+               .mode           = 0444,
                .proc_handler   = &proc_dointvec,
        },
        {