From 11e01bd3720492dc0831e17771c30dd5791265d2 Mon Sep 17 00:00:00 2001 From: Christof Schmitt Date: Tue, 1 Oct 2024 13:29:56 -0700 Subject: [PATCH] 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 Reviewed-by: Volker Lendecke Autobuild-User(master): Volker Lendecke Autobuild-Date(master): Wed Oct 2 08:06:38 UTC 2024 on atb-devel-224 (cherry picked from commit 30b0fa892ad66bfad92403186f97fd46496e62de) --- source3/modules/vfs_shadow_copy2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c index c6e6ecd26c4..309be6e293e 100644 --- a/source3/modules/vfs_shadow_copy2.c +++ b/source3/modules/vfs_shadow_copy2.c @@ -1560,7 +1560,7 @@ static int shadow_copy2_openat(vfs_handle_struct *handle, int ret; bool ok; - if (how.resolve != 0) { + if ((how.resolve & ~VFS_OPEN_HOW_WITH_BACKUP_INTENT) != 0) { errno = ENOSYS; return -1; } -- 2.46.2