From: Jeff Layton Date: Sun, 25 Nov 2012 13:00:40 +0000 (-0500) Subject: cifs: don't override the uid/gid in getattr when cifsacl is enabled X-Git-Tag: upstream/snapshot3+hdmi~6105^2~32 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d3d1fce11dbbf4246f1c37839b13757f08aec3b7;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 Signed-off-by: Jeff Layton Signed-off-by: Steve French --- diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index afdff79..ed6208f 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c @@ -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();