aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2007-02-14 03:34:16 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-14 11:10:00 -0500
commit86a71dbd3e81e8870d0f0e56b87875f57e58222b (patch)
tree71f5d47c38d0674b5037c435fb00adcb889ccad2
parentbbaca6c2e7ef0f663bc31be4dad7cf530f6c4962 (diff)
[PATCH] sysctl: hide the sysctl proc inodes from selinux
Since the security checks are applied on each read and write of a sysctl file, just like they are applied when calling sys_sysctl, they are redundant on the standard VFS constructs. Since it is difficult to compute the security labels on the standard VFS constructs we just mark the sysctl inodes in proc private so selinux won't even bother with them. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--fs/proc/proc_sysctl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
index bb16a1e78826..20e8cbb34364 100644
--- a/fs/proc/proc_sysctl.c
+++ b/fs/proc/proc_sysctl.c
@@ -47,6 +47,7 @@ static struct inode *proc_sys_make_inode(struct inode *dir, struct ctl_table *ta
47 inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; 47 inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
48 inode->i_op = &proc_sys_inode_operations; 48 inode->i_op = &proc_sys_inode_operations;
49 inode->i_fop = &proc_sys_file_operations; 49 inode->i_fop = &proc_sys_file_operations;
50 inode->i_flags |= S_PRIVATE; /* tell selinux to ignore this inode */
50 proc_sys_refresh_inode(inode, table); 51 proc_sys_refresh_inode(inode, table);
51out: 52out:
52 return inode; 53 return inode;