s3: posix_acls: Remove dead functions fchmod_acl()/chmod_acl().
authorJeremy Allison <jra@samba.org>
Thu, 17 May 2018 18:49:55 +0000 (11:49 -0700)
committerJeremy Allison <jra@samba.org>
Fri, 25 May 2018 16:39:25 +0000 (18:39 +0200)
No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
source3/smbd/posix_acls.c
source3/smbd/proto.h

index 6396f818176115c6800bd3c954262841eab61512..8c57e7a959ae91f9a232aec8e90109c906628325 100644 (file)
@@ -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.
 ****************************************************************************/
index 262338d81e4625266bca2c125e00571977d4aae0..23cc46bec0b025a72e9059d382e7d3d033c32ea1 100644 (file)
@@ -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);