From: Al Viro <viro@ZenIV.linux.org.uk>
To: Peter Palfrader <peter@palfrader.org>, linux-kernel@vger.kernel.org
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: broken ownership of /proc/sys/ files on 2.6.27
Date: Sun, 16 Nov 2008 22:19:10 +0000 [thread overview]
Message-ID: <20081116221910.GQ28946@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20081116205922.GI28958@anguilla.noreply.org>
On Sun, Nov 16, 2008 at 09:59:22PM +0100, Peter Palfrader wrote:
> Hi,
>
> on several (probably all) of my systems running a 2.6.27 kernel on at
> least i386, amd64, ia64, sparc proc/sys does have files not owned by
> root:
D'oh...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
index 94fcfff..06ed10b 100644
--- a/fs/proc/proc_sysctl.c
+++ b/fs/proc/proc_sysctl.c
@@ -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_flags |= S_PRIVATE; /* tell selinux to ignore this inode */
inode->i_mode = table->mode;
+ inode->i_uid = inode->i_gid = 0;
if (!table->child) {
inode->i_mode |= S_IFREG;
inode->i_op = &proc_sys_inode_operations;
next prev parent reply other threads:[~2008-11-16 22:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-16 20:59 broken ownership of /proc/sys/ files on 2.6.27 Peter Palfrader
2008-11-16 21:31 ` Rafael J. Wysocki
2008-11-16 21:33 ` Frans Pop
2008-11-16 21:36 ` Maxim Levitsky
2008-11-16 21:41 ` Måns Rullgård
2008-11-16 22:06 ` Bernd Zeimetz
2008-11-16 22:19 ` Al Viro [this message]
2008-11-16 22:37 ` Peter Palfrader
2008-11-16 22:44 ` Jiri Slaby
2008-11-16 22:56 ` Al Viro
2008-11-16 23:23 ` Fix broken ownership of /proc/sys/ files Linus Torvalds
2008-11-17 4:06 ` Al Viro
2008-11-17 18:50 ` Linus Torvalds
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081116221910.GQ28946@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=peter@palfrader.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.