1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

torture: Create a base_fsp for a named stream in vfstest

This will enable a simplification in the stream-handling openat vfs
routines.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke 2022-02-22 13:15:02 +01:00 committed by Jeremy Allison
parent b3ab69a435
commit fbce308dd4

View File

@ -405,6 +405,22 @@ static NTSTATUS cmd_open(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, c
goto fail;
}
if (is_named_stream(smb_fname)) {
struct smb_filename *base_name = NULL;
base_name = cp_smb_filename_nostream(NULL, smb_fname);
if (base_name == NULL) {
goto nomem;
}
status = openat_pathref_fsp(fspcwd, base_name);
if (!NT_STATUS_IS_OK(status)) {
goto fail;
}
fsp->base_fsp = base_name->fsp;
}
fd = SMB_VFS_OPENAT(vfs->conn,
fspcwd,
smb_fname,