From eaff826aed31169b09d89a9f1b12015ee2e62f03 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 8 Jun 2021 11:37:57 -0700 Subject: [PATCH] s3: smbd: Remove smbd_check_access_rights(). No longer used. There are now no more callers of SMB_VFS_GET_NT_ACL_AT(). Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- source3/smbd/open.c | 37 ------------------------------------- source3/smbd/proto.h | 5 ----- 2 files changed, 42 deletions(-) diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 1eea2e8ffd2..aea2eaf27b8 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -243,43 +243,6 @@ access_denied: return NT_STATUS_OK; } -NTSTATUS smbd_check_access_rights(struct connection_struct *conn, - struct files_struct *dirfsp, - const struct smb_filename *smb_fname, - bool use_privs, - uint32_t access_mask) -{ - /* Check if we have rights to open. */ - NTSTATUS status; - struct security_descriptor *sd = NULL; - - status = SMB_VFS_GET_NT_ACL_AT(conn, - dirfsp, - smb_fname, - (SECINFO_OWNER | - SECINFO_GROUP | - SECINFO_DACL), - talloc_tos(), - &sd); - - if (NT_STATUS_EQUAL(status, NT_STATUS_ACCESS_DENIED)) { - status = NT_STATUS_OK; - } - if (!NT_STATUS_IS_OK(status)) { - DEBUG(10, ("smbd_check_access_rights: Could not get acl " - "on %s: %s\n", - smb_fname_str_dbg(smb_fname), - nt_errstr(status))); - return status; - } - - return smbd_check_access_rights_sd(conn, - smb_fname, - sd, - use_privs, - access_mask); -} - NTSTATUS smbd_check_access_rights_fsp(struct files_struct *fsp, bool use_privs, uint32_t access_mask) diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index af798310b41..fd090f15655 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -725,11 +725,6 @@ void reply_nttranss(struct smb_request *req); /* The following definitions come from smbd/open.c */ -NTSTATUS smbd_check_access_rights(struct connection_struct *conn, - struct files_struct *dirfsp, - const struct smb_filename *smb_fname, - bool use_privs, - uint32_t access_mask); NTSTATUS smbd_check_access_rights_fsp(struct files_struct *fsp, bool use_privs, uint32_t access_mask); -- 2.47.3