From: Jeremy Allison Date: Tue, 9 Aug 2022 17:41:39 +0000 (-0700) Subject: s3: smbd: Make sure we have identical check_path_syntax logic in smbd_smb2_create_dur... X-Git-Tag: talloc-2.4.0~1465 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a2a097fc3d6a89fb970c1ea3ea75fde93ddb545e;p=thirdparty%2Fsamba.git s3: smbd: Make sure we have identical check_path_syntax logic in smbd_smb2_create_durable_lease_check(), as for smb2_create. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15144 Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/smb2_create.c b/source3/smbd/smb2_create.c index 8ef605dea66..75b9c7d28ff 100644 --- a/source3/smbd/smb2_create.c +++ b/source3/smbd/smb2_create.c @@ -430,6 +430,7 @@ static NTSTATUS smbd_smb2_create_durable_lease_check(struct smb_request *smb1req uint32_t ucf_flags; NTTIME twrp = fsp->fsp_name->twrp; NTSTATUS status; + bool is_dfs = (smb1req->flags2 & FLAGS2_DFS_PATHNAMES); if (lease_ptr == NULL) { if (fsp->oplock_type != LEASE_OPLOCK) { @@ -459,7 +460,7 @@ static NTSTATUS smbd_smb2_create_durable_lease_check(struct smb_request *smb1req } /* This also converts '\' to '/' */ - status = check_path_syntax(filename); + status = check_path_syntax_smb2(filename, is_dfs); if (!NT_STATUS_IS_OK(status)) { TALLOC_FREE(filename); return status;