From 0bcd86c3db60d5ad46c830544ae06514843587f6 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 8 May 2025 15:06:23 +0200 Subject: [PATCH] smbd: Handle the "posix" special case outside of synthetic_smb_fname_split See next patch Signed-off-by: Volker Lendecke Reviewed-by: Stefan Metzmacher --- source3/smbd/filename.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c index 164e84361e2..dee3e2164d5 100644 --- a/source3/smbd/filename.c +++ b/source3/smbd/filename.c @@ -694,7 +694,23 @@ filename_convert_dirfsp_nosymlink(TALLOC_CTX *mem_ctx, if (is_fake_file_path(name_in)) { const struct timespec omit = make_omit_timespec(); - smb_fname = synthetic_smb_fname_split(mem_ctx, name_in, posix); + + if (posix) { + /* + * No stream name to look for + */ + smb_fname = synthetic_smb_fname( + mem_ctx, + name_in, + NULL, + NULL, + 0, + SMB_FILENAME_POSIX_PATH); + } else { + smb_fname = synthetic_smb_fname_split(mem_ctx, + name_in, + false); + } if (smb_fname == NULL) { return NT_STATUS_NO_MEMORY; } -- 2.47.3