diff options
author | Ralph Boehme <slow@samba.org> | 2020-06-08 09:26:41 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2020-07-18 05:58:40 +0000 |
commit | 4523a0b47d56423216a052df765e39a2389e80e2 (patch) | |
tree | 642cfaa7fd1bfacb5da48521072ca7110b52f5b5 /source3/smbd/open.c | |
parent | 63b9b2a103a6762e18d0bf0f820f42bd85a8bdcc (diff) | |
download | samba-4523a0b47d56423216a052df765e39a2389e80e2.tar.gz |
smbd: ensure we do a base open for internal stream deletes
Otherwise we're not opening the basefile so fsp->base_fsp remains NULL for fsp
handles on streams. As there are some places that use the check (fsp->base_fsp
!= NULL) to check for stream handles, eg streams_xattr_fstat(), we must ensure
it is set otherwise we open a pretty big window for undefined behaviour.
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/smbd/open.c')
-rw-r--r-- | source3/smbd/open.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 79b72784249..11107ce739f 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -5649,8 +5649,8 @@ static NTSTATUS create_file_unixpath(connection_struct *conn, } if ((conn->fs_capabilities & FILE_NAMED_STREAMS) - && is_ntfs_stream_smb_fname(smb_fname) - && (!(private_flags & NTCREATEX_OPTIONS_PRIVATE_STREAM_DELETE))) { + && is_ntfs_stream_smb_fname(smb_fname)) + { uint32_t base_create_disposition; struct smb_filename *smb_fname_base = NULL; uint32_t base_privflags; |