The Samba-Bugzilla – Attachment 16335 Details for
Bug 14573
Unable to list previous versions of directory using vfs_shadow_copy2 with GlusterFS snapshots
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for v4-12 and v4-11
patch-v4-12-test (text/plain), 1.70 KB, created by
Guenther Deschner
on 2020-11-12 22:33:09 UTC
(
hide
)
Description:
patch for v4-12 and v4-11
Filename:
MIME Type:
Creator:
Guenther Deschner
Created:
2020-11-12 22:33:09 UTC
Size:
1.70 KB
patch
obsolete
>From 7bca5b3164f8f15bef970c5d1b1097f7ed5e9952 Mon Sep 17 00:00:00 2001 >From: Anoop C S <anoopcs@samba.org> >Date: Thu, 12 Nov 2020 20:27:24 +0530 >Subject: [PATCH] vfs_shadow_copy2: Preserve all open flags assuming ROFS >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Instead of replacing open flags with just O_RDONLY, filter out all those >flags unrelated to a Read Only File System > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=14573 > >Signed-off-by: Anoop C S <anoopcs@samba.org> >Reviewed-by: Ralph Boehme <slow@samba.org> > >Autobuild-User(master): Ralph Böhme <slow@samba.org> >Autobuild-Date(master): Thu Nov 12 17:23:19 UTC 2020 on sn-devel-184 > >(cherry picked from commit e9e06a11daf036abf7a7022ebc8eaefde178aa52) >--- > source3/modules/vfs_shadow_copy2.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c >index 1957015931b..dc4176e25df 100644 >--- a/source3/modules/vfs_shadow_copy2.c >+++ b/source3/modules/vfs_shadow_copy2.c >@@ -1462,7 +1462,7 @@ static int shadow_copy2_open(vfs_handle_struct *handle, > * EINVAL which we carefully map to EROFS. In sum, this > * matches Windows behaviour. > */ >- flags = O_RDONLY; >+ flags &= ~(O_WRONLY | O_RDWR | O_CREAT); > } > return SMB_VFS_NEXT_OPEN(handle, smb_fname, fsp, flags, mode); > } >@@ -1483,7 +1483,7 @@ static int shadow_copy2_open(vfs_handle_struct *handle, > * pwrite() syscall with EINVAL which we carefully map to EROFS. In sum, > * this matches Windows behaviour. > */ >- flags = O_RDONLY; >+ flags &= ~(O_WRONLY | O_RDWR | O_CREAT); > > ret = SMB_VFS_NEXT_OPEN(handle, smb_fname, fsp, flags, mode); > if (ret == -1) { >-- >2.28.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
anoopcs
:
review+
Actions:
View
Attachments on
bug 14573
:
16334
| 16335