From: Ralph Boehme Date: Fri, 17 Jul 2020 17:35:50 +0000 (+0200) Subject: smbd: call open_pathref_fsp() in unlink_internals() in wildcard matching loop X-Git-Tag: samba-4.14.0rc1~337 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=94dea7a26c2f4cd4e7ca0a6913cbcbb4b0e6e881;p=thirdparty%2Fsamba.git smbd: call open_pathref_fsp() in unlink_internals() in wildcard matching loop Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index ac997df2e8e..6fcca84b496 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -3466,6 +3466,16 @@ NTSTATUS unlink_internals(connection_struct *conn, goto out; } + status = openat_pathref_fsp(conn->cwd_fsp, f); + if (!NT_STATUS_IS_OK(status) && + !NT_STATUS_EQUAL(status, NT_STATUS_STOPPED_ON_SYMLINK)) + { + TALLOC_FREE(dir_hnd); + TALLOC_FREE(frame); + TALLOC_FREE(talloced); + goto out; + } + status = check_name(conn, f); if (!NT_STATUS_IS_OK(status)) { TALLOC_FREE(dir_hnd);