[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.
Showing
Please register or sign in to comment