smbd: ensure we do a base open for internal stream deletes
authorRalph Boehme <slow@samba.org>
Mon, 8 Jun 2020 07:26:41 +0000 (09:26 +0200)
committerJeremy Allison <jra@samba.org>
Sat, 18 Jul 2020 05:58:40 +0000 (05:58 +0000)
commit4523a0b47d56423216a052df765e39a2389e80e2
tree642cfaa7fd1bfacb5da48521072ca7110b52f5b5
parent63b9b2a103a6762e18d0bf0f820f42bd85a8bdcc
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>
source3/smbd/open.c