]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
cifs: don't override the uid/gid in getattr when cifsacl is enabled
authorJeff Layton <jlayton@redhat.com>
Fri, 19 Oct 2012 15:24:37 +0000 (11:24 -0400)
committerJeff Layton <jlayton@redhat.com>
Fri, 19 Oct 2012 15:24:37 +0000 (11:24 -0400)
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>
fs/cifs/inode.c

index afdff79651f1362c697d8f5d755aa4d3a6c66655..ed6208ff85a770771841a0fe54da82dff26bdfa3 100644 (file)
@@ -1791,11 +1791,12 @@ int cifs_getattr(struct vfsmount *mnt, struct dentry *dentry,
        stat->ino = CIFS_I(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 on a multiuser mount without unix extensions or cifsacl being
+        * enabled, 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) &&
+           !(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) &&
            !tcon->unix_ext) {
                if (!(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_OVERR_UID))
                        stat->uid = current_fsuid();