Fix broken ownership of /proc/sys/ files

D'oh...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Reported-and-tested-by: Peter Palfrader <peter@palfrader.org>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Al Viro 2008-11-16 22:19:10 +00:00 committed by Linus Torvalds
parent 77fb61a04a
commit 5c06fe772d

View File

@ -31,6 +31,7 @@ static struct inode *proc_sys_make_inode(struct super_block *sb,
inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
inode->i_flags |= S_PRIVATE; /* tell selinux to ignore this inode */ inode->i_flags |= S_PRIVATE; /* tell selinux to ignore this inode */
inode->i_mode = table->mode; inode->i_mode = table->mode;
inode->i_uid = inode->i_gid = 0;
if (!table->child) { if (!table->child) {
inode->i_mode |= S_IFREG; inode->i_mode |= S_IFREG;
inode->i_op = &proc_sys_inode_operations; inode->i_op = &proc_sys_inode_operations;