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 <[email protected]> --- fs/proc/proc_sysctl.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c index bb16a1e..20e8cbb 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 inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; inode->i_op = &proc_sys_inode_operations; inode->i_fop = &proc_sys_file_operations; + inode->i_flags |= S_PRIVATE; /* tell selinux to ignore this inode */ proc_sys_refresh_inode(inode, table); out: return inode; -- 1.4.4.1.g278f - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- References:
- [PATCH] sysctl selinux: Don't look at table->de
- From: [email protected] (Eric W. Biederman)
- Re: [PATCH] sysctl selinux: Don't look at table->de
- From: Stephen Smalley <[email protected]>
- [PATCH 1/2] sysctl: Add a parent entry to ctl_table and set the parent entry.
- From: [email protected] (Eric W. Biederman)
- [PATCH 2/2] sysctl: Restore the selinux path based label lookup for sysctls.
- From: [email protected] (Eric W. Biederman)
- Re: [PATCH 2/2] sysctl: Restore the selinux path based label lookup for sysctls.
- From: Stephen Smalley <[email protected]>
- Re: [PATCH 2/2] sysctl: Restore the selinux path based label lookup for sysctls.
- From: Stephen Smalley <[email protected]>
- Re: [PATCH 2/2] sysctl: Restore the selinux path based label lookup for sysctls.
- From: [email protected] (Eric W. Biederman)
- Re: [PATCH 2/2] sysctl: Restore the selinux path based label lookup for sysctls.
- From: Stephen Smalley <[email protected]>
- Re: [PATCH 2/2] sysctl: Restore the selinux path based label lookup for sysctls.
- From: [email protected] (Eric W. Biederman)
- Re: [PATCH 2/2] sysctl: Restore the selinux path based label lookup for sysctls.
- From: Stephen Smalley <[email protected]>
- Re: [PATCH 2/2] sysctl: Restore the selinux path based label lookup for sysctls.
- From: [email protected] (Eric W. Biederman)
- [PATCH 0/5] sysctl cleanup selinux fixes
- From: [email protected] (Eric W. Biederman)
- [PATCH 1/5] sysctl: Remove declaration of nonexistent sysctl_init()
- From: [email protected] (Eric W. Biederman)
- [PATCH 2/5] sysctl: Set the parent field in the root sysctl table
- From: [email protected] (Eric W. Biederman)
- [PATCH 3/5] sysctl: Fix the selinux_sysctl_get_sid
- From: [email protected] (Eric W. Biederman)
- [PATCH 4/5] selinux: Enhance selinux to always ignore private inodes.
- From: [email protected] (Eric W. Biederman)
- [PATCH] sysctl selinux: Don't look at table->de
- Prev by Date: Re: [patch 1/3] fs: add an iovec iterator
- Next by Date: -mm merge plans for 2.6.21
- Previous by thread: [PATCH 4/5] selinux: Enhance selinux to always ignore private inodes.
- Next by thread: Re: [PATCH 4/5] selinux: Enhance selinux to always ignore private inodes.
- Index(es):