]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: Remove smbd_check_access_rights(). No longer used.
authorJeremy Allison <jra@samba.org>
Tue, 8 Jun 2021 18:37:57 +0000 (11:37 -0700)
committerRalph Boehme <slow@samba.org>
Wed, 9 Jun 2021 13:14:31 +0000 (13:14 +0000)
There are now no more callers of SMB_VFS_GET_NT_ACL_AT().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/open.c
source3/smbd/proto.h

index 1eea2e8ffd28f94525c99bc66800f225374f5f67..aea2eaf27b8db54e410169a9b934f3cfd2b196af 100644 (file)
@@ -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)
index af798310b41df317ea5f5427439dc0ef7df6178c..fd090f1565530e770c386cb4d9b4b5087774c407 100644 (file)
@@ -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);