[SCM] Samba Shared Repository - branch master updated

Ralph Böhme slow at samba.org
Thu Nov 12 17:24:02 UTC 2020


The branch, master has been updated
       via  e9e06a11daf vfs_shadow_copy2: Preserve all open flags assuming ROFS
      from  8036bf9717f s3:smbd: Fix possible null pointer dereference in token_contains_name()

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit e9e06a11daf036abf7a7022ebc8eaefde178aa52
Author: Anoop C S <anoopcs at samba.org>
Date:   Thu Nov 12 20:27:24 2020 +0530

    vfs_shadow_copy2: Preserve all open flags assuming ROFS
    
    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 at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>
    
    Autobuild-User(master): Ralph Böhme <slow at samba.org>
    Autobuild-Date(master): Thu Nov 12 17:23:19 UTC 2020 on sn-devel-184

-----------------------------------------------------------------------

Summary of changes:
 source3/modules/vfs_shadow_copy2.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c
index e5413b75128..665080060d2 100644
--- a/source3/modules/vfs_shadow_copy2.c
+++ b/source3/modules/vfs_shadow_copy2.c
@@ -1351,7 +1351,7 @@ static int shadow_copy2_openat(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_OPENAT(handle,
 					   dirfsp,
@@ -1385,7 +1385,7 @@ static int shadow_copy2_openat(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_OPENAT(handle,
 				  dirfsp,


-- 
Samba Shared Repository



More information about the samba-cvs mailing list