streams_depot: Create files when requested
authorVolker Lendecke <vl@samba.org>
Fri, 14 Apr 2023 14:32:42 +0000 (16:32 +0200)
committerJeremy Allison <jra@samba.org>
Mon, 17 Apr 2023 17:14:37 +0000 (17:14 +0000)
If you set "create mask = 0600" no streams will be created....

Tested manually. Not creating an automated test for this, there are so
many places where this can go wrong that testing this individual
glitch does not gain us much confidence.

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

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/modules/vfs_streams_depot.c

index f92e9c8c5fac9c9ec5bcd26d360b32105c8a4406..83019fa07da38ee2b3b2ae197162f1c6fe1def9a 100644 (file)
@@ -690,7 +690,7 @@ static int streams_depot_openat(struct vfs_handle_struct *handle,
        SMB_ASSERT(dirfsp == NULL);
        SMB_ASSERT(VALID_STAT(fsp->base_fsp->fsp_name->st));
 
-       create_it = (how->mode & O_CREAT);
+       create_it = (how->flags & O_CREAT);
 
        /* Determine the stream name, and then open it. */
        status = stream_smb_fname(