From: Jeremy Allison Date: Fri, 3 Dec 2021 18:10:45 +0000 (-0800) Subject: s3: smbd: In filename_convert_internal(), remove call to check_name_with_privilege(). X-Git-Tag: tdb-1.4.6~335 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b18c2abae99563e411b0dd798e1c4a59e87c2ccc;p=thirdparty%2Fsamba.git s3: smbd: In filename_convert_internal(), remove call to check_name_with_privilege(). We now always pass NULL as struct smb_request *smbreq, so this code path can never be taken. Comment out check_name_with_privilege() as it's now no longer used. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c index 820a8780acd..b72efc51b93 100644 --- a/source3/smbd/filename.c +++ b/source3/smbd/filename.c @@ -1499,6 +1499,7 @@ static NTSTATUS check_name(connection_struct *conn, return NT_STATUS_OK; } +#if 0 /**************************************************************************** Must be called as root. Creates the struct privilege_paths attached to the struct smb_request if this call is successful. @@ -1517,6 +1518,7 @@ static NTSTATUS check_name_with_privilege(connection_struct *conn, smb_fname, smbreq); } +#endif /**************************************************************************** Check if two filenames are equal. @@ -2046,11 +2048,8 @@ static NTSTATUS filename_convert_internal(TALLOC_CTX *ctx, TALLOC_FREE(smb_fname); return status; } - } else if (!smbreq) { - status = check_name(conn, smb_fname); } else { - status = check_name_with_privilege(conn, smbreq, - smb_fname); + status = check_name(conn, smb_fname); } if (!NT_STATUS_IS_OK(status)) { DEBUG(3,("filename_convert_internal: check_name failed "