s3: smbd: Fix fsp/fd leak when looking up a non-existent stream name on a file.
authorJeremy Allison <jra@samba.org>
Tue, 28 Feb 2023 19:20:12 +0000 (11:20 -0800)
committerJule Anger <janger@samba.org>
Wed, 8 Mar 2023 11:16:53 +0000 (11:16 +0000)
commit800f4f9cc9dba727cdca44b3f799cfa83f5f0854
tree64160aaddef9e060642e1d7390b7a0261afb7cc3
parent3fb8f2c579cf13fd7d0367ace97d8d2ff5d2c5ac
s3: smbd: Fix fsp/fd leak when looking up a non-existent stream name on a file.

When open_stream_pathref_fsp() returns
NT_STATUS_OBJECT_NAME_NOT_FOUND, smb_fname_rel->fsp
has been set to NULL, so we must free base_fsp separately
to prevent fd-leaks when opening a stream that doesn't
exist.

Remove knownfail.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Fri Mar  3 16:37:27 UTC 2023 on atb-devel-224

(cherry picked from commit 3f84a6df4546e0f1e62dfbcd0b823ea29499a787)

Autobuild-User(v4-18-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-18-test): Wed Mar  8 11:16:54 UTC 2023 on atb-devel-224
selftest/knownfail.d/stream_rename [deleted file]
source3/smbd/filename.c