Before this patch we asserted that if we have a base_fsp then
smb_fname must have a stream name attached. Now we also assert that if
we don't have a base_fsp smb_fname is not a stream.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
{
struct connection_struct *conn = fsp->conn;
NTSTATUS status = NT_STATUS_OK;
+ bool fsp_is_stream = fsp_is_alternate_stream(fsp);
+ bool smb_fname_is_stream = is_named_stream(smb_fname);
+
+ SMB_ASSERT(fsp_is_stream == smb_fname_is_stream);
/*
* Never follow symlinks on a POSIX client. The
flags |= O_NOFOLLOW;
}
- if (fsp_is_alternate_stream(fsp)) {
+ if (fsp_is_stream) {
int fd;
- SMB_ASSERT(is_named_stream(smb_fname));
-
fd = SMB_VFS_OPENAT(
conn,
NULL, /* stream open is relative to fsp->base_fsp */