patch-2.2.3 linux/fs/file_table.c

Next file: linux/fs/isofs/file.c
Previous file: linux/fs/fat/mmap.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.2/linux/fs/file_table.c linux/fs/file_table.c
@@ -81,6 +81,8 @@
 		memset(f, 0, sizeof(*f));
 		f->f_count = 1;
 		f->f_version = ++event;
+		f->f_uid = current->fsuid;
+		f->f_gid = current->fsgid;
 		put_inuse(f);
 		return f;
 	}
@@ -119,6 +121,8 @@
 	filp->f_mode   = mode;
 	filp->f_count  = 1;
 	filp->f_dentry = dentry;
+	filp->f_uid    = current->fsuid;
+	filp->f_gid    = current->fsgid;
 	filp->f_op     = dentry->d_inode->i_op->default_file_ops;
 	if (filp->f_op->open)
 		return filp->f_op->open(dentry->d_inode, filp);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)