]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: In get referred_path(), make sure check_path_syntax() is called on returned...
authorJeremy Allison <jra@samba.org>
Fri, 12 Aug 2022 06:55:58 +0000 (23:55 -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 1b66911faf0759b5028f67a4bad1a39f6c6acbda..19160b03c3c651280860156043f919f90d50e7c7 100644 (file)
@@ -1149,6 +1149,13 @@ NTSTATUS get_referred_path(TALLOC_CTX *ctx,
                return status;
        }
 
+       /* Path referrals are always non-POSIX. */
+       status = check_path_syntax(reqpath);
+       if (!NT_STATUS_IS_OK(status)) {
+               TALLOC_FREE(frame);
+               return status;
+       }
+
        jucn->service_name = talloc_strdup(ctx, servicename);
        jucn->volume_name = talloc_strdup(ctx, reqpath);
        if (!jucn->service_name || !jucn->volume_name) {