]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: In unix_convert() component_was_mangled is always false for posix.
authorJeremy Allison <jra@samba.org>
Fri, 15 Oct 2021 23:26:24 +0000 (16:26 -0700)
committerRalph Boehme <slow@samba.org>
Tue, 16 Nov 2021 20:21:37 +0000 (20:21 +0000)
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/filename.c

index 4a050da9659ec0f94ded4b422fa80aa597fc6b00..6ea0687d76321d4db476ce984eeede2c0364bd82 100644 (file)
@@ -1356,7 +1356,13 @@ NTSTATUS unix_convert(TALLOC_CTX *mem_ctx,
         * just a component. JRA.
         */
 
-       if (mangle_is_mangled(state->name, state->conn->params)) {
+       if (state->posix_pathnames) {
+               /*
+                * POSIX names are never mangled and we must not
+                * call into mangling functions.
+                */
+               state->component_was_mangled = false;
+       } else if (mangle_is_mangled(state->name, state->conn->params)) {
                state->component_was_mangled = true;
        }