s3: VFS: Remove SMB_VFS_CHMOD_ACL().
authorJeremy Allison <jra@samba.org>
Thu, 17 May 2018 18:32:58 +0000 (11:32 -0700)
committerJeremy Allison <jra@samba.org>
Fri, 25 May 2018 16:39:24 +0000 (18:39 +0200)
No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
25 files changed:
docs-xml/Samba-Developers-Guide/vfs.xml
docs-xml/manpages/vfs_audit.8.xml
docs-xml/manpages/vfs_full_audit.8.xml
examples/VFS/skel_opaque.c
examples/VFS/skel_transparent.c
source3/include/smbprofile.h
source3/include/vfs.h
source3/include/vfs_macros.h
source3/modules/vfs_acl_common.c
source3/modules/vfs_acl_tdb.c
source3/modules/vfs_acl_xattr.c
source3/modules/vfs_audit.c
source3/modules/vfs_cap.c
source3/modules/vfs_catia.c
source3/modules/vfs_default.c
source3/modules/vfs_extd_audit.c
source3/modules/vfs_full_audit.c
source3/modules/vfs_glusterfs.c
source3/modules/vfs_linux_xfs_sgid.c
source3/modules/vfs_media_harmony.c
source3/modules/vfs_shadow_copy2.c
source3/modules/vfs_snapper.c
source3/modules/vfs_time_audit.c
source3/modules/vfs_unityed_media.c
source3/smbd/vfs.c

index 99ef33f..4c4e39c 100644 (file)
@@ -630,7 +630,6 @@ struct vfs_ops example_ops = {
        NULL,                           /* fset_nt_acl */
        NULL,                           /* set_nt_acl */
 
-       NULL,                           /* chmod_acl */
        NULL,                           /* fchmod_acl */
 
        NULL,                           /* sys_acl_get_entry */
index d2b0e90..e04e957 100644 (file)
@@ -47,7 +47,6 @@
        <member>unlink</member>
        <member>chmod</member>
        <member>fchmod</member>
-       <member>chmod_acl</member>
        <member>fchmod_acl</member>
        </simplelist>
 
index 392c7e4..68df0a2 100644 (file)
@@ -41,7 +41,6 @@
         <member>chdir</member>
         <member>chflags</member>
         <member>chmod</member>
-        <member>chmod_acl</member>
         <member>chown</member>
         <member>close</member>
         <member>closedir</member>
index 5529ec7..61fa21b 100644 (file)
@@ -751,14 +751,6 @@ static NTSTATUS skel_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
        return NT_STATUS_NOT_IMPLEMENTED;
 }
 
