From: Jeremy Allison Date: Fri, 15 Oct 2021 23:26:24 +0000 (-0700) Subject: s3: smbd: In unix_convert() component_was_mangled is always false for posix. X-Git-Tag: ldb-2.5.0~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1cc5a394209f018f4c41d07bc0c790fb2bd5b29e;p=thirdparty%2Fsamba.git s3: smbd: In unix_convert() component_was_mangled is always false for posix. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c index 4a050da9659..6ea0687d763 100644 --- a/source3/smbd/filename.c +++ b/source3/smbd/filename.c @@ -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; }