Skip to content

Commit d3d1fce

Browse files
jtlaytonsmfrench
authored andcommitted
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: Shirish Pargaonkar <shirishpargaonkar@gmail.com> Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <smfrench@gmail.com>
1 parent b1a6dc2 commit d3d1fce

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎fs/cifs/inode.c‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1791,11 +1791,12 @@ int cifs_getattr(struct vfsmount *mnt, struct dentry *dentry,
17911791
stat->ino = CIFS_I(inode)->uniqueid;
17921792

17931793
/*
1794-
* If on a multiuser mount without unix extensions, and the admin hasn't
1795-
* overridden them, set the ownership to the fsuid/fsgid of the current
1796-
* process.
1794+
* If on a multiuser mount without unix extensions or cifsacl being
1795+
* enabled, and the admin hasn't overridden them, set the ownership
1796+
* to the fsuid/fsgid of the current process.
17971797
*/
17981798
if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MULTIUSER) &&
1799+
!(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) &&
17991800
!tcon->unix_ext) {
18001801
if (!(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_OVERR_UID))
18011802
stat->uid = current_fsuid();

0 commit comments

Comments
 (0)