smbd: fix close order of base_fsp and stream_fsp in smb_fname_fsp_destructor()
authorRalph Boehme <slow@samba.org>
Thu, 16 Nov 2023 09:50:32 +0000 (10:50 +0100)
committerJule Anger <janger@samba.org>
Tue, 21 Nov 2023 10:24:37 +0000 (10:24 +0000)
commitd522d15c82bc413fcc83106c93fd3f051a04f270
tree4038009ae0918e084f74da27a176e64cc03b18b5
parenta2ad66e4933b6fd0a30218b779d5e3e8e9b4750c
smbd: fix close order of base_fsp and stream_fsp in smb_fname_fsp_destructor()

VFS modules like streams_xattr use the function fsp_is_alternate_stream() on the
fsp to determine in an fsp is a stream, eg in streams_xattr_close(). If
fspo->base_fsp is arlready set to NULL, this won't work anymore.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Nov 16 18:31:17 UTC 2023 on atb-devel-224

(cherry picked from commit 4481a67c1b20549a71d6c5132b637798a09f966d)

Autobuild-User(v4-18-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-18-test): Tue Nov 21 10:24:37 UTC 2023 on atb-devel-224
source3/smbd/files.c