]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: Remove directory_has_default_acl().
authorJeremy Allison <jra@samba.org>
Tue, 25 May 2021 00:00:22 +0000 (17:00 -0700)
committerRalph Boehme <slow@samba.org>
Wed, 9 Jun 2021 13:14:30 +0000 (13:14 +0000)
No more users.

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

index dcdbad2c75e108ffb5f7712d131349153dfefe9d..0dd441b44686a8687e83034d023fb7a8a80936e8 100644 (file)
@@ -152,44 +152,6 @@ bool can_write_to_file(connection_struct *conn,
                                FILE_WRITE_DATA));
 }
 
-/****************************************************************************
- Check for an existing default Windows ACL on a directory.
-****************************************************************************/
-
-bool directory_has_default_acl(connection_struct *conn,
-               struct files_struct *dirfsp,
-               struct smb_filename *smb_fname)
-{
-       struct security_descriptor *secdesc = NULL;
-       unsigned int i;
-       NTSTATUS status;
-
-       status = SMB_VFS_GET_NT_ACL_AT(conn,
-                               dirfsp,
-                               smb_fname,
-                               SECINFO_DACL,
-                               talloc_tos(),
-                               &secdesc);
-
-       if (!NT_STATUS_IS_OK(status) ||
-                       secdesc == NULL ||
-                       secdesc->dacl == NULL) {
-               TALLOC_FREE(secdesc);
-               return false;
-       }
-
-       for (i = 0; i < secdesc->dacl->num_aces; i++) {
-               struct security_ace *psa = &secdesc->dacl->aces[i];
-               if (psa->flags & (SEC_ACE_FLAG_OBJECT_INHERIT|
-                               SEC_ACE_FLAG_CONTAINER_INHERIT)) {
-                       TALLOC_FREE(secdesc);
-                       return true;
-               }
-       }
-       TALLOC_FREE(secdesc);
-       return false;
-}
-
 /****************************************************************************
  Check for an existing default Windows ACL on a directory fsp.
 ****************************************************************************/
index f8c4db27e8784ba39331c14678d3305502f9aaa5..26d65df8fab2a00ad24356cd3d319a5d0618f411 100644 (file)
@@ -337,9 +337,6 @@ bool can_delete_file_in_directory(connection_struct *conn,
 bool can_write_to_file(connection_struct *conn,
                        struct files_struct *dirfsp,
                        const struct smb_filename *smb_fname);
-bool directory_has_default_acl(connection_struct *conn,
-                       struct files_struct *dirfsp,
-                       struct smb_filename *smb_fname);
 bool directory_has_default_acl_fsp(struct files_struct *fsp);
 NTSTATUS can_set_delete_on_close(files_struct *fsp, uint32_t dosmode);