From cfbe3048afbb6557852b7f887c32f10bf283e7ae Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 17 May 2018 11:49:55 -0700 Subject: [PATCH] s3: posix_acls: Remove dead functions fchmod_acl()/chmod_acl(). No longer used. Signed-off-by: Jeremy Allison Reviewed-by: Volker Lendecke --- source3/smbd/posix_acls.c | 38 -------------------------------------- source3/smbd/proto.h | 4 ---- 2 files changed, 42 deletions(-) diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c index 6396f818176..8c57e7a959a 100644 --- a/source3/smbd/posix_acls.c +++ b/source3/smbd/posix_acls.c @@ -4102,19 +4102,6 @@ static int copy_access_posix_acl(connection_struct *conn, return ret; } -/**************************************************************************** - Do a chmod by setting the ACL USER_OBJ, GROUP_OBJ and OTHER bits in an ACL - and set the mask to rwx. Needed to preserve complex ACLs set by NT. - Note that name is in UNIX character set. -****************************************************************************/ - -int chmod_acl(connection_struct *conn, - const struct smb_filename *smb_fname, - mode_t mode) -{ - return copy_access_posix_acl(conn, smb_fname, smb_fname, mode); -} - /**************************************************************************** Check for an existing default POSIX ACL on a directory. ****************************************************************************/ @@ -4164,31 +4151,6 @@ int inherit_access_posix_acl(connection_struct *conn, return copy_access_posix_acl(conn, inherit_from_fname, smb_fname, mode); } -/**************************************************************************** - Do an fchmod by setting the ACL USER_OBJ, GROUP_OBJ and OTHER bits in an ACL - and set the mask to rwx. Needed to preserve complex ACLs set by NT. -****************************************************************************/ - -int fchmod_acl(files_struct *fsp, mode_t mode) -{ - connection_struct *conn = fsp->conn; - SMB_ACL_T posix_acl = NULL; - int ret = -1; - - if ((posix_acl = SMB_VFS_SYS_ACL_GET_FD(fsp, talloc_tos())) == NULL) - return -1; - - if ((ret = chmod_acl_internals(conn, posix_acl, mode)) == -1) - goto done; - - ret = SMB_VFS_SYS_ACL_SET_FD(fsp, posix_acl); - - done: - - TALLOC_FREE(posix_acl); - return ret; -} - /**************************************************************************** Map from wire type to permset. ****************************************************************************/ diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index 262338d81e4..23cc46bec0b 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -782,14 +782,10 @@ NTSTATUS set_nt_acl(files_struct *fsp, uint32_t security_info_sent, const struct int get_acl_group_bits( connection_struct *conn, const struct smb_filename *smb_fname, mode_t *mode); -int chmod_acl(connection_struct *conn, - const struct smb_filename *smb_fname, - mode_t mode); int inherit_access_posix_acl(connection_struct *conn, const char *inherit_from_dir, const struct smb_filename *smb_fname, mode_t mode); -int fchmod_acl(files_struct *fsp, mode_t mode); bool set_unix_posix_default_acl(connection_struct *conn, const struct smb_filename *smb_fname, uint16_t num_def_acls, const char *pdata); -- 2.34.1