]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: In get create_junction(), make sure check_path_syntax() is called on return...
authorJeremy Allison <jra@samba.org>
Fri, 12 Aug 2022 06:57:51 +0000 (23:57 -0700)
committerJeremy Allison <jra@samba.org>
Fri, 12 Aug 2022 18:19:31 +0000 (18:19 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15144

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/msdfs.c

index 19160b03c3c651280860156043f919f90d50e7c7..5a2413ed8b97469d1e9b6496f17e31aeae83756e 100644 (file)
@@ -1426,6 +1426,12 @@ bool create_junction(TALLOC_CTX *ctx,
                return False;
        }
 
+       /* Junction create paths are always non-POSIX. */
+       status = check_path_syntax(reqpath);
+       if (!NT_STATUS_IS_OK(status)) {
+               return false;
+       }
+
        jucn->service_name = talloc_strdup(ctx, servicename);
        jucn->volume_name = talloc_strdup(ctx, reqpath);
        jucn->comment = lp_comment(ctx, lp_sub, snum);