]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: In filename_convert_internal(), remove call to check_name_with_privilege().
authorJeremy Allison <jra@samba.org>
Fri, 3 Dec 2021 18:10:45 +0000 (10:10 -0800)
committerRalph Boehme <slow@samba.org>
Sat, 11 Dec 2021 07:17:28 +0000 (07:17 +0000)
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 <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/filename.c

index 820a8780acd8a6b06602ed910759532f4cfd7881..b72efc51b93496b30ae10425add9d537dc94f72d 100644 (file)
@@ -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 "