mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
shadow_copy2: Fix stream open for streams_depot paths
streams_depot hands us absolute paths with : filename components instead of having set smb_fname_in->stream_name. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15358 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Mon Apr 17 18:11:07 UTC 2023 on atb-devel-224
This commit is contained in:
parent
0327334c89
commit
526f381f41
@ -1 +0,0 @@
|
||||
^samba.tests.libsmb-basic.samba.tests.libsmb-basic.LibsmbTestCase.test_libsmb_shadow_depot\(fileserver_smb1\)
|
@ -1522,15 +1522,22 @@ static struct smb_filename *shadow_copy2_openat_name(
|
||||
if (fsp->base_fsp != NULL) {
|
||||
struct smb_filename *base_fname = fsp->base_fsp->fsp_name;
|
||||
|
||||
SMB_ASSERT(is_named_stream(smb_fname_in));
|
||||
if (smb_fname_in->base_name[0] == '/') {
|
||||
/*
|
||||
* Special-case stream names from streams_depot
|
||||
*/
|
||||
result = cp_smb_filename(mem_ctx, smb_fname_in);
|
||||
} else {
|
||||
|
||||
result = synthetic_smb_fname(
|
||||
mem_ctx,
|
||||
base_fname->base_name,
|
||||
smb_fname_in->stream_name,
|
||||
&smb_fname_in->st,
|
||||
smb_fname_in->twrp,
|
||||
smb_fname_in->flags);
|
||||
SMB_ASSERT(is_named_stream(smb_fname_in));
|
||||
|
||||
result = synthetic_smb_fname(mem_ctx,
|
||||
base_fname->base_name,
|
||||
smb_fname_in->stream_name,
|
||||
&smb_fname_in->st,
|
||||
smb_fname_in->twrp,
|
||||
smb_fname_in->flags);
|
||||
}
|
||||
} else {
|
||||
result = full_path_from_dirfsp_atname(
|
||||
mem_ctx, dirfsp, smb_fname_in);
|
||||
|
Loading…
Reference in New Issue
Block a user