Fixes a regression introduced by the fixes for bug 15126 where we crash in
vfs_default in vfswrap_stat():
assert failed: !is_named_stream(smb_fname)
The frontend calls into the VFS from build_stream_path() with a stream path
without checking if the share supports streams.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15126
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15161
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
[slow@samba.org: change from master adapted for unix_convert()]
Autobuild-User(v4-15-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-15-test): Tue Sep 6 07:31:51 UTC 2022 on sn-devel-184
+++ /dev/null
-^samba3.smb2.create_no_streams.no_stream\(fileserver\)
state->stream = strchr_m(state->smb_fname->base_name, ':');
if (state->stream != NULL) {
- char *tmp = talloc_strdup(state->smb_fname, state->stream);
+ char *tmp = NULL;
+
+ if (!(conn->fs_capabilities & FILE_NAMED_STREAMS)) {
+ status = NT_STATUS_OBJECT_NAME_INVALID;
+ goto err;
+ }
+
+ tmp = talloc_strdup(state->smb_fname, state->stream);
if (tmp == NULL) {
status = NT_STATUS_NO_MEMORY;
goto err;