vfs: RIP SMB_VFS_SYS_ACL_SET_FILE()
authorRalph Boehme <slow@samba.org>
Mon, 14 Dec 2020 15:23:38 +0000 (16:23 +0100)
committerJeremy Allison <jra@samba.org>
Thu, 17 Dec 2020 18:56:29 +0000 (18:56 +0000)
          .--. .-,       .-..-.__
        .'(`.-` \_.-'-./`  |\_( "\__
     __.>\ ';  _;---,._|   / __/`'--)
    /.--.  : |/' _.--.<|  /  | |
_..-'    `\     /' /`  /_/ _/_/
 >_.-``-. `Y  /' _;---.`|/))))
'` .-''. \|:  .'   __, .-'"`
 .'--._ `-:  \/:  /'  '.\             _|_
     /.'`\ :;   /'      `-           `-|-`
    -`    |     |                      |
          :.; : |                  .-'~^~`-.
          |:    |                .' _     _ `.
          |:.   |                | |_) | |_) |
          :. :  |                | | \ | |   |
          : ;   |                |           |
          : ;   |                |  SMB_VFS  |
          : ;   |                |  SYS_ACL  |
          : ;   |                | SET_FILE  |
        .jgs. : ;                |           |
-."-/\\\/:::.    `\."-._'."-"_\\-|           |///."-
" -."-.\\"-."//.-".`-."_\\-.".-\\`=.........=`//-".

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
29 files changed:
docs-xml/manpages/vfs_full_audit.8.xml
examples/VFS/skel_opaque.c
examples/VFS/skel_transparent.c
source3/include/vfs.h
source3/include/vfs_macros.h
source3/modules/vfs_acl_tdb.c
source3/modules/vfs_acl_xattr.c
source3/modules/vfs_aixacl.c
source3/modules/vfs_aixacl2.c
source3/modules/vfs_cap.c
source3/modules/vfs_catia.c
source3/modules/vfs_ceph.c
source3/modules/vfs_default.c
source3/modules/vfs_fake_acls.c
source3/modules/vfs_full_audit.c
source3/modules/vfs_glusterfs.c
source3/modules/vfs_gpfs.c
source3/modules/vfs_hpuxacl.c
source3/modules/vfs_media_harmony.c
source3/modules/vfs_nfs4acl_xattr.c
source3/modules/vfs_not_implemented.c
source3/modules/vfs_posixacl.c
source3/modules/vfs_solarisacl.c
source3/modules/vfs_time_audit.c
source3/modules/vfs_tru64acl.c
source3/modules/vfs_unityed_media.c
source3/modules/vfs_vxfs.c
source3/modules/vfs_zfsacl.c
source3/smbd/vfs.c

index d4fbdb4f02e2b20348ec8d699955aa4125d5973f..1b768917d215a873c8f2a2b6c836a61c9404f6dd 100644 (file)
         <member>sys_acl_get_fd</member>
         <member>sys_acl_get_file</member>
         <member>sys_acl_set_fd</member>
-        <member>sys_acl_set_file</member>
         <member>telldir</member>
         <member>translate_name</member>
         <member>unlinkat</member>
index e00f886b7003d716edf1a04e6c1679877d75f74b..1f20753fc76e461a6e4d4d90402e6f464d59b51c 100644 (file)
@@ -839,15 +839,6 @@ static int skel_sys_acl_blob_get_fd(vfs_handle_struct *handle,
        return -1;
 }
 
