Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 213425
b: refs/heads/master
c: 1c45601
h: refs/heads/master
i:
  213423: c4c9a7a
v: v3
  • Loading branch information
Jeff Layton authored and Steve French committed Oct 12, 2010
1 parent 5e0b268 commit 06c7022
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9daa42e22030f0c5c357a5e1f8af658411beda6b
refs/heads/master: 1c456013e96f10915578dc61095d19b4906f64ac
12 changes: 9 additions & 3 deletions trunk/fs/cifs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1755,7 +1755,7 @@ int cifs_revalidate_dentry(struct dentry *dentry)
}

int cifs_getattr(struct vfsmount *mnt, struct dentry *dentry,
struct kstat *stat)
struct kstat *stat)
{
struct cifs_sb_info *cifs_sb = CIFS_SB(dentry->d_sb);
struct cifsTconInfo *tcon = cifs_sb_master_tcon(cifs_sb);
Expand All @@ -1765,11 +1765,17 @@ int cifs_getattr(struct vfsmount *mnt, struct dentry *dentry,
generic_fillattr(dentry->d_inode, stat);
stat->blksize = CIFS_MAX_MSGSIZE;
stat->ino = CIFS_I(dentry->d_inode)->uniqueid;

/*
* If on a multiuser mount without unix extensions, and the
* admin hasn't overridden them, set the ownership to the
* fsuid/fsgid of the current process.
*/
if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MULTIUSER) &&
!tcon->unix_ext) {
if (!cifs_sb->mnt_uid)
if (!(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_OVERR_UID))
stat->uid = current_fsuid();
if (!cifs_sb->mnt_uid)
if (!(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_OVERR_GID))
stat->gid = current_fsgid();
}
}
Expand Down

0 comments on commit 06c7022

Please sign in to comment.