lkml.org 
[lkml]   [2003]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] Call security hook from pid*_revalidate
From
Date
On Tue, 2003-08-19 at 04:38, Andrew Morton wrote:
> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.0-test3/2.6.0-test3-mm3/

This patch against 2.6.0-test3-mm3 adds calls to the
security_task_to_inode hook to the pid*_revalidate functions to ensure
that the inode security field is also updated appropriately for
/proc/pid inodes. This corresponds with the uid/gid update performed by
the proc-pid-setuid-ownership-fix.patch that is already in -mm3.

fs/proc/base.c | 2 ++
1 files changed, 2 insertions(+)

diff -X /home/sds/dontdiff -ru linux-2.6.0-test3-mm3/fs/proc/base.c linux-2.6.0-test3-mm3-t2i/fs/proc/base.c
--- linux-2.6.0-test3-mm3/fs/proc/base.c 2003-08-19 14:41:23.000000000 -0400
+++ linux-2.6.0-test3-mm3-t2i/fs/proc/base.c 2003-08-19 14:45:49.000000000 -0400
@@ -875,6 +875,7 @@

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);




--
Stephen Smalley <sds@epoch.ncsc.mil>
National Security Agency

-
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.590 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site