]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: Remove posix_get_nt_acl().No longer used.
authorJeremy Allison <jra@samba.org>
Tue, 8 Jun 2021 20:09:43 +0000 (13:09 -0700)
committerRalph Boehme <slow@samba.org>
Wed, 9 Jun 2021 13:14:31 +0000 (13:14 +0000)
Comment out load_inherited_info() as that was the
only caller.

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

index 8c871a81124c7c440b2ed8bd8860096a25d1ba16..f71b31172b477d64787adac3b4dd648a14d2605a 100644 (file)
@@ -670,6 +670,7 @@ static struct pai_val *fload_inherited_info(files_struct *fsp)
        return paiv;
 }
 
+#if 0
 /************************************************************************
  Load the user.SAMBA_PAI attribute.
 ************************************************************************/
@@ -737,6 +738,7 @@ static struct pai_val *load_inherited_info(const struct connection_struct *conn,
        TALLOC_FREE(pai_buf);
        return paiv;
 }
+#endif
 
 /****************************************************************************
  Functions to manipulate the internal ACE format.
@@ -3458,71 +3460,6 @@ NTSTATUS posix_fget_nt_acl(struct files_struct *fsp, uint32_t security_info,
        return status;
 }
 
-NTSTATUS posix_get_nt_acl(struct connection_struct *conn,
-                       const struct smb_filename *smb_fname_in,
-                       uint32_t security_info,
-                       TALLOC_CTX *mem_ctx,
-                       struct security_descriptor **ppdesc)
-{
-       SMB_ACL_T posix_acl = NULL;
-       SMB_ACL_T def_acl = NULL;
-       struct pai_val *pal;
-       struct smb_filename *smb_fname = NULL;
-       int ret;
-       TALLOC_CTX *frame = talloc_stackframe();
-       NTSTATUS status;
-
-       *ppdesc = NULL;
-
-       DEBUG(10,("posix_get_nt_acl: called for file %s\n",
-               smb_fname_in->base_name ));
-
-       smb_fname = cp_smb_filename(talloc_tos(), smb_fname_in);
-       if (smb_fname == NULL) {
-               TALLOC_FREE(frame);
-               return NT_STATUS_NO_MEMORY;
-       }
-
-       /* Get the stat struct for the owner info. */
-       /*
-        * We can directly use SMB_VFS_STAT here, as if this was a
-        * POSIX call on a symlink, we've already refused it.
-        * For a Windows acl mapped call on a symlink, we want to follow
-        * it.
-        */
-       ret = SMB_VFS_STAT(conn, smb_fname);
-
-       if (ret == -1) {
-               TALLOC_FREE(frame);
-               return map_nt_error_from_unix(errno);
-       }
-
-       /* Get the ACL from the path. */
-       posix_acl = SMB_VFS_SYS_ACL_GET_FILE(conn, smb_fname,
-                                            SMB_ACL_TYPE_ACCESS, frame);
-
-       /* If it's a directory get the default POSIX ACL. */
-       if(S_ISDIR(smb_fname->st.st_ex_mode)) {
-               def_acl = SMB_VFS_SYS_ACL_GET_FILE(conn, smb_fname,
-                                                  SMB_ACL_TYPE_DEFAULT, frame);
-               def_acl = free_empty_sys_acl(conn, def_acl);
-       }
-
-       pal = load_inherited_info(conn, smb_fname);
-
-       status = posix_get_nt_acl_common(conn,
-                                       smb_fname->base_name,
-                                       &smb_fname->st,
-                                       pal,
-                                       posix_acl,
-                                       def_acl,
-                                       security_info,
-                                       mem_ctx,
-                                       ppdesc);
-       TALLOC_FREE(frame);
-       return status;
-}
-
 /****************************************************************************
  Try to chown a file. We will be able to chown it under the following conditions.
 
index 68ce8b3332ce5ac667a4caab3116914da14f82d5..c0df35bcc48c6163f0789011c1760292e2e7075e 100644 (file)
@@ -843,11 +843,6 @@ SMB_ACL_T free_empty_sys_acl(connection_struct *conn, SMB_ACL_T the_acl);
 NTSTATUS posix_fget_nt_acl(struct files_struct *fsp, uint32_t security_info,
                           TALLOC_CTX *mem_ctx,
                           struct security_descriptor **ppdesc);
-NTSTATUS posix_get_nt_acl(struct connection_struct *conn,
-                       const struct smb_filename *smb_fname_in,
-                       uint32_t security_info,
-                       TALLOC_CTX *mem_ctx,
-                       struct security_descriptor **ppdesc);
 NTSTATUS try_chown(files_struct *fsp, uid_t uid, gid_t gid);
 NTSTATUS set_nt_acl(files_struct *fsp, uint32_t security_info_sent, const struct security_descriptor *psd);
 int get_acl_group_bits( connection_struct *conn,