提交 d3d1fce1 编写于 作者: J Jeff Layton 提交者: Steve French

cifs: don't override the uid/gid in getattr when cifsacl is enabled

If we're using cifsacl, then we don't want to override the uid/gid with
the current uid/gid, since that would prevent you from being able to
upcall for this info.
Reviewed-by: NShirish Pargaonkar <shirishpargaonkar@gmail.com>
Signed-off-by: NJeff Layton <jlayton@redhat.com>
Signed-off-by: NSteve French <smfrench@gmail.com>
上级 b1a6dc21
...@@ -1791,11 +1791,12 @@ int cifs_getattr(struct vfsmount *mnt, struct dentry *dentry, ...@@ -1791,11 +1791,12 @@ int cifs_getattr(struct vfsmount *mnt, struct dentry *dentry,
stat->ino = CIFS_I(inode)->uniqueid; stat->ino = CIFS_I(inode)->uniqueid;
/* /*
* If on a multiuser mount without unix extensions, and the admin hasn't * If on a multiuser mount without unix extensions or cifsacl being
* overridden them, set the ownership to the fsuid/fsgid of the current * enabled, and the admin hasn't overridden them, set the ownership
* process. * to the fsuid/fsgid of the current process.
*/ */
if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MULTIUSER) && if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MULTIUSER) &&
!(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) &&
!tcon->unix_ext) { !tcon->unix_ext) {
if (!(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_OVERR_UID)) if (!(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_OVERR_UID))
stat->uid = current_fsuid(); stat->uid = current_fsuid();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册