]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Handle the "posix" special case outside of synthetic_smb_fname_split
authorVolker Lendecke <vl@samba.org>
Thu, 8 May 2025 13:06:23 +0000 (15:06 +0200)
committerStefan Metzmacher <metze@samba.org>
Fri, 9 May 2025 09:59:32 +0000 (09:59 +0000)
See next patch

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/smbd/filename.c

index 164e84361e2619ef440ac275fb881e537ad12501..dee3e2164d5f92575644111cac176a907197cff2 100644 (file)
@@ -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;
                }