diff options
author | David Howells <dhowells@redhat.com> | 2008-11-13 18:39:25 -0500 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2008-11-13 18:39:25 -0500 |
commit | d76b0d9b2d87cfc95686e148767cbf7d0e22bdc0 (patch) | |
tree | 1a2956614018d245facb256ffb8662568cdabcd4 /fs/hppfs/hppfs.c | |
parent | 1d045980e1eff4800472f0e81df9460640c8eee9 (diff) |
CRED: Use creds in file structs
Attach creds to file structs and discard f_uid/f_gid.
file_operations::open() methods (such as hppfs_open()) should use file->f_cred
rather than current_cred(). At the moment file->f_cred will be current_cred()
at this point.
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: James Morris <jmorris@namei.org>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'fs/hppfs/hppfs.c')
-rw-r--r-- | fs/hppfs/hppfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/hppfs/hppfs.c b/fs/hppfs/hppfs.c index 795e2c130ad7..b278f7f52024 100644 --- a/fs/hppfs/hppfs.c +++ b/fs/hppfs/hppfs.c | |||
@@ -426,7 +426,7 @@ static int file_mode(int fmode) | |||
426 | 426 | ||
427 | static int hppfs_open(struct inode *inode, struct file *file) | 427 | static int hppfs_open(struct inode *inode, struct file *file) |
428 | { | 428 | { |
429 | const struct cred *cred = current_cred(); | 429 | const struct cred *cred = file->f_cred; |
430 | struct hppfs_private *data; | 430 | struct hppfs_private *data; |
431 | struct vfsmount *proc_mnt; | 431 | struct vfsmount *proc_mnt; |
432 | struct dentry *proc_dentry; | 432 | struct dentry *proc_dentry; |
@@ -490,7 +490,7 @@ static int hppfs_open(struct inode *inode, struct file *file) | |||
490 | 490 | ||
491 | static int hppfs_dir_open(struct inode *inode, struct file *file) | 491 | static int hppfs_dir_open(struct inode *inode, struct file *file) |
492 | { | 492 | { |
493 | const struct cred *cred = current_cred(); | 493 | const struct cred *cred = file->f_cred; |
494 | struct hppfs_private *data; | 494 | struct hppfs_private *data; |
495 | struct vfsmount *proc_mnt; | 495 | struct vfsmount *proc_mnt; |
496 | struct dentry *proc_dentry; | 496 | struct dentry *proc_dentry; |