lkml.org 
[lkml]   [2003]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Call security hook from pid*_revalidate
From
Date
Andrew Morton <akpm@osdl.org> writes:

> I'm not sure that the /proc/fd ownership patch is the correct solution to
> that bug yet; we'll see.

> dentry->d_inode->i_uid = task->euid;
> dentry->d_inode->i_gid = task->egid;
> + security_task_to_inode(task, dentry->d_inode);
> return 1;
> }
> d_drop(dentry);
> @@ -899,6 +900,7 @@
> put_files_struct(files);
> dentry->d_inode->i_uid = task->euid;
> dentry->d_inode->i_gid = task->egid;
> + security_task_to_inode(task, dentry->d_inode);
> return 1;
> }
> spin_unlock(&files->file_lock);

Umm.. Wasn't the following needed?

inode->i_uid = 0;
inode->i_gid = 0;
if (ino == PROC_PID_INO || task_dumpable(task)) {
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:47    [W:0.071 / U:0.616 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site