diff options
Diffstat (limited to 'sys-kernel/usermode-sources/files/usermode-sources-2.6.6.ProcPerms.patch')
-rw-r--r-- | sys-kernel/usermode-sources/files/usermode-sources-2.6.6.ProcPerms.patch | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/sys-kernel/usermode-sources/files/usermode-sources-2.6.6.ProcPerms.patch b/sys-kernel/usermode-sources/files/usermode-sources-2.6.6.ProcPerms.patch deleted file mode 100644 index d90b8d1815d4..000000000000 --- a/sys-kernel/usermode-sources/files/usermode-sources-2.6.6.ProcPerms.patch +++ /dev/null @@ -1,49 +0,0 @@ -# This is a BitKeeper generated diff -Nru style patch. -# -# ChangeSet -# 2004/07/02 18:48:26-07:00 chrisw@osdl.org -# [PATCH] check attr updates in /proc -# -# Any proc entry with default proc_file_inode_operations allow unauthorized -# attribute updates. This is very dangerous for proc entries that rely -# solely on file permissions for open/read/write. -# -# Signed-off-by: Chris Wright <chrisw@osdl.org> -# Signed-off-by: Linus Torvalds <torvalds@osdl.org> -# -# fs/proc/generic.c -# 2004/07/02 15:47:55-07:00 chrisw@osdl.org +14 -7 -# check attr updates in /proc -# -diff -Nru a/fs/proc/generic.c b/fs/proc/generic.c ---- a/fs/proc/generic.c 2004-07-08 17:03:20 -07:00 -+++ b/fs/proc/generic.c 2004-07-08 17:03:20 -07:00 -@@ -231,14 +231,21 @@ - static int proc_notify_change(struct dentry *dentry, struct iattr *iattr) - { - struct inode *inode = dentry->d_inode; -- int error = inode_setattr(inode, iattr); -- if (!error) { -- struct proc_dir_entry *de = PDE(inode); -- de->uid = inode->i_uid; -- de->gid = inode->i_gid; -- de->mode = inode->i_mode; -- } -+ struct proc_dir_entry *de = PDE(inode); -+ int error; - -+ error = inode_change_ok(inode, iattr); -+ if (error) -+ goto out; -+ -+ error = inode_setattr(inode, iattr); -+ if (error) -+ goto out; -+ -+ de->uid = inode->i_uid; -+ de->gid = inode->i_gid; -+ de->mode = inode->i_mode; -+out: - return error; - } - |