-static int skel_chmod_acl(vfs_handle_struct *handle,
-                       const struct smb_filename *smb_fname,
-                       mode_t mode)
-{
-       errno = ENOSYS;
-       return -1;
-}
-
 static int skel_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp,
                           mode_t mode)
 {
@@ -1005,7 +997,6 @@ struct vfs_fn_pointers skel_opaque_fns = {
 
        /* POSIX ACL operations. */
 
-       .chmod_acl_fn = skel_chmod_acl,
        .fchmod_acl_fn = skel_fchmod_acl,
 
        .sys_acl_get_file_fn = skel_sys_acl_get_file,
index fde24fb..018a187 100644 (file)
@@ -942,13 +942,6 @@ static NTSTATUS skel_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
        return SMB_VFS_NEXT_FSET_NT_ACL(handle, fsp, security_info_sent, psd);
 }
 
-static int skel_chmod_acl(vfs_handle_struct *handle,
-                       const struct smb_filename *smb_fname,
-                       mode_t mode)
-{
-       return SMB_VFS_NEXT_CHMOD_ACL(handle, smb_fname, mode);
-}
-
 static int skel_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp,
                           mode_t mode)
 {
@@ -1181,7 +1174,6 @@ struct vfs_fn_pointers skel_transparent_fns = {
 
        /* POSIX ACL operations. */
 
-       .chmod_acl_fn = skel_chmod_acl,
        .fchmod_acl_fn = skel_fchmod_acl,
 
        .sys_acl_get_file_fn = skel_sys_acl_get_file,
index a4c3f24..3c8ba2d 100644 (file)
@@ -101,7 +101,6 @@ struct tevent_context;
        SMBPROFILE_STATS_BASIC(get_nt_acl) \
        SMBPROFILE_STATS_BASIC(fget_nt_acl) \
        SMBPROFILE_STATS_BASIC(fset_nt_acl) \
-       SMBPROFILE_STATS_BASIC(chmod_acl) \
        SMBPROFILE_STATS_BASIC(fchmod_acl) \
        SMBPROFILE_STATS_SECTION_END \
        \
index cc7948a..48d97b1 100644 (file)
                All users are now pread or async versions. */
 /* Version 39 - Remove SMB_VFS_WRITE
                All users are now pwrite or async versions. */
+/* Version 39 - Remove SMB_VFS_CHMOD_ACL - no longer used. */
 
 #define SMB_VFS_INTERFACE_VERSION 39
 
@@ -916,9 +917,6 @@ struct vfs_fn_pointers {
 
        /* POSIX ACL operations. */
 
-       int (*chmod_acl_fn)(struct vfs_handle_struct *handle,
-                                       const struct smb_filename *smb_fname,
-                                       mode_t mode);
        int (*fchmod_acl_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, mode_t mode);
 
        SMB_ACL_T (*sys_acl_get_file_fn)(struct vfs_handle_struct *handle,
index d483613..dda275f 100644 (file)
 #define SMB_VFS_NEXT_FSET_NT_ACL(handle, fsp, security_info_sent, psd) \
        smb_vfs_call_fset_nt_acl((handle)->next, (fsp), (security_info_sent), (psd))
 
-#define SMB_VFS_CHMOD_ACL(conn, smb_fname, mode) \
-       smb_vfs_call_chmod_acl((conn)->vfs_handles, (smb_fname), (mode))
-#define SMB_VFS_NEXT_CHMOD_ACL(handle, smb_fname, mode) \
-       smb_vfs_call_chmod_acl((handle)->next, (smb_fname), (mode))
-
 #define SMB_VFS_FCHMOD_ACL(fsp, mode) \
        smb_vfs_call_fchmod_acl((fsp)->conn->vfs_handles, (fsp), (mode))
 #define SMB_VFS_NEXT_FCHMOD_ACL(handle, fsp, mode) \
index 5b2b2ef..0fd625b 100644 (file)
@@ -1245,17 +1245,6 @@ int fchmod_acl_module_common(struct vfs_handle_struct *handle,
        return 0;
 }
 
-int chmod_acl_acl_module_common(struct vfs_handle_struct *handle,
-                               const struct smb_filename *smb_fname,
-                               mode_t mode)
-{
-       if (smb_fname->flags & SMB_FILENAME_POSIX_PATH) {
-               /* Only allow this on POSIX pathnames. */
-               return SMB_VFS_NEXT_CHMOD_ACL(handle, smb_fname, mode);
-       }
-       return 0;
-}
-
 int fchmod_acl_acl_module_common(struct vfs_handle_struct *handle,
                                 struct files_struct *fsp, mode_t mode)
 {
index c5ffa5e..4b61c27 100644 (file)
@@ -496,7 +496,6 @@ static struct vfs_fn_pointers vfs_acl_tdb_fns = {
        .fget_nt_acl_fn = acl_tdb_fget_nt_acl,
        .get_nt_acl_fn = acl_tdb_get_nt_acl,
        .fset_nt_acl_fn = acl_tdb_fset_nt_acl,
-       .chmod_acl_fn = chmod_acl_acl_module_common,
        .fchmod_acl_fn = fchmod_acl_acl_module_common,
        .sys_acl_set_file_fn = sys_acl_set_file_tdb,
        .sys_acl_set_fd_fn = sys_acl_set_fd_tdb
index 38ad81c..62d2678 100644 (file)
@@ -323,7 +323,6 @@ static struct vfs_fn_pointers vfs_acl_xattr_fns = {
        .fget_nt_acl_fn = acl_xattr_fget_nt_acl,
        .get_nt_acl_fn = acl_xattr_get_nt_acl,
        .fset_nt_acl_fn = acl_xattr_fset_nt_acl,
-       .chmod_acl_fn = chmod_acl_acl_module_common,
        .fchmod_acl_fn = fchmod_acl_acl_module_common,
        .sys_acl_set_file_fn = sys_acl_set_file_xattr,
        .sys_acl_set_fd_fn = sys_acl_set_fd_xattr
index 12477d5..f34bcd1 100644 (file)
@@ -233,22 +233,6 @@ static int audit_chmod(vfs_handle_struct *handle,
        return result;
 }
 
-static int audit_chmod_acl(vfs_handle_struct *handle,
-                       const struct smb_filename *smb_fname,
-                       mode_t mode)
-{
-       int result;
-
-       result = SMB_VFS_NEXT_CHMOD_ACL(handle, smb_fname, mode);
-
-       syslog(audit_syslog_priority(handle), "chmod_acl %s mode 0x%x %s%s\n",
-              smb_fname->base_name, mode,
-              (result < 0) ? "failed: " : "",
-              (result < 0) ? strerror(errno) : "");
-
-       return result;
-}
-
 static int audit_fchmod(vfs_handle_struct *handle, files_struct *fsp, mode_t mode)
 {
        int result;
@@ -289,7 +273,6 @@ static struct vfs_fn_pointers vfs_audit_fns = {
        .unlink_fn = audit_unlink,
        .chmod_fn = audit_chmod,
        .fchmod_fn = audit_fchmod,
-       .chmod_acl_fn = audit_chmod_acl,
        .fchmod_acl_fn = audit_fchmod_acl
 };
 
index 0684c79..ffc35d6 100644 (file)
@@ -703,39 +703,6 @@ static struct smb_filename *cap_realpath(vfs_handle_struct *handle,
        return return_fname;
 }
 
-static int cap_chmod_acl(vfs_handle_struct *handle,
-                       const struct smb_filename *smb_fname,
-                       mode_t mode)
-{
-       struct smb_filename *cap_smb_fname = NULL;
-       char *cappath = capencode(talloc_tos(), smb_fname->base_name);
-       int ret;
-       int saved_errno;
-
-       /* If the underlying VFS doesn't have ACL support... */
-       if (!cappath) {
-               errno = ENOMEM;
-               return -1;
-       }
-       cap_smb_fname = synthetic_smb_fname(talloc_tos(),
-                                       cappath,
-                                       NULL,
-                                       NULL,
-                                       smb_fname->flags);
-       if (cap_smb_fname == NULL) {
-               TALLOC_FREE(cappath);
-               errno = ENOMEM;
-               return -1;
-       }
-
-       ret = SMB_VFS_NEXT_CHMOD_ACL(handle, cap_smb_fname, mode);
-       saved_errno = errno;
-       TALLOC_FREE(cappath);
-       TALLOC_FREE(cap_smb_fname);
-       errno = saved_errno;
-       return ret;
-}
-
 static SMB_ACL_T cap_sys_acl_get_file(vfs_handle_struct *handle,
                                const struct smb_filename *smb_fname,
                                SMB_ACL_TYPE_T type,
@@ -1056,7 +1023,6 @@ static struct vfs_fn_pointers vfs_cap_fns = {
        .link_fn = cap_link,
        .mknod_fn = cap_mknod,
        .realpath_fn = cap_realpath,
-       .chmod_acl_fn = cap_chmod_acl,
        .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,
index ed22fa8..d26f797 100644 (file)
@@ -1128,44 +1128,6 @@ catia_get_nt_acl(struct vfs_handle_struct *handle,
        return status;
 }
 
-static int
-catia_chmod_acl(vfs_handle_struct *handle,
-               const struct smb_filename *smb_fname,
-               mode_t mode)
-{
-       char *mapped_name = NULL;
-       struct smb_filename *mapped_smb_fname = NULL;
-       NTSTATUS status;
-       int ret;
-       int saved_errno;
-
-       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,
-                                       NULL,
-                                       smb_fname->flags);
-       if (mapped_smb_fname == NULL) {
-               TALLOC_FREE(mapped_name);
-               errno = ENOMEM;
-               return -1;
-       }
-       ret = SMB_VFS_NEXT_CHMOD_ACL(handle, mapped_smb_fname, mode);
-       saved_errno = errno;
-       TALLOC_FREE(mapped_name);
-       TALLOC_FREE(mapped_smb_fname);
-       errno = saved_errno;
-       return ret;
-}
-
 static SMB_ACL_T
 catia_sys_acl_get_file(vfs_handle_struct *handle,
                        const struct smb_filename *smb_fname,
@@ -2516,7 +2478,6 @@ static struct vfs_fn_pointers vfs_catia_fns = {
        .fset_nt_acl_fn = catia_fset_nt_acl,
 
        /* POSIX ACL operations. */
-       .chmod_acl_fn = catia_chmod_acl,
        .fchmod_acl_fn = catia_fchmod_acl,
 
        .sys_acl_get_file_fn = catia_sys_acl_get_file,
index a2bc7c0..d05015f 100644 (file)
@@ -2691,23 +2691,6 @@ static NTSTATUS vfswrap_audit_file(struct vfs_handle_struct *handle,
        return NT_STATUS_OK; /* Nothing to do here ... */
 }
 
-static int vfswrap_chmod_acl(vfs_handle_struct *handle,
-                               const struct smb_filename *smb_fname,
-                               mode_t mode)
-{
-#ifdef HAVE_NO_ACL
-       errno = ENOSYS;
-       return -1;
-#else
-       int result;
-
-       START_PROFILE(chmod_acl);
-       result = chmod_acl(handle->conn, smb_fname, mode);
-       END_PROFILE(chmod_acl);
-       return result;
-#endif
-}
-
 static int vfswrap_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp, mode_t mode)
 {
 #ifdef HAVE_NO_ACL
@@ -2984,7 +2967,6 @@ static struct vfs_fn_pointers vfs_default_fns = {
 
        /* POSIX ACL operations. */
 
-       .chmod_acl_fn = vfswrap_chmod_acl,
        .fchmod_acl_fn = vfswrap_fchmod_acl,
 
        .sys_acl_get_file_fn = vfswrap_sys_acl_get_file,
index 7d1fe27..abb0190 100644 (file)
@@ -292,28 +292,6 @@ static int audit_chmod(vfs_handle_struct *handle,
        return result;
 }
 
-static int audit_chmod_acl(vfs_handle_struct *handle,
-                       const struct smb_filename *smb_fname,
-                       mode_t mode)
-{
-       int result;
-
-       result = SMB_VFS_NEXT_CHMOD_ACL(handle, smb_fname, mode);
-
-       if (lp_syslog() > 0) {
-               syslog(audit_syslog_priority(handle), "chmod_acl %s mode 0x%x %s%s\n",
-                      smb_fname->base_name, mode,
-                      (result < 0) ? "failed: " : "",
-                      (result < 0) ? strerror(errno) : "");
-       }
-       DEBUG(1, ("vfs_extd_audit: chmod_acl %s mode 0x%x %s %s\n",
-              smb_fname->base_name, (unsigned int)mode,
-              (result < 0) ? "failed: " : "",
-              (result < 0) ? strerror(errno) : ""));
-
-       return result;
-}
-
 static int audit_fchmod(vfs_handle_struct *handle, files_struct *fsp, mode_t mode)
 {
        int result;
@@ -366,7 +344,6 @@ static struct vfs_fn_pointers vfs_extd_audit_fns = {
        .unlink_fn = audit_unlink,
        .chmod_fn = audit_chmod,
        .fchmod_fn = audit_fchmod,
-       .chmod_acl_fn = audit_chmod_acl,
        .fchmod_acl_fn = audit_fchmod_acl,
 };
 
index ee8dbbc..bb8c306 100644 (file)
@@ -191,7 +191,6 @@ typedef enum _vfs_op_type {
 
        /* POSIX ACL operations. */
 
-       SMB_VFS_OP_CHMOD_ACL,
        SMB_VFS_OP_FCHMOD_ACL,
 
        SMB_VFS_OP_SYS_ACL_GET_FILE,
@@ -325,7 +324,6 @@ static struct {
        { SMB_VFS_OP_GET_NT_ACL,        "get_nt_acl" },
        { SMB_VFS_OP_FSET_NT_ACL,       "fset_nt_acl" },
        { SMB_VFS_OP_AUDIT_FILE,        "audit_file" },
-       { SMB_VFS_OP_CHMOD_ACL, "chmod_acl" },
        { SMB_VFS_OP_FCHMOD_ACL,        "fchmod_acl" },
        { SMB_VFS_OP_SYS_ACL_GET_FILE,  "sys_acl_get_file" },
        { SMB_VFS_OP_SYS_ACL_GET_FD,    "sys_acl_get_fd" },
@@ -2132,20 +2130,6 @@ static NTSTATUS smb_full_audit_audit_file(struct vfs_handle_struct *handle,
        return result;
 }
 
-static int smb_full_audit_chmod_acl(vfs_handle_struct *handle,
-                               const struct smb_filename *smb_fname,
-                               mode_t mode)
-{
-       int result;
-       
-       result = SMB_VFS_NEXT_CHMOD_ACL(handle, smb_fname, mode);
-
-       do_log(SMB_VFS_OP_CHMOD_ACL, (result >= 0), handle,
-              "%s|%o", smb_fname->base_name, mode);
-
-       return result;
-}
-
 static int smb_full_audit_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp,
                                     mode_t mode)
 {
@@ -2545,7 +2529,6 @@ static struct vfs_fn_pointers vfs_full_audit_fns = {
        .get_nt_acl_fn = smb_full_audit_get_nt_acl,
        .fset_nt_acl_fn = smb_full_audit_fset_nt_acl,
        .audit_file_fn = smb_full_audit_audit_file,
-       .chmod_acl_fn = smb_full_audit_chmod_acl,
        .fchmod_acl_fn = smb_full_audit_fchmod_acl,
        .sys_acl_get_file_fn = smb_full_audit_sys_acl_get_file,
        .sys_acl_get_fd_fn = smb_full_audit_sys_acl_get_fd,
index b022e98..f000906 100644 (file)
@@ -1499,7 +1499,6 @@ static struct vfs_fn_pointers glusterfs_fns = {
        .audit_file_fn = NULL,
 
        /* Posix ACL Operations */
-       .chmod_acl_fn = NULL,   /* passthrough to default */
        .fchmod_acl_fn = NULL,  /* passthrough to default */
        .sys_acl_get_file_fn = posixacl_xattr_acl_get_file,
        .sys_acl_get_fd_fn = posixacl_xattr_acl_get_fd,
index ab41031..b7c7706 100644 (file)
@@ -95,17 +95,8 @@ static int linux_xfs_sgid_mkdir(vfs_handle_struct *handle,
        return mkdir_res;
 }
 
-static int linux_xfs_sgid_chmod_acl(vfs_handle_struct *handle,
-                       const struct smb_filename *smb_fname,
-                       mode_t mode)
-{
-       errno = ENOSYS;
-       return -1;
-}
-
 static struct vfs_fn_pointers linux_xfs_sgid_fns = {
        .mkdir_fn = linux_xfs_sgid_mkdir,
-       .chmod_acl_fn = linux_xfs_sgid_chmod_acl,
 };
 
 static_decl_vfs;
index f0815d7..32ba45a 100644 (file)
@@ -2014,39 +2014,6 @@ out:
        return status;
 }
 
-/*
- * Success: return 0
- * Failure: set errno, return -1
- */
-static int mh_chmod_acl(vfs_handle_struct *handle,
-               const struct smb_filename *smb_fname,
-               mode_t mode)
-{
-       int status;
-       struct smb_filename *clientFname = NULL;
-
-       DEBUG(MH_INFO_DEBUG, ("Entering mh_chmod_acl\n"));
-       if (!is_in_media_files(smb_fname->base_name))
-       {
-               status = SMB_VFS_NEXT_CHMOD_ACL(handle, smb_fname, mode);
-               goto out;
-       }
-
-       status = alloc_get_client_smb_fname(handle,
-                               talloc_tos(),
-                               smb_fname,
-                               &clientFname);
-       if (status != 0) {
-               goto err;
-       }
-
-       status = SMB_VFS_NEXT_CHMOD_ACL(handle, clientFname, mode);
-err:
-       TALLOC_FREE(clientFname);
-out:
-       return status;
-}
-
 /*
  * Success: return acl pointer
  * Failure: set errno, return NULL
@@ -2338,8 +2305,6 @@ static struct vfs_fn_pointers vfs_mh_fns = {
 
        /* POSIX ACL operations. */
 
-       .chmod_acl_fn = mh_chmod_acl,
-
        .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,
index b6745cf..aa7cd9c 100644 (file)
@@ -2605,54 +2605,6 @@ static int shadow_copy2_setxattr(struct vfs_handle_struct *handle,
        return ret;
 }
 
-static int shadow_copy2_chmod_acl(vfs_handle_struct *handle,
-                       const struct smb_filename *smb_fname,
-                       mode_t mode)
-{
-       time_t timestamp = 0;
-       char *stripped = NULL;
-       ssize_t ret;
-       int saved_errno = 0;
-       char *conv = NULL;
-       struct smb_filename *conv_smb_fname = NULL;
-
-       if (!shadow_copy2_strip_snapshot(talloc_tos(),
-                               handle,
-                               smb_fname->base_name,
-                               &timestamp,
-                               &stripped)) {
-               return -1;
-       }
-       if (timestamp == 0) {
-               return SMB_VFS_NEXT_CHMOD_ACL(handle, smb_fname, mode);
-       }
-       conv = shadow_copy2_convert(talloc_tos(), handle, stripped, timestamp);
-       TALLOC_FREE(stripped);
-       if (conv == NULL) {
-               return -1;
-       }
-       conv_smb_fname = synthetic_smb_fname(talloc_tos(),
-                                       conv,
-                                       NULL,
-                                       NULL,
-                                       smb_fname->flags);
-       if (conv_smb_fname == NULL) {
-               TALLOC_FREE(conv);
-               errno = ENOMEM;
-               return -1;
-       }
-       ret = SMB_VFS_NEXT_CHMOD_ACL(handle, conv_smb_fname, mode);
-       if (ret == -1) {
-               saved_errno = errno;
-       }
-       TALLOC_FREE(conv);
-       TALLOC_FREE(conv_smb_fname);
-       if (saved_errno != 0) {
-               errno = saved_errno;
-       }
-       return ret;
-}
-
 static int shadow_copy2_get_real_filename(struct vfs_handle_struct *handle,
                                          const char *path,
                                          const char *name,
@@ -3263,7 +3215,6 @@ static struct vfs_fn_pointers vfs_shadow_copy2_fns = {
        .listxattr_fn = shadow_copy2_listxattr,
        .removexattr_fn = shadow_copy2_removexattr,
        .setxattr_fn = shadow_copy2_setxattr,
-       .chmod_acl_fn = shadow_copy2_chmod_acl,
        .chflags_fn = shadow_copy2_chflags,
        .get_real_filename_fn = shadow_copy2_get_real_filename,
        .connectpath_fn = shadow_copy2_connectpath,
index 6085150..6b935c3 100644 (file)
@@ -2955,50 +2955,6 @@ static int snapper_gmt_setxattr(struct vfs_handle_struct *handle,
        return ret;
 }
 
-static int snapper_gmt_chmod_acl(vfs_handle_struct *handle,
-                       const struct smb_filename *smb_fname,
-                       mode_t mode)
-{
-       time_t timestamp;
-       char *stripped;
-       ssize_t ret;
-       int saved_errno;
-       char *conv;
-       struct smb_filename *conv_smb_fname = NULL;
-
-       if (!snapper_gmt_strip_snapshot(talloc_tos(),
-                               handle,
-                               smb_fname->base_name,
-                               &timestamp,
-                               &stripped)) {
-               return -1;
-       }
-       if (timestamp == 0) {
-               return SMB_VFS_NEXT_CHMOD_ACL(handle, smb_fname, mode);
-       }
-       conv = snapper_gmt_convert(talloc_tos(), handle, stripped, timestamp);
-       TALLOC_FREE(stripped);
-       if (conv == NULL) {
-               return -1;
-       }
-       conv_smb_fname = synthetic_smb_fname(talloc_tos(),
-                                       conv,
-                                       NULL,
-                                       NULL,
-                                       smb_fname->flags);
-       if (conv_smb_fname == NULL) {
-               TALLOC_FREE(conv);
-               errno = ENOMEM;
-               return -1;
-       }
-       ret = SMB_VFS_NEXT_CHMOD_ACL(handle, conv_smb_fname, mode);
-       saved_errno = errno;
-       TALLOC_FREE(conv);
-       TALLOC_FREE(conv_smb_fname);
-       errno = saved_errno;
-       return ret;
-}
-
 static int snapper_gmt_get_real_filename(struct vfs_handle_struct *handle,
                                         const char *path,
                                         const char *name,
@@ -3172,7 +3128,6 @@ static struct vfs_fn_pointers snapper_fns = {
        .listxattr_fn = snapper_gmt_listxattr,
        .removexattr_fn = snapper_gmt_removexattr,
        .setxattr_fn = snapper_gmt_setxattr,
-       .chmod_acl_fn = snapper_gmt_chmod_acl,
        .chflags_fn = snapper_gmt_chflags,
        .get_real_filename_fn = snapper_gmt_get_real_filename,
 };
index 92ebcd8..13005ac 100644 (file)
@@ -2159,30 +2159,6 @@ static NTSTATUS smb_time_audit_audit_file(struct vfs_handle_struct *handle,
        return result;
 }
 
-
-
-static int smb_time_audit_chmod_acl(vfs_handle_struct *handle,
-                       const struct smb_filename *smb_fname,
-                       mode_t mode)
-{
-       int result;
-       struct timespec ts1,ts2;
-       double timediff;
-
-       clock_gettime_mono(&ts1);
-       result = SMB_VFS_NEXT_CHMOD_ACL(handle, smb_fname, mode);
-       clock_gettime_mono(&ts2);
-       timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
-       if (timediff > audit_timeout) {
-               smb_time_audit_log_fname("chmod_acl",
-                       timediff,
-                       smb_fname->base_name);
-       }
-
-       return result;
-}
-
 static int smb_time_audit_fchmod_acl(vfs_handle_struct *handle,
                                     files_struct *fsp, mode_t mode)
 {
@@ -2702,7 +2678,6 @@ static struct vfs_fn_pointers vfs_time_audit_fns = {
        .get_nt_acl_fn = smb_time_audit_get_nt_acl,
        .fset_nt_acl_fn = smb_time_audit_fset_nt_acl,
        .audit_file_fn = smb_time_audit_audit_file,
-       .chmod_acl_fn = smb_time_audit_chmod_acl,
        .fchmod_acl_fn = smb_time_audit_fchmod_acl,
        .sys_acl_get_file_fn = smb_time_audit_sys_acl_get_file,
        .sys_acl_get_fd_fn = smb_time_audit_sys_acl_get_fd,
index 9859037..328a93d 100644 (file)
@@ -1577,36 +1577,6 @@ err:
        return status;
 }
 
-static int um_chmod_acl(vfs_handle_struct *handle,
-                       const struct smb_filename *smb_fname,
-                       mode_t mode)
-{
-       int status;
-       int saved_errno;
-       struct smb_filename *client_fname = NULL;
-
-       DEBUG(10, ("Entering um_chmod_acl\n"));
-
-       if (!is_in_media_files(smb_fname->base_name)) {
-               return SMB_VFS_NEXT_CHMOD_ACL(handle, smb_fname, mode);
-       }
-
-       status = alloc_get_client_smb_fname(handle,
-                               talloc_tos(),
-                               smb_fname,
-                               &client_fname);
-       if (status != 0) {
-               goto err;
-       }
-       status = SMB_VFS_NEXT_CHMOD_ACL(handle, client_fname, mode);
-
-err:
-       saved_errno = errno;
-       TALLOC_FREE(client_fname);
-       errno = saved_errno;
-       return status;
-}
-
 static SMB_ACL_T um_sys_acl_get_file(vfs_handle_struct *handle,
                                const struct smb_filename *smb_fname,
                                SMB_ACL_TYPE_T type,
@@ -1928,8 +1898,6 @@ static struct vfs_fn_pointers vfs_um_fns = {
 
        /* POSIX ACL operations. */
 
-       .chmod_acl_fn = um_chmod_acl,
-
        .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,
index 386e955..99119e1 100644 (file)
@@ -2490,14 +2490,6 @@ NTSTATUS smb_vfs_call_audit_file(struct vfs_handle_struct *handle,
                                          access_denied);
 }
 
-int smb_vfs_call_chmod_acl(struct vfs_handle_struct *handle,
-               const struct smb_filename *smb_fname,
-               mode_t mode)
-{
-       VFS_FIND(chmod_acl);
-       return handle->fns->chmod_acl_fn(handle, smb_fname, mode);
-}
-
 int smb_vfs_call_fchmod_acl(struct vfs_handle_struct *handle,
                            struct files_struct *fsp, mode_t mode)
 {