]> git.hungrycats.org Git - linux/commit
[PATCH] check permission in ->open for /proc/sys/
authorAndrew Morton <akpm@osdl.org>
Wed, 1 Oct 2003 17:58:24 +0000 (10:58 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Wed, 1 Oct 2003 17:58:24 +0000 (10:58 -0700)
commitdc5f46be739c2290275f0034a3ed53312cc17843
tree296a1fc6d07e8acaac8c61f2cc20d3985754dbc9
parent206a70f22b5fc94e58a7e75f1d4bce1215c24ad7
[PATCH] check permission in ->open for /proc/sys/

From: Christoph Hellwig <hch@lst.de>

It's the only abuse of proc_iops left (except the totally b0rked comx
driver).  The patch is from Al, I just forward-ported it from 2.4.

Background: struct proc_dir_entry has a struct inode_operations *proc_iops
member, it's from Linux's stoneage and used internally by procfs to assign
either the link or directory inode ops.

Unfortunately some drivers started to abuse it do do bad things like create
on lookup (that's the comx thingy which relies on unexported symbols and thus
is broken for modular builds since mid-2.3) or various ->permission tricks
(all gone by now).

After this patch is gone I have another one that kills proc_iops and just
uses a normal conditional inside procfs to assign the right one directly.
kernel/sysctl.c