-static int skel_sys_acl_set_file(vfs_handle_struct *handle,
-                               const struct smb_filename *smb_fname,
-                               SMB_ACL_TYPE_T acltype,
-                               SMB_ACL_T theacl)
-{
-       errno = ENOSYS;
-       return -1;
-}
-
 static int skel_sys_acl_set_fd(vfs_handle_struct *handle,
                               struct files_struct *fsp,
                               SMB_ACL_TYPE_T type,
@@ -1140,7 +1131,6 @@ static struct vfs_fn_pointers skel_opaque_fns = {
        .sys_acl_get_fd_fn = skel_sys_acl_get_fd,
        .sys_acl_blob_get_file_fn = skel_sys_acl_blob_get_file,
        .sys_acl_blob_get_fd_fn = skel_sys_acl_blob_get_fd,
-       .sys_acl_set_file_fn = skel_sys_acl_set_file,
        .sys_acl_set_fd_fn = skel_sys_acl_set_fd,
        .sys_acl_delete_def_file_fn = skel_sys_acl_delete_def_file,
 
index f3d74556ef3defff8834984576766fabe553d816..f7d99e6101b4c2143c5e64cf75c08ccff4242034 100644 (file)
@@ -1103,15 +1103,6 @@ static int skel_sys_acl_blob_get_fd(vfs_handle_struct *handle,
                                                blob_description, blob);
 }
 
-static int skel_sys_acl_set_file(vfs_handle_struct *handle,
-                               const struct smb_filename *smb_fname,
-                               SMB_ACL_TYPE_T acltype,
-                               SMB_ACL_T theacl)
-{
-       return SMB_VFS_NEXT_SYS_ACL_SET_FILE(handle, smb_fname,
-                       acltype, theacl);
-}
-
 static int skel_sys_acl_set_fd(vfs_handle_struct *handle,
                               struct files_struct *fsp,
                               SMB_ACL_TYPE_T type,
@@ -1445,7 +1436,6 @@ static struct vfs_fn_pointers skel_transparent_fns = {
        .sys_acl_get_fd_fn = skel_sys_acl_get_fd,
        .sys_acl_blob_get_file_fn = skel_sys_acl_blob_get_file,
        .sys_acl_blob_get_fd_fn = skel_sys_acl_blob_get_fd,
-       .sys_acl_set_file_fn = skel_sys_acl_set_file,
        .sys_acl_set_fd_fn = skel_sys_acl_set_fd,
        .sys_acl_delete_def_file_fn = skel_sys_acl_delete_def_file,
 
index ada1f13bc3f2ca012e5baf6be877b7c9dc2ea5f5..04c8c3e4c761efd918ffc8460ad247f702f6173c 100644 (file)
  * Version 44 - Remove SMB_VFS_GET_DOS_ATTRIBUTES()
  * Version 44 - Replace SMB_VFS_GET_COMPRESSION() with SMB_VFS_FGET_COMPRESSION()
  * Version 44 - Add type argument to SMB_VFS_SYS_ACL_SET_FD()
+ * Version 44 - Remove SMB_VFS_SYS_ACL_SET_FILE()
  */
 
 #define SMB_VFS_INTERFACE_VERSION 44
@@ -1216,10 +1217,6 @@ struct vfs_fn_pointers {
        int (*sys_acl_blob_get_fd_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp,
                                      TALLOC_CTX *mem_ctx, char **blob_description,
                                      DATA_BLOB *blob);
-       int (*sys_acl_set_file_fn)(struct vfs_handle_struct *handle,
-                                       const struct smb_filename *smb_fname,
-                                       SMB_ACL_TYPE_T acltype,
-                                       SMB_ACL_T theacl);
        int (*sys_acl_set_fd_fn)(struct vfs_handle_struct *handle,
                                 struct files_struct *fsp,
                                 SMB_ACL_TYPE_T type,
@@ -1745,10 +1742,6 @@ int smb_vfs_call_sys_acl_blob_get_fd(struct vfs_handle_struct *handle,
                                     TALLOC_CTX *mem_ctx,
                                     char **blob_description,
                                     DATA_BLOB *blob);
-int smb_vfs_call_sys_acl_set_file(struct vfs_handle_struct *handle,
-                               const struct smb_filename *smb_fname,
-                               SMB_ACL_TYPE_T acltype,
-                               SMB_ACL_T theacl);
 int smb_vfs_call_sys_acl_set_fd(struct vfs_handle_struct *handle,
                                struct files_struct *fsp,
                                SMB_ACL_TYPE_T type,
@@ -2166,10 +2159,6 @@ int vfs_not_implemented_sys_acl_blob_get_file(vfs_handle_struct *handle,
 int vfs_not_implemented_sys_acl_blob_get_fd(vfs_handle_struct *handle,
                                files_struct *fsp, TALLOC_CTX *mem_ctx,
                                char **blob_description, DATA_BLOB *blob);
-int vfs_not_implemented_sys_acl_set_file(vfs_handle_struct *handle,
-                               const struct smb_filename *smb_fname,
-                               SMB_ACL_TYPE_T acltype,
-                               SMB_ACL_T theacl);
 int vfs_not_implemented_sys_acl_set_fd(vfs_handle_struct *handle,
                                       struct files_struct *fsp,
                                       SMB_ACL_TYPE_T type,
index 2fc3ba7b66803930fe3ed089d5ffe04d531ccb2e..9a6dd67288cc911f52492b78db993edfaaec9389 100644 (file)
 #define SMB_VFS_NEXT_SYS_ACL_BLOB_GET_FD(handle, fsp, mem_ctx, blob_description, blob) \
        smb_vfs_call_sys_acl_blob_get_fd((handle)->next, (fsp), mem_ctx, (blob_description), (blob))
 
-#define SMB_VFS_SYS_ACL_SET_FILE(conn, smb_fname, acltype, theacl) \
-       smb_vfs_call_sys_acl_set_file((conn)->vfs_handles, (smb_fname), (acltype), (theacl))
-#define SMB_VFS_NEXT_SYS_ACL_SET_FILE(handle, smb_fname, acltype, theacl) \
-       smb_vfs_call_sys_acl_set_file((handle)->next, (smb_fname), (acltype), (theacl))
-
 #define SMB_VFS_SYS_ACL_SET_FD(fsp, type, theacl) \
        smb_vfs_call_sys_acl_set_fd((fsp)->conn->vfs_handles, (fsp), (type), (theacl))
 #define SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, type, theacl) \
index ecbc75f9937b98c9e011a39bbba3c2a5a9189ecc..b70429473ddd7950e327a8f19f07ba8a8e0edfb8 100644 (file)
@@ -369,51 +369,6 @@ static int connect_acl_tdb(struct vfs_handle_struct *handle,
  Remove a Windows ACL - we're setting the underlying POSIX ACL.
 *********************************************************************/
 
-static int sys_acl_set_file_tdb(vfs_handle_struct *handle,
-                       const struct smb_filename *smb_fname_in,
-                       SMB_ACL_TYPE_T type,
-                       SMB_ACL_T theacl)
-{
-       struct db_context *db = acl_db;
-       int ret = -1;
-       int saved_errno = 0;
-       struct smb_filename *smb_fname = NULL;
-
-       smb_fname = cp_smb_filename_nostream(talloc_tos(), smb_fname_in);
-       if (smb_fname == NULL) {
-               return -1;
-       };
-
-       ret = SMB_VFS_STAT(handle->conn, smb_fname);
-       if (ret == -1) {
-               saved_errno = errno;
-               goto fail;
-       }
-
-       ret = SMB_VFS_NEXT_SYS_ACL_SET_FILE(handle,
-                                               smb_fname,
-                                               type,
-                                               theacl);
-       if (ret == -1) {
-               saved_errno = errno;
-               goto fail;
-       }
-
-       acl_tdb_delete(handle, db, &smb_fname->st);
-
-fail:
-       TALLOC_FREE(smb_fname);
-
-       if (saved_errno != 0) {
-               errno = saved_errno;
-       }
-       return ret;
-}
-
-/*********************************************************************
- Remove a Windows ACL - we're setting the underlying POSIX ACL.
-*********************************************************************/
-
 static int sys_acl_set_fd_tdb(vfs_handle_struct *handle,
                             files_struct *fsp,
                            SMB_ACL_TYPE_T type,
@@ -492,7 +447,6 @@ static struct vfs_fn_pointers vfs_acl_tdb_fns = {
        .fget_nt_acl_fn = acl_tdb_fget_nt_acl,
        .get_nt_acl_at_fn = acl_tdb_get_nt_acl_at,
        .fset_nt_acl_fn = acl_tdb_fset_nt_acl,
-       .sys_acl_set_file_fn = sys_acl_set_file_tdb,
        .sys_acl_set_fd_fn = sys_acl_set_fd_tdb
 };
 
index 7a1f1ba44374bfc31e17cc9e81eb660fdcba093c..df2c84da0a2ff24d2c2911e991560312a05cf8b2 100644 (file)
@@ -223,31 +223,6 @@ static NTSTATUS store_acl_blob_fsp(vfs_handle_struct *handle,
  Remove a Windows ACL - we're setting the underlying POSIX ACL.
 *********************************************************************/
 
-static int sys_acl_set_file_xattr(vfs_handle_struct *handle,
-                               const struct smb_filename *smb_fname,
-                               SMB_ACL_TYPE_T type,
-                               SMB_ACL_T theacl)
-{
-       int ret = SMB_VFS_NEXT_SYS_ACL_SET_FILE(handle,
-                                               smb_fname,
-                                               type,
-                                               theacl);
-       if (ret == -1) {
-               return -1;
-       }
-
-       become_root();
-       SMB_VFS_REMOVEXATTR(handle->conn, smb_fname,
-                       XATTR_NTACL_NAME);
-       unbecome_root();
-
-       return ret;
-}
-
-/*********************************************************************
- Remove a Windows ACL - we're setting the underlying POSIX ACL.
-*********************************************************************/
-
 static int sys_acl_set_fd_xattr(vfs_handle_struct *handle,
                             files_struct *fsp,
                            SMB_ACL_TYPE_T type,
@@ -408,7 +383,6 @@ static struct vfs_fn_pointers vfs_acl_xattr_fns = {
        .fget_nt_acl_fn = acl_xattr_fget_nt_acl,
        .get_nt_acl_at_fn = acl_xattr_get_nt_acl_at,
        .fset_nt_acl_fn = acl_xattr_fset_nt_acl,
-       .sys_acl_set_file_fn = sys_acl_set_file_xattr,
        .sys_acl_set_fd_fn = sys_acl_set_fd_xattr
 };
 
index 833d8b47fefdbbcae450c387a124e0be7b9123cb..f7493794a458a1413b1d25ea864c408e905b9133 100644 (file)
@@ -133,27 +133,6 @@ SMB_ACL_T aixacl_sys_acl_get_fd(vfs_handle_struct *handle,
        return NULL;*/
 }
 
-int aixacl_sys_acl_set_file(vfs_handle_struct *handle,
-                       const struct smb_filename *smb_fname,
-                       SMB_ACL_TYPE_T type,
-                       SMB_ACL_T theacl)
-{
-       struct acl *file_acl = NULL;
-       unsigned int rc;
-       
-       file_acl = aixacl_smb_to_aixacl(type, theacl);
-       if (!file_acl)
-               return -1;
-
-       rc = chacl((char *)smb_fname->base_name,file_acl,file_acl->acl_len);
-       DEBUG(10,("errno is %d\n",errno));
-       DEBUG(10,("return code is %d\n",rc));
-       SAFE_FREE(file_acl);
-       DEBUG(10,("Exiting the aixacl_sys_acl_set_file\n"));
-
-       return rc;
-}
-
 int aixacl_sys_acl_set_fd(vfs_handle_struct *handle,
                            files_struct *fsp,
                            SMB_ACL_TYPE_T type,
@@ -195,7 +174,6 @@ static struct vfs_fn_pointers vfs_aixacl_fns = {
        .sys_acl_get_fd_fn = aixacl_sys_acl_get_fd,
        .sys_acl_blob_get_file_fn = posix_sys_acl_blob_get_file,
        .sys_acl_blob_get_fd_fn = posix_sys_acl_blob_get_fd,
-       .sys_acl_set_file_fn = aixacl_sys_acl_set_file,
        .sys_acl_set_fd_fn = aixacl_sys_acl_set_fd,
        .sys_acl_delete_def_file_fn = aixacl_sys_acl_delete_def_file,
 };
index 92759a73bcd4ef8675b6fbc55e91eb6c24e39cd3..42cdf961b8f06bb076901ec32c22555a6e2d5257 100644 (file)
@@ -471,46 +471,6 @@ NTSTATUS aixjfs2_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp, uint3
        return aixjfs2_set_nt_acl_common(handle, fsp, security_info_sent, psd);
 }
 
-int aixjfs2_sys_acl_set_file(vfs_handle_struct *handle,
-                               const struct smb_filename *smb_fname,
-                               SMB_ACL_TYPE_T type,
-                               SMB_ACL_T theacl)
-{
-       struct acl      *acl_aixc;
-       acl_type_t      acl_type_info;
-       int     rc;
-
-       DEBUG(10, ("aixjfs2_sys_acl_set_file invoked for %s",
-                  smb_fname->base_name));
-
-       rc = aixjfs2_query_acl_support((char *)smb_fname->base_name,
-                       ACL_AIXC, &acl_type_info);
-       if (rc) {
-               DEBUG(8, ("jfs2_set_nt_acl: AIXC support not found\n"));
-               return -1;
-       }
-
-       acl_aixc = aixacl_smb_to_aixacl(type, theacl);
-       if (!acl_aixc)
-               return -1;
-
-       rc = aclx_put(
-               (char *)smb_fname->base_name,
-               SET_ACL, /* set only the ACL, not mode bits */
-               acl_type_info,
-               acl_aixc,
-               acl_aixc->acl_len,
-               0
-       );
-       if (rc) {
-               DEBUG(2, ("aclx_put failed with %s for %s\n",
-                       strerror(errno), smb_fname->base_name));
-               return -1;
-       }
-
-       return 0;
-}
-
 int aixjfs2_sys_acl_set_fd(vfs_handle_struct *handle,
                            files_struct *fsp,
                            SMB_ACL_TYPE_T type,
@@ -579,7 +539,6 @@ static struct vfs_fn_pointers vfs_aixacl2_fns = {
        .sys_acl_get_fd_fn = aixjfs2_sys_acl_get_fd,
        .sys_acl_blob_get_file_fn = aixjfs2_sys_acl_blob_get_file,
        .sys_acl_blob_get_fd_fn = aixjfs2_sys_acl_blob_get_fd,
-       .sys_acl_set_file_fn = aixjfs2_sys_acl_set_file,
        .sys_acl_set_fd_fn = aixjfs2_sys_acl_set_fd,
        .sys_acl_delete_def_file_fn = aixjfs2_sys_acl_delete_def_file
 };
index c40d2a25b761b86c0439cc2cb7d0778e16fea871..b7cdd0d81311214576d802074b6a687b43e9b8fa 100644 (file)
@@ -740,44 +740,6 @@ static SMB_ACL_T cap_sys_acl_get_file(vfs_handle_struct *handle,
        return ret;
 }
 
-static int cap_sys_acl_set_file(vfs_handle_struct *handle,
-                       const struct smb_filename *smb_fname,
-                       SMB_ACL_TYPE_T acltype,
-                       SMB_ACL_T theacl)
-{
-       struct smb_filename *cap_smb_fname = NULL;
-       char *cappath = capencode(talloc_tos(), smb_fname->base_name);
-       int ret;
-       int saved_errno = 0;
-
-       if (!cappath) {
-               errno = ENOMEM;
-               return -1;
-       }
-       cap_smb_fname = synthetic_smb_fname(talloc_tos(),
-                                       cappath,
-                                       NULL,
-                                       NULL,
-                                       smb_fname->twrp,
-                                       smb_fname->flags);
-       if (cap_smb_fname == NULL) {
-               TALLOC_FREE(cappath);
-               errno = ENOMEM;
-               return -1;
-       }
-       ret =  SMB_VFS_NEXT_SYS_ACL_SET_FILE(handle, cap_smb_fname,
-                               acltype, theacl);
-       if (ret == -1) {
-               saved_errno = errno;
-       }
-       TALLOC_FREE(cappath);
-       TALLOC_FREE(cap_smb_fname);
-       if (saved_errno != 0) {
-               errno = saved_errno;
-       }
-       return ret;
-}
-
 static int cap_sys_acl_delete_def_file(vfs_handle_struct *handle,
                        const struct smb_filename *smb_fname)
 {
@@ -1102,7 +1064,6 @@ static struct vfs_fn_pointers vfs_cap_fns = {
        .mknodat_fn = cap_mknodat,
        .realpath_fn = cap_realpath,
        .sys_acl_get_file_fn = cap_sys_acl_get_file,
-       .sys_acl_set_file_fn = cap_sys_acl_set_file,
        .sys_acl_delete_def_file_fn = cap_sys_acl_delete_def_file,
        .getxattr_fn = cap_getxattr,
        .getxattrat_send_fn = vfs_not_implemented_getxattrat_send,
index 0e4843ff58f274d0ed657347a479276704289074..355e11279984b4b1151859d9d3e4520b132abd32 100644 (file)
@@ -1126,52 +1126,6 @@ catia_sys_acl_get_file(vfs_handle_struct *handle,
        return ret;
 }
 
-static int
-catia_sys_acl_set_file(vfs_handle_struct *handle,
-                       const struct smb_filename *smb_fname,
-                       SMB_ACL_TYPE_T type,
-                       SMB_ACL_T theacl)
-{
-       struct smb_filename *mapped_smb_fname = NULL;
-       int saved_errno = 0;
-       char *mapped_name = NULL;
-       NTSTATUS status;
-       int ret;
-
-       status = catia_string_replace_allocate(handle->conn,
-                               smb_fname->base_name,
-                               &mapped_name,
-                               vfs_translate_to_unix);
-       if (!NT_STATUS_IS_OK(status)) {
-               errno = map_errno_from_nt_status(status);
-               return -1;
-       }
-
-       mapped_smb_fname = synthetic_smb_fname(talloc_tos(),
-                                       mapped_name,
-                                       NULL,
-                                       &smb_fname->st,
-                                       smb_fname->twrp,
-                                       smb_fname->flags);
-       if (mapped_smb_fname == NULL) {
-               TALLOC_FREE(mapped_name);
-               errno = ENOMEM;
-               return -1;
-       }
-
-       ret = SMB_VFS_NEXT_SYS_ACL_SET_FILE(handle, mapped_smb_fname,
-                       type, theacl);
-       if (ret == -1) {
-               saved_errno = errno;
-       }
-       TALLOC_FREE(mapped_smb_fname);
-       TALLOC_FREE(mapped_name);
-       if (saved_errno != 0) {
-               errno = saved_errno;
-       }
-       return ret;
-}
-
 static int
 catia_sys_acl_delete_def_file(vfs_handle_struct *handle,
                                const struct smb_filename *smb_fname)
@@ -2451,7 +2405,6 @@ static struct vfs_fn_pointers vfs_catia_fns = {
        .sys_acl_get_file_fn = catia_sys_acl_get_file,
        .sys_acl_get_fd_fn = catia_sys_acl_get_fd,
        .sys_acl_blob_get_fd_fn = catia_sys_acl_blob_get_fd,
-       .sys_acl_set_file_fn = catia_sys_acl_set_file,
        .sys_acl_set_fd_fn = catia_sys_acl_set_fd,
        .sys_acl_delete_def_file_fn = catia_sys_acl_delete_def_file,
 
index ee5d1caa7935ea2d6889bca2d58210b92090eb53..6bb770005e15ed1afcaae0dd6bc2fbcc0a9fe36b 100644 (file)
@@ -1545,7 +1545,6 @@ static struct vfs_fn_pointers ceph_fns = {
        .sys_acl_get_fd_fn = posixacl_xattr_acl_get_fd,
        .sys_acl_blob_get_file_fn = posix_sys_acl_blob_get_file,
        .sys_acl_blob_get_fd_fn = posix_sys_acl_blob_get_fd,
-       .sys_acl_set_file_fn = posixacl_xattr_acl_set_file,
        .sys_acl_set_fd_fn = posixacl_xattr_acl_set_fd,
        .sys_acl_delete_def_file_fn = posixacl_xattr_acl_delete_def_file,
 
index b999c539c856a8578e34bd40b38c9883fd146be8..8d592bbad64cfac4a1c7dbed4045d9eb526fc4cb 100644 (file)
@@ -3207,14 +3207,6 @@ static SMB_ACL_T vfswrap_sys_acl_get_fd(vfs_handle_struct *handle,
        return sys_acl_get_fd(handle, fsp, mem_ctx);
 }
 
-static int vfswrap_sys_acl_set_file(vfs_handle_struct *handle,
-                               const struct smb_filename *smb_fname,
-                               SMB_ACL_TYPE_T acltype,
-                               SMB_ACL_T theacl)
-{
-       return sys_acl_set_file(handle, smb_fname, acltype, theacl);
-}
-
 static int vfswrap_sys_acl_set_fd(vfs_handle_struct *handle,
                                  files_struct *fsp,
                                  SMB_ACL_TYPE_T type,
@@ -3898,7 +3890,6 @@ static struct vfs_fn_pointers vfs_default_fns = {
        .sys_acl_get_fd_fn = vfswrap_sys_acl_get_fd,
        .sys_acl_blob_get_file_fn = posix_sys_acl_blob_get_file,
        .sys_acl_blob_get_fd_fn = posix_sys_acl_blob_get_fd,
-       .sys_acl_set_file_fn = vfswrap_sys_acl_set_file,
        .sys_acl_set_fd_fn = vfswrap_sys_acl_set_fd,
        .sys_acl_delete_def_file_fn = vfswrap_sys_acl_delete_def_file,
 
index 6e9a2f4f7462743df28d50424fd7e3a2d9d5f3aa..44ba990d5b67749557332db9c704f6c9643794ca 100644 (file)
@@ -735,7 +735,6 @@ static struct vfs_fn_pointers vfs_fake_acls_fns = {
        .sys_acl_get_fd_fn = fake_acls_sys_acl_get_fd,
        .sys_acl_blob_get_file_fn = posix_sys_acl_blob_get_file,
        .sys_acl_blob_get_fd_fn = posix_sys_acl_blob_get_fd,
-       .sys_acl_set_file_fn = fake_acls_sys_acl_set_file,
        .sys_acl_set_fd_fn = fake_acls_sys_acl_set_fd,
        .sys_acl_delete_def_file_fn = fake_acls_sys_acl_delete_def_file,
        .lchown_fn = fake_acls_lchown,
index 5c601b2c66b3280f40f10e2e024a6461d513b9a0..5e1572bcb47f29b09a9cc8a113874eec582d5e01 100644 (file)
@@ -201,7 +201,6 @@ typedef enum _vfs_op_type {
        SMB_VFS_OP_SYS_ACL_GET_FD,
        SMB_VFS_OP_SYS_ACL_BLOB_GET_FILE,
        SMB_VFS_OP_SYS_ACL_BLOB_GET_FD,
-       SMB_VFS_OP_SYS_ACL_SET_FILE,
        SMB_VFS_OP_SYS_ACL_SET_FD,
        SMB_VFS_OP_SYS_ACL_DELETE_DEF_FILE,
 
@@ -336,7 +335,6 @@ static struct {
        { SMB_VFS_OP_SYS_ACL_GET_FD,    "sys_acl_get_fd" },
        { SMB_VFS_OP_SYS_ACL_BLOB_GET_FILE,     "sys_acl_blob_get_file" },
        { SMB_VFS_OP_SYS_ACL_BLOB_GET_FD,       "sys_acl_blob_get_fd" },
-       { SMB_VFS_OP_SYS_ACL_SET_FILE,  "sys_acl_set_file" },
        { SMB_VFS_OP_SYS_ACL_SET_FD,    "sys_acl_set_fd" },
        { SMB_VFS_OP_SYS_ACL_DELETE_DEF_FILE,   "sys_acl_delete_def_file" },
        { SMB_VFS_OP_GETXATTR,  "getxattr" },
@@ -2568,25 +2566,6 @@ static int smb_full_audit_sys_acl_blob_get_fd(vfs_handle_struct *handle,
        return result;
 }
 
-static int smb_full_audit_sys_acl_set_file(vfs_handle_struct *handle,
-                               const struct smb_filename *smb_fname,
-                               SMB_ACL_TYPE_T acltype,
-                               SMB_ACL_T theacl)
-{
-       int result;
-
-       result = SMB_VFS_NEXT_SYS_ACL_SET_FILE(handle, smb_fname, acltype,
-                                              theacl);
-
-       do_log(SMB_VFS_OP_SYS_ACL_SET_FILE,
-              (result >= 0),
-              handle,
-              "%s",
-              smb_fname_str_do_log(handle->conn, smb_fname));
-
-       return result;
-}
-
 static int smb_full_audit_sys_acl_set_fd(vfs_handle_struct *handle,
                                         struct files_struct *fsp,
                                         SMB_ACL_TYPE_T type,
@@ -3053,7 +3032,6 @@ static struct vfs_fn_pointers vfs_full_audit_fns = {
        .sys_acl_get_fd_fn = smb_full_audit_sys_acl_get_fd,
        .sys_acl_blob_get_file_fn = smb_full_audit_sys_acl_blob_get_file,
        .sys_acl_blob_get_fd_fn = smb_full_audit_sys_acl_blob_get_fd,
-       .sys_acl_set_file_fn = smb_full_audit_sys_acl_set_file,
        .sys_acl_set_fd_fn = smb_full_audit_sys_acl_set_fd,
        .sys_acl_delete_def_file_fn = smb_full_audit_sys_acl_delete_def_file,
        .getxattr_fn = smb_full_audit_getxattr,
index 63499b1213b3b3034368177363bc710e46f014d8..45516441ba8dd27496004459c9f891ad70129370 100644 (file)
@@ -2280,7 +2280,6 @@ static struct vfs_fn_pointers glusterfs_fns = {
        .sys_acl_get_fd_fn = posixacl_xattr_acl_get_fd,
        .sys_acl_blob_get_file_fn = posix_sys_acl_blob_get_file,
        .sys_acl_blob_get_fd_fn = posix_sys_acl_blob_get_fd,
-       .sys_acl_set_file_fn = posixacl_xattr_acl_set_file,
        .sys_acl_set_fd_fn = posixacl_xattr_acl_set_fd,
        .sys_acl_delete_def_file_fn = posixacl_xattr_acl_delete_def_file,
 
index e06df81d911385247e16e278a44dd94607b92f47..d7dec809c6e8c82b4ce7d3e3d8f7ff0b77967676 100644 (file)
@@ -1310,22 +1310,21 @@ static struct gpfs_acl *smb2gpfs_acl(const SMB_ACL_T pacl,
        return result;
 }
 
-static int gpfsacl_sys_acl_set_file(vfs_handle_struct *handle,
-                                   const struct smb_filename *smb_fname,
-                                   SMB_ACL_TYPE_T type,
-                                   SMB_ACL_T theacl)
+static int gpfsacl_sys_acl_set_fd(vfs_handle_struct *handle,
+                                 files_struct *fsp,
+                                 SMB_ACL_TYPE_T type,
+                                 SMB_ACL_T theacl)
 {
-       struct gpfs_acl *gpfs_acl;
-       int result;
        struct gpfs_config_data *config;
+       struct gpfs_acl *gpfs_acl = NULL;
+       int result;
 
        SMB_VFS_HANDLE_GET_DATA(handle, config,
                                struct gpfs_config_data,
                                return -1);
 
        if (!config->acl) {
-               return SMB_VFS_NEXT_SYS_ACL_SET_FILE(handle, smb_fname,
-                               type, theacl);
+               return SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, type, theacl);
        }
 
        gpfs_acl = smb2gpfs_acl(theacl, type);
@@ -1333,36 +1332,16 @@ static int gpfsacl_sys_acl_set_file(vfs_handle_struct *handle,
                return -1;
        }
 
-       result = gpfswrap_putacl(smb_fname->base_name,
+       /*
+        * This is no longer a handle based call.
+        */
+       result = gpfswrap_putacl(fsp->fsp_name->base_name,
                                 GPFS_PUTACL_STRUCT|GPFS_ACL_SAMBA,
                                 gpfs_acl);
-
        SAFE_FREE(gpfs_acl);
        return result;
 }
 
-static int gpfsacl_sys_acl_set_fd(vfs_handle_struct *handle,
-                                 files_struct *fsp,
-                                 SMB_ACL_TYPE_T type,
-                                 SMB_ACL_T theacl)
-{
-       struct gpfs_config_data *config;
-
-       SMB_VFS_HANDLE_GET_DATA(handle, config,
-                               struct gpfs_config_data,
-                               return -1);
-
-       if (!config->acl) {
-               return SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, type, theacl);
-       }
-
-       /*
-        * This is no longer a handle based call.
-        */
-       return gpfsacl_sys_acl_set_file(handle, fsp->fsp_name,
-                                       type, theacl);
-}
-
 static int gpfsacl_sys_acl_delete_def_file(vfs_handle_struct *handle,
                                const struct smb_filename *smb_fname)
 {
@@ -2648,7 +2627,6 @@ static struct vfs_fn_pointers vfs_gpfs_fns = {
        .sys_acl_get_fd_fn = gpfsacl_sys_acl_get_fd,
        .sys_acl_blob_get_file_fn = gpfsacl_sys_acl_blob_get_file,
        .sys_acl_blob_get_fd_fn = gpfsacl_sys_acl_blob_get_fd,
-       .sys_acl_set_file_fn = gpfsacl_sys_acl_set_file,
        .sys_acl_set_fd_fn = gpfsacl_sys_acl_set_fd,
        .sys_acl_delete_def_file_fn = gpfsacl_sys_acl_delete_def_file,
        .chmod_fn = vfs_gpfs_chmod,
index 42a2ab091948af58b29addcaf05a0bf14ff6abf0..d584ba45099ede8c275aadb21c58348df5859d51 100644 (file)
@@ -1162,7 +1162,6 @@ static struct vfs_fn_pointers hpuxacl_fns = {
        .sys_acl_get_fd_fn = hpuxacl_sys_acl_get_fd,
        .sys_acl_blob_get_file_fn = posix_sys_acl_blob_get_file,
        .sys_acl_blob_get_fd_fn = posix_sys_acl_blob_get_fd,
-       .sys_acl_set_file_fn = hpuxacl_sys_acl_set_file,
        .sys_acl_set_fd_fn = hpuxacl_sys_acl_set_fd,
        .sys_acl_delete_def_file_fn = hpuxacl_sys_acl_delete_def_file,
 };
index 33b7b0840c2b5339ebb6e20003b24ea80950bd16..7b3db36d4cb09a9f7015346492c77af9be787a42 100644 (file)
@@ -1996,42 +1996,6 @@ out:
        return ret;
 }
 
-/*
- * Success: return 0
- * Failure: set errno, return -1
- * In this case, "name" is a path.
- */
-static int mh_sys_acl_set_file(vfs_handle_struct *handle,
-               const struct smb_filename *smb_fname,
-               SMB_ACL_TYPE_T acltype,
-               SMB_ACL_T theacl)
-{
-       int status;
-       struct smb_filename *clientFname = NULL;
-
-       DEBUG(MH_INFO_DEBUG, ("Entering mh_sys_acl_set_file\n"));
-       if (!is_in_media_files(smb_fname->base_name)) {
-               status = SMB_VFS_NEXT_SYS_ACL_SET_FILE(handle, smb_fname,
-                               acltype, theacl);
-               goto out;
-       }
-
-       status = alloc_get_client_smb_fname(handle,
-                               talloc_tos(),
-                               smb_fname,
-                               &clientFname);
-       if (status != 0) {
-               goto err;
-       }
-
-       status = SMB_VFS_NEXT_SYS_ACL_SET_FILE(handle, clientFname,
-                       acltype, theacl);
-err:
-       TALLOC_FREE(clientFname);
-out:
-       return status;
-}
-
 /*
  * Success: return 0
  * Failure: set errno, return -1
@@ -2249,7 +2213,6 @@ static struct vfs_fn_pointers vfs_mh_fns = {
        /* POSIX ACL operations. */
 
        .sys_acl_get_file_fn = mh_sys_acl_get_file,
-       .sys_acl_set_file_fn = mh_sys_acl_set_file,
        .sys_acl_delete_def_file_fn = mh_sys_acl_delete_def_file,
 
        /* EA operations. */
index 33bf0661648ac3b031498ec9170951e8597c0d5d..f1b9022f2b2c916116f1f75b2db79036da691fb9 100644 (file)
@@ -620,14 +620,6 @@ static SMB_ACL_T nfs4acl_xattr_fail__sys_acl_get_fd(vfs_handle_struct *handle,
        return (SMB_ACL_T)NULL;
 }
 
-static int nfs4acl_xattr_fail__sys_acl_set_file(vfs_handle_struct *handle,
-                                        const struct smb_filename *smb_fname,
-                                        SMB_ACL_TYPE_T type,
-                                        SMB_ACL_T theacl)
-{
-       return -1;
-}
-
 static int nfs4acl_xattr_fail__sys_acl_set_fd(vfs_handle_struct *handle,
                                       files_struct *fsp,
                                       SMB_ACL_TYPE_T type,
@@ -668,7 +660,6 @@ static struct vfs_fn_pointers nfs4acl_xattr_fns = {
        .sys_acl_get_fd_fn = nfs4acl_xattr_fail__sys_acl_get_fd,
        .sys_acl_blob_get_file_fn = nfs4acl_xattr_fail__sys_acl_blob_get_file,
        .sys_acl_blob_get_fd_fn = nfs4acl_xattr_fail__sys_acl_blob_get_fd,
-       .sys_acl_set_file_fn = nfs4acl_xattr_fail__sys_acl_set_file,
        .sys_acl_set_fd_fn = nfs4acl_xattr_fail__sys_acl_set_fd,
        .sys_acl_delete_def_file_fn = nfs4acl_xattr_fail__sys_acl_delete_def_file,
 };
index a1bbe3f41bc61f032c2b81d0215c8d9d13e367a4..9ab56b786096eb6f73ca09710f135f414b974346 100644 (file)
@@ -843,15 +843,6 @@ int vfs_not_implemented_sys_acl_blob_get_fd(vfs_handle_struct *handle,
        return -1;
 }
 
-int vfs_not_implemented_sys_acl_set_file(vfs_handle_struct *handle,
-                               const struct smb_filename *smb_fname,
-                               SMB_ACL_TYPE_T acltype,
-                               SMB_ACL_T theacl)
-{
-       errno = ENOSYS;
-       return -1;
-}
-
 int vfs_not_implemented_sys_acl_set_fd(vfs_handle_struct *handle,
                                       struct files_struct *fsp,
                                       SMB_ACL_TYPE_T type,
@@ -1144,7 +1135,6 @@ static struct vfs_fn_pointers vfs_not_implemented_fns = {
        .sys_acl_get_fd_fn = vfs_not_implemented_sys_acl_get_fd,
        .sys_acl_blob_get_file_fn = vfs_not_implemented_sys_acl_blob_get_file,
        .sys_acl_blob_get_fd_fn = vfs_not_implemented_sys_acl_blob_get_fd,
-       .sys_acl_set_file_fn = vfs_not_implemented_sys_acl_set_file,
        .sys_acl_set_fd_fn = vfs_not_implemented_sys_acl_set_fd,
        .sys_acl_delete_def_file_fn = vfs_not_implemented_sys_acl_delete_def_file,
 
index 72c8884ec38a4bb3a1e0bb2ca3d67bc57d424cbb..a1de0b31842e38ac3f0f71323d358aa8936b02b1 100644 (file)
@@ -420,7 +420,6 @@ static struct vfs_fn_pointers posixacl_fns = {
        .sys_acl_get_fd_fn = posixacl_sys_acl_get_fd,
        .sys_acl_blob_get_file_fn = posix_sys_acl_blob_get_file,
        .sys_acl_blob_get_fd_fn = posix_sys_acl_blob_get_fd,
-       .sys_acl_set_file_fn = posixacl_sys_acl_set_file,
        .sys_acl_set_fd_fn = posixacl_sys_acl_set_fd,
        .sys_acl_delete_def_file_fn = posixacl_sys_acl_delete_def_file,
 };
index ae91499a34b13ecd6e69dad6909b5a28285be966..b43a57c9c9f3ed18ada29cb74f4dacde69112d18 100644 (file)
@@ -135,103 +135,6 @@ SMB_ACL_T solarisacl_sys_acl_get_fd(vfs_handle_struct *handle,
        return result;
 }
 
-int solarisacl_sys_acl_set_file(vfs_handle_struct *handle,
-                               const struct smb_filename *smb_fname_in,
-                               SMB_ACL_TYPE_T type,
-                               SMB_ACL_T theacl)
-{
-       int ret = -1;
-       SOLARIS_ACL_T solaris_acl = NULL;
-       int count;
-       struct smb_filename *smb_fname = NULL;
-
-       smb_fname = cp_smb_filename_nostream(talloc_tos(), smb_fname_in);
-       if (smb_fname == NULL) {
-               errno = ENOMEM;
-               goto done;
-       }
-
-       DEBUG(10, ("solarisacl_sys_acl_set_file called for file '%s'\n",
-                  smb_fname->base_name));
-
-       if ((type != SMB_ACL_TYPE_ACCESS) && (type != SMB_ACL_TYPE_DEFAULT)) {
-               errno = EINVAL;
-               DEBUG(10, ("invalid smb acl type given (%d).\n", type));
-               goto done;
-       }
-       DEBUGADD(10, ("setting %s acl\n", 
-                     ((type == SMB_ACL_TYPE_ACCESS) ? "access" : "default")));
-
-       if(!smb_acl_to_solaris_acl(theacl, &solaris_acl, &count, type)) {
-               DEBUG(10, ("conversion smb_acl -> solaris_acl failed (%s).\n",
-                          strerror(errno)));
-                goto done;
-       }
-
-       /*
-        * if the file is a directory, there is extra work to do:
-        * since the solaris acl call stores both the access acl and 
-        * the default acl as provided, we have to get the acl part 
-        * that has not been specified in "type" from the file first 
-        * and concatenate it with the acl provided.
-        *
-        * 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(handle->conn, smb_fname);
-       if (ret != 0) {
-               DEBUG(10, ("Error in stat call: %s\n", strerror(errno)));
-               goto done;
-       }
-       if (S_ISDIR(smb_fname->st.st_ex_mode)) {
-               SOLARIS_ACL_T other_acl = NULL;
-               int other_count;
-               SMB_ACL_TYPE_T other_type;
-
-               other_type = (type == SMB_ACL_TYPE_ACCESS) 
-                       ? SMB_ACL_TYPE_DEFAULT
-                       : SMB_ACL_TYPE_ACCESS;
-               DEBUGADD(10, ("getting acl from filesystem\n"));
-               if (!solaris_acl_get_file(smb_fname->base_name,
-                                       &other_acl, &other_count)) {
-                       DEBUG(10, ("error getting acl from directory\n"));
-                       goto done;
-               }
-               DEBUG(10, ("adding %s part of fs acl to given acl\n",
-                          ((other_type == SMB_ACL_TYPE_ACCESS) 
-                           ? "access"
-                           : "default")));
-               if (!solaris_add_to_acl(&solaris_acl, &count, other_acl,
-                                       other_count, other_type)) 
-               {
-                       DEBUG(10, ("error adding other acl.\n"));
-                       SAFE_FREE(other_acl);
-                       goto done;
-               }
-               SAFE_FREE(other_acl);
-       }
-       else if (type != SMB_ACL_TYPE_ACCESS) {
-               errno = EINVAL;
-               goto done;
-       }
-
-       if (!solaris_acl_sort(solaris_acl, count)) {
-               DEBUG(10, ("resulting acl is not valid!\n"));
-               goto done;
-       }
-
-       ret = acl(smb_fname->base_name, SETACL, count, solaris_acl);
-
- done:
-       DEBUG(10, ("solarisacl_sys_acl_set_file %s.\n",
-                  ((ret != 0) ? "failed" : "succeeded")));
-       SAFE_FREE(solaris_acl);
-       TALLOC_FREE(smb_fname);
-       return ret;
-}
-
 /*
  * set the access ACL on the file referred to by a fd 
  */
@@ -777,7 +680,6 @@ static struct vfs_fn_pointers solarisacl_fns = {
        .sys_acl_get_fd_fn = solarisacl_sys_acl_get_fd,
        .sys_acl_blob_get_file_fn = posix_sys_acl_blob_get_file,
        .sys_acl_blob_get_fd_fn = posix_sys_acl_blob_get_fd,
-       .sys_acl_set_file_fn = solarisacl_sys_acl_set_file,
        .sys_acl_set_fd_fn = solarisacl_sys_acl_set_fd,
        .sys_acl_delete_def_file_fn = solarisacl_sys_acl_delete_def_file,
 };
index 91fef517ded786f91d29e639591e21d99ee97236..05ba4865219989270b3194d811502a15b230b79c 100644 (file)
@@ -2395,29 +2395,6 @@ static int smb_time_audit_sys_acl_blob_get_fd(vfs_handle_struct *handle,
        return result;
 }
 
-static int smb_time_audit_sys_acl_set_file(vfs_handle_struct *handle,
-                                          const struct smb_filename *smb_fname,
-                                          SMB_ACL_TYPE_T acltype,
-                                          SMB_ACL_T theacl)
-{
-       int result;
-       struct timespec ts1,ts2;
-       double timediff;
-
-       clock_gettime_mono(&ts1);
-       result = SMB_VFS_NEXT_SYS_ACL_SET_FILE(handle, smb_fname, acltype,
-                                              theacl);
-       clock_gettime_mono(&ts2);
-       timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
-       if (timediff > audit_timeout) {
-               smb_time_audit_log_fname("sys_acl_set_file", timediff,
-                       smb_fname->base_name);
-       }
-
-       return result;
-}
-
 static int smb_time_audit_sys_acl_set_fd(vfs_handle_struct *handle,
                                         files_struct *fsp,
                                         SMB_ACL_TYPE_T type,
@@ -2916,7 +2893,6 @@ static struct vfs_fn_pointers vfs_time_audit_fns = {
        .sys_acl_get_fd_fn = smb_time_audit_sys_acl_get_fd,
        .sys_acl_blob_get_file_fn = smb_time_audit_sys_acl_blob_get_file,
        .sys_acl_blob_get_fd_fn = smb_time_audit_sys_acl_blob_get_fd,
-       .sys_acl_set_file_fn = smb_time_audit_sys_acl_set_file,
        .sys_acl_set_fd_fn = smb_time_audit_sys_acl_set_fd,
        .sys_acl_delete_def_file_fn = smb_time_audit_sys_acl_delete_def_file,
        .getxattr_fn = smb_time_audit_getxattr,
index b5d268c9806998ce34c7d8d1e7966e7b980b6880..12b50ea042c3663d5981140a30c07194437fdf8e 100644 (file)
@@ -87,52 +87,6 @@ SMB_ACL_T tru64acl_sys_acl_get_fd(vfs_handle_struct *handle,
        return result;
 }
 
-int tru64acl_sys_acl_set_file(vfs_handle_struct *handle,
-                             const struct smb_filename *smb_fname,
-                             SMB_ACL_TYPE_T type,
-                             SMB_ACL_T theacl)
-{
-        int res;
-        acl_type_t the_acl_type;
-        acl_t tru64_acl;
-
-        DEBUG(10, ("tru64acl_sys_acl_set_file called with name %s, type %d\n", 
-                       smb_fname->base_name, type));
-
-        switch(type) {
-        case SMB_ACL_TYPE_ACCESS:
-               DEBUGADD(10, ("got acl type ACL_TYPE_ACCESS\n"));
-                the_acl_type = ACL_TYPE_ACCESS;
-                break;
-        case SMB_ACL_TYPE_DEFAULT:
-               DEBUGADD(10, ("got acl type ACL_TYPE_DEFAULT\n"));
-                the_acl_type = ACL_TYPE_DEFAULT;
-                break;
-        default:
-               DEBUGADD(10, ("invalid acl type\n"));
-                errno = EINVAL;
-                goto fail;
-        }
-
-       tru64_acl = smb_acl_to_tru64_acl(theacl);
-        if (tru64_acl == NULL) {
-               DEBUG(10, ("smb_acl_to_tru64_acl failed!\n"));
-                goto fail;
-        }
-       DEBUG(10, ("got tru64 acl...\n"));
-        res = acl_set_file((char *)smb_fname->base_name,
-                               the_acl_type, tru64_acl);
-        acl_free(tru64_acl);
-        if (res != 0) {
-                DEBUG(10, ("acl_set_file failed: %s\n", strerror(errno)));
-               goto fail;
-        }
-        return res;
-fail:
-       DEBUG(1, ("tru64acl_sys_acl_set_file failed!\n"));
-       return -1;
-}
-
 int tru64acl_sys_acl_set_fd(vfs_handle_struct *handle,
                            files_struct *fsp,
                            SMB_ACL_TYPE_T type,
@@ -491,7 +445,6 @@ static struct vfs_fn_pointers tru64acl_fns = {
        .sys_acl_get_fd_fn = tru64acl_sys_acl_get_fd,
        .sys_acl_blob_get_file_fn = posix_sys_acl_blob_get_file,
        .sys_acl_blob_get_fd_fn = posix_sys_acl_blob_get_fd,
-       .sys_acl_set_file_fn = tru64acl_sys_acl_set_file,
        .sys_acl_set_fd_fn = tru64acl_sys_acl_set_fd,
        .sys_acl_delete_def_file_fn = tru64acl_sys_acl_delete_def_file,
 };
index 4c2cc778c88f67227cad3298c3e6bf04cf59f483..ac7ea4b404d166df4fd4325a129caf9ab02d31aa 100644 (file)
@@ -1604,44 +1604,6 @@ err:
        return ret;
 }
 
-static int um_sys_acl_set_file(vfs_handle_struct *handle,
-                              const struct smb_filename *smb_fname,
-                              SMB_ACL_TYPE_T acltype,
-                              SMB_ACL_T theacl)
-{
-       int status;
-       int saved_errno = 0;
-       struct smb_filename *client_fname = NULL;
-
-       DEBUG(10, ("Entering um_sys_acl_set_file\n"));
-
-       if (!is_in_media_files(smb_fname->base_name)) {
-               return SMB_VFS_NEXT_SYS_ACL_SET_FILE(handle, smb_fname,
-                                                    acltype, theacl);
-       }
-
-       status = alloc_get_client_smb_fname(handle,
-                               talloc_tos(),
-                               smb_fname,
-                               &client_fname);
-       if (status != 0) {
-               goto err;
-       }
-
-       status = SMB_VFS_NEXT_SYS_ACL_SET_FILE(handle, client_fname,
-                                              acltype, theacl);
-
-err:
-       if (status == -1) {
-               saved_errno = errno;
-       }
-       TALLOC_FREE(client_fname);
-       if (saved_errno != 0) {
-               errno = saved_errno;
-       }
-       return status;
-}
-
 static int um_sys_acl_delete_def_file(vfs_handle_struct *handle,
                                const struct smb_filename *smb_fname)
 {
@@ -1883,7 +1845,6 @@ static struct vfs_fn_pointers vfs_um_fns = {
        /* POSIX ACL operations. */
 
        .sys_acl_get_file_fn = um_sys_acl_get_file,
-       .sys_acl_set_file_fn = um_sys_acl_set_file,
        .sys_acl_delete_def_file_fn = um_sys_acl_delete_def_file,
 
        /* EA operations. */
index 28f379b19e1a0e65a0bc76c825bfe8e816284826..06efe9f8f4c1f3af16311a24065564811e1c971c 100644 (file)
@@ -499,20 +499,6 @@ static int vxfs_sys_acl_set_fd(vfs_handle_struct *handle,
        return SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, type, theacl);
 }
 
-static int vxfs_sys_acl_set_file(vfs_handle_struct *handle,
-                               const struct smb_filename *smb_fname,
-                               SMB_ACL_TYPE_T acltype,
-                               SMB_ACL_T theacl)
-{
-       if (vxfs_compare(handle->conn, smb_fname,
-                       theacl, acltype)) {
-               return 0;
-       }
-
-       return SMB_VFS_NEXT_SYS_ACL_SET_FILE(handle, smb_fname,
-                       acltype, theacl);
-}
-
 static int vxfs_set_xattr(struct vfs_handle_struct *handle,
                        const struct smb_filename *smb_fname_in,
                        const char *name,
@@ -937,7 +923,6 @@ static struct vfs_fn_pointers vfs_vxfs_fns = {
        .connect_fn = vfs_vxfs_connect,
 
 #ifdef VXFS_ACL_SHARE
-       .sys_acl_set_file_fn = vxfs_sys_acl_set_file,
        .sys_acl_set_fd_fn = vxfs_sys_acl_set_fd,
 #endif
 
index ef9ac0eb718d82ac7791dc865476bd0ca28761de..a526ffa19aad32fd7c1b9e92ed13630851025611 100644 (file)
@@ -535,14 +535,6 @@ static SMB_ACL_T zfsacl_fail__sys_acl_get_fd(vfs_handle_struct *handle,
        return (SMB_ACL_T)NULL;
 }
 
-static int zfsacl_fail__sys_acl_set_file(vfs_handle_struct *handle,
-                                        const struct smb_filename *smb_fname,
-                                        SMB_ACL_TYPE_T type,
-                                        SMB_ACL_T theacl)
-{
-       return -1;
-}
-
 static int zfsacl_fail__sys_acl_set_fd(vfs_handle_struct *handle,
                                       files_struct *fsp,
                                       SMB_ACL_TYPE_T type,
@@ -619,7 +611,6 @@ static struct vfs_fn_pointers zfsacl_fns = {
        .sys_acl_get_fd_fn = zfsacl_fail__sys_acl_get_fd,
        .sys_acl_blob_get_file_fn = zfsacl_fail__sys_acl_blob_get_file,
        .sys_acl_blob_get_fd_fn = zfsacl_fail__sys_acl_blob_get_fd,
-       .sys_acl_set_file_fn = zfsacl_fail__sys_acl_set_file,
        .sys_acl_set_fd_fn = zfsacl_fail__sys_acl_set_fd,
        .sys_acl_delete_def_file_fn = zfsacl_fail__sys_acl_delete_def_file,
        .fget_nt_acl_fn = zfsacl_fget_nt_acl,
index 47277d1dffd9b40a5294bc3dacacdf21c12e808a..c2bf9e92f31c866f568391984e7cf8e362bd30c5 100644 (file)
@@ -2765,16 +2765,6 @@ int smb_vfs_call_sys_acl_blob_get_fd(struct vfs_handle_struct *handle,
        return handle->fns->sys_acl_blob_get_fd_fn(handle, fsp, mem_ctx, blob_description, blob);
 }
 
-int smb_vfs_call_sys_acl_set_file(struct vfs_handle_struct *handle,
-                               const struct smb_filename *smb_fname,
-                               SMB_ACL_TYPE_T acltype,
-                               SMB_ACL_T theacl)
-{
-       VFS_FIND(sys_acl_set_file);
-       return handle->fns->sys_acl_set_file_fn(handle, smb_fname,
-                               acltype, theacl);
-}
-
 int smb_vfs_call_sys_acl_set_fd(struct vfs_handle_struct *handle,
                                struct files_struct *fsp,
                                SMB_ACL_TYPE_T type,