SMB3: Backup intent flag missing for directory opens with backupuid mounts
authorSteve French <stfrench@microsoft.com>
Mon, 27 Aug 2018 22:04:13 +0000 (17:04 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Sep 2018 20:43:35 +0000 (22:43 +0200)
commitb0b69369eecc4cdc6680e1bf6e14a632d5a447d9
tree2dc8f86615ce299795914aaf0d15b0fded47f5cb
parent9efcaa7c4afba5628f2650a76f69c798f47eeb18
SMB3: Backup intent flag missing for directory opens with backupuid mounts

commit 5e19697b56a64004e2d0ff1bb952ea05493c088f upstream.

When "backup intent" is requested on the mount (e.g. backupuid or
backupgid mount options), the corresponding flag needs to be set
on opens of directories (and files) but was missing in some
places causing access denied trying to enumerate and backup
servers.

Fixes kernel bugzilla #200953
https://bugzilla.kernel.org/show_bug.cgi?id=200953

Reported-and-tested-by: <whh@rubrik.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
CC: Stable <stable@vger.kernel.org>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/inode.c
fs/cifs/smb2ops.c