From: Jeremy Allison Date: Tue, 25 May 2021 00:00:22 +0000 (-0700) Subject: s3: smbd: Remove directory_has_default_acl(). X-Git-Tag: tevent-0.11.0~599 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d615e90965dd35a46ca4a13c616b2cba3a30b23;p=thirdparty%2Fsamba.git s3: smbd: Remove directory_has_default_acl(). No more users. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/file_access.c b/source3/smbd/file_access.c index dcdbad2c75e..0dd441b4468 100644 --- a/source3/smbd/file_access.c +++ b/source3/smbd/file_access.c @@ -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. ****************************************************************************/ diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index f8c4db27e87..26d65df8fab 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -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);