1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-09 08:58:35 +03:00

shadow_copy2: Ignore VFS_OPEN_HOW_WITH_BACKUP_INTENT

d1846452e96 vfs: Add VFS_OPEN_HOW_WITH_BACKUP_INTENT introduced
VFS_OPEN_HOW_WITH_BACKUP_INTENT for files opened with
FILE_OPEN_FOR_BACKUP_INTENT. shadow_copy2 refuses the open on a file if
any flage in how.resolve is set. Change the check in shadow_copy2 to
allow opening of files with VFS_OPEN_HOW_WITH_BACKUP_INTENT.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15730

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Oct  2 08:06:38 UTC 2024 on atb-devel-224

(cherry picked from commit 30b0fa892ad66bfad92403186f97fd46496e62de)
This commit is contained in:
Christof Schmitt 2024-10-01 13:29:56 -07:00 committed by Jule Anger
parent f36c7d623b
commit 8fa36e029b

View File

@ -1560,7 +1560,7 @@ static int shadow_copy2_openat(vfs_handle_struct *handle,
int ret; int ret;
bool ok; bool ok;
if (how.resolve != 0) { if ((how.resolve & ~VFS_OPEN_HOW_WITH_BACKUP_INTENT) != 0) {
errno = ENOSYS; errno = ENOSYS;
return -1; return -1;
} }