patch-2.4.7 linux/fs/proc/base.c
Next file: linux/fs/proc/proc_misc.c
Previous file: linux/fs/partitions/check.c
Back to the patch index
Back to the overall index
- Lines: 30
- Date:
Fri Jul 20 12:39:56 2001
- Orig file:
v2.4.6/linux/fs/proc/base.c
- Orig date:
Tue Jul 3 17:08:21 2001
diff -u --recursive --new-file v2.4.6/linux/fs/proc/base.c linux/fs/proc/base.c
@@ -645,6 +645,20 @@
/* building an inode */
+static int task_dumpable(struct task_struct *task)
+{
+ int dumpable = 0;
+ struct mm_struct *mm;
+
+ task_lock(task);
+ mm = task->mm;
+ if (mm)
+ dumpable = mm->dumpable;
+ task_unlock(task);
+ return dumpable;
+}
+
+
static struct inode *proc_pid_make_inode(struct super_block * sb, struct task_struct *task, int ino)
{
struct inode * inode;
@@ -670,7 +684,7 @@
inode->u.proc_i.task = task;
inode->i_uid = 0;
inode->i_gid = 0;
- if (ino == PROC_PID_INO || task->dumpable) {
+ if (ino == PROC_PID_INO || task_dumpable(task)) {
inode->i_uid = task->euid;
inode->i_gid = task->egid;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)