The branch, master has been updated
       via  1139f96cc78 s3: VFS: posixacl_xattr: Remove 
posixacl_xattr_acl_set_file(). No longer used.
       via  246a1966102 s3: VFS: posixacl_xattr: Remove 
posixacl_xattr_acl_get_file(). No longer used.
      from  0fe2ae66089 lib:ldb-samba: Use debug level defines

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 1139f96cc788baefe25068788c33e9ca6b860e64
Author: Jeremy Allison <j...@samba.org>
Date:   Tue Jun 22 10:23:22 2021 -0700

    s3: VFS: posixacl_xattr: Remove posixacl_xattr_acl_set_file(). No longer 
used.
    
    Signed-off-by: Jeremy Allison <j...@samba.org>
    Reviewed-by: Noel Power <npo...@samba.org>
    
    Autobuild-User(master): Noel Power <npo...@samba.org>
    Autobuild-Date(master): Wed Jun 23 09:56:00 UTC 2021 on sn-devel-184

commit 246a19661026ddfbcebeba7b291a779f6bac9a55
Author: Jeremy Allison <j...@samba.org>
Date:   Tue Jun 22 10:22:16 2021 -0700

    s3: VFS: posixacl_xattr: Remove posixacl_xattr_acl_get_file(). No longer 
used.
    
    Signed-off-by: Jeremy Allison <j...@samba.org>
    Reviewed-by: Noel Power <npo...@samba.org>

-----------------------------------------------------------------------

Summary of changes:
 source3/modules/posixacl_xattr.c | 107 ---------------------------------------
 source3/modules/posixacl_xattr.h |  10 ----
 2 files changed, 117 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/posixacl_xattr.c b/source3/modules/posixacl_xattr.c
index ef0521eda34..365cdc79973 100644
--- a/source3/modules/posixacl_xattr.c
+++ b/source3/modules/posixacl_xattr.c
@@ -335,78 +335,6 @@ static int smb_acl_to_posixacl_xattr(SMB_ACL_T theacl, 
char *buf, size_t len)
        return size;
 }
 
-SMB_ACL_T posixacl_xattr_acl_get_file(vfs_handle_struct *handle,
-                                     const struct smb_filename *smb_fname,
-                                     SMB_ACL_TYPE_T type,
-                                     TALLOC_CTX *mem_ctx)
-{
-       int ret;
-       int size;
-       char *buf;
-       const char *name;
-
-       if (type == SMB_ACL_TYPE_ACCESS) {
-               name = ACL_EA_ACCESS;
-       } else if (type == SMB_ACL_TYPE_DEFAULT) {
-               name = ACL_EA_DEFAULT;
-       } else {
-               errno = EINVAL;
-               return NULL;
-       }
-
-       size = ACL_EA_SIZE(20);
-       buf = alloca(size);
-       if (!buf) {
-               return NULL;
-       }
-
-       ret = SMB_VFS_GETXATTR(handle->conn, smb_fname,
-                               name, buf, size);
-       if (ret < 0 && errno == ERANGE) {
-               size = SMB_VFS_GETXATTR(handle->conn, smb_fname,
-                                       name, NULL, 0);
-               if (size > 0) {
-                       buf = alloca(size);
-                       if (!buf) {
-                               return NULL;
-                       }
-                       ret = SMB_VFS_GETXATTR(handle->conn,
-                                               smb_fname, name,
-                                               buf, size);
-               }
-       }
-
-       if (ret > 0) {
-               return posixacl_xattr_to_smb_acl(buf, ret, mem_ctx);
-       }
-       if (ret == 0 || errno == ENOATTR) {
-               mode_t mode = 0;
-               TALLOC_CTX *frame = talloc_stackframe();
-               struct smb_filename *smb_fname_tmp =
-                       cp_smb_filename_nostream(frame, smb_fname);
-               if (smb_fname_tmp == NULL) {
-                       errno = ENOMEM;
-                       ret = -1;
-               } else {
-                       ret = SMB_VFS_STAT(handle->conn, smb_fname_tmp);
-                       if (ret == 0) {
-                               mode = smb_fname_tmp->st.st_ex_mode;
-                       }
-               }
-               TALLOC_FREE(frame);
-               if (ret == 0) {
-                       if (type == SMB_ACL_TYPE_ACCESS) {
-                               return mode_to_smb_acl(mode, mem_ctx);
-                       }
-                       if (S_ISDIR(mode)) {
-                               return sys_acl_init(mem_ctx);
-                       }
-                       errno = EACCES;
-               }
-       }
-       return NULL;
-}
-
 SMB_ACL_T posixacl_xattr_acl_get_fd(vfs_handle_struct *handle,
                                    files_struct *fsp,
                                    SMB_ACL_TYPE_T type,
@@ -454,41 +382,6 @@ SMB_ACL_T posixacl_xattr_acl_get_fd(vfs_handle_struct 
*handle,
        return NULL;
 }
 
-int posixacl_xattr_acl_set_file(vfs_handle_struct *handle,
-                               const struct smb_filename *smb_fname,
-                               SMB_ACL_TYPE_T type,
-                               SMB_ACL_T theacl)
-{
-       const char *name;
-       char *buf;
-       ssize_t size;
-       int ret;
-
-       size = smb_acl_to_posixacl_xattr(theacl, NULL, 0);
-       buf = alloca(size);
-       if (!buf) {
-               return -1;
-       }
-
-       ret = smb_acl_to_posixacl_xattr(theacl, buf, size);
-       if (ret < 0) {
-               errno = -ret;
-               return -1;
-       }
-
-       if (type == SMB_ACL_TYPE_ACCESS) {
-               name = ACL_EA_ACCESS;
-       } else if (type == SMB_ACL_TYPE_DEFAULT) {
-               name = ACL_EA_DEFAULT;
-       } else {
-               errno = EINVAL;
-               return -1;
-       }
-
-       return SMB_VFS_FSETXATTR(smb_fname->fsp,
-                       name, buf, size, 0);
-}
-
 int posixacl_xattr_acl_set_fd(vfs_handle_struct *handle,
                              files_struct *fsp,
                              SMB_ACL_TYPE_T type,
diff --git a/source3/modules/posixacl_xattr.h b/source3/modules/posixacl_xattr.h
index 9e892dd814e..6721538ca1d 100644
--- a/source3/modules/posixacl_xattr.h
+++ b/source3/modules/posixacl_xattr.h
@@ -21,21 +21,11 @@
 #ifndef __POSIXACL_XATTR_H__
 #define __POSIXACL_XATTR_H__
 
-SMB_ACL_T posixacl_xattr_acl_get_file(vfs_handle_struct *handle,
-                                     const struct smb_filename *smb_fname,
-                                     SMB_ACL_TYPE_T type,
-                                     TALLOC_CTX *mem_ctx);
-
 SMB_ACL_T posixacl_xattr_acl_get_fd(vfs_handle_struct *handle,
                                    files_struct *fsp,
                                    SMB_ACL_TYPE_T type,
                                    TALLOC_CTX *mem_ctx);
 
-int posixacl_xattr_acl_set_file(vfs_handle_struct *handle,
-                               const struct smb_filename *smb_fname,
-                               SMB_ACL_TYPE_T type,
-                               SMB_ACL_T theacl);
-
 int posixacl_xattr_acl_set_fd(vfs_handle_struct *handle,
                              files_struct *fsp,
                              SMB_ACL_TYPE_T type,


-- 
Samba Shared Repository

Reply via email to