summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2018-05-17 11:32:58 -0700
committerJeremy Allison <jra@samba.org>2018-05-25 18:39:24 +0200
commit7b8fa17f06b2e401584f9d3290d9c14ad120ce39 (patch)
treebe7c442f6d3f8481d5e78f9b6f93cb7976bf7ed2 /source3
parent7d3059cd7415c8da429f1f18cc562c6d138d77cf (diff)
downloadsamba-7b8fa17f06b2e401584f9d3290d9c14ad120ce39.tar.gz
s3: VFS: Remove SMB_VFS_CHMOD_ACL().
No longer used. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/include/smbprofile.h1
-rw-r--r--source3/include/vfs.h4
-rw-r--r--source3/include/vfs_macros.h5
-rw-r--r--source3/modules/vfs_acl_common.c11
-rw-r--r--source3/modules/vfs_acl_tdb.c1
-rw-r--r--source3/modules/vfs_acl_xattr.c1
-rw-r--r--source3/modules/vfs_audit.c17
-rw-r--r--source3/modules/vfs_cap.c34
-rw-r--r--source3/modules/vfs_catia.c39
-rw-r--r--source3/modules/vfs_default.c18
-rw-r--r--source3/modules/vfs_extd_audit.c23
-rw-r--r--source3/modules/vfs_full_audit.c17
-rw-r--r--source3/modules/vfs_glusterfs.c1
-rw-r--r--source3/modules/vfs_linux_xfs_sgid.c9
-rw-r--r--source3/modules/vfs_media_harmony.c35
-rw-r--r--source3/modules/vfs_shadow_copy2.c49
-rw-r--r--source3/modules/vfs_snapper.c45
-rw-r--r--source3/modules/vfs_time_audit.c25
-rw-r--r--source3/modules/vfs_unityed_media.c32
-rw-r--r--source3/smbd/vfs.c8
20 files changed, 1 insertions, 374 deletions
diff --git a/source3/include/smbprofile.h b/source3/include/smbprofile.h
index a4c3f241eba..3c8ba2d8e2a 100644
--- a/source3/include/smbprofile.h
+++ b/source3/include/smbprofile.h
@@ -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 \
\
diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index cc7948a115d..48d97b133c9 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -251,6 +251,7 @@
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,
diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h
index d4836134697..dda275fa968 100644
--- a/source3/include/vfs_macros.h
+++ b/source3/include/vfs_macros.h
@@ -460,11 +460,6 @@
#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) \
diff --git a/source3/modules/vfs_acl_common.c b/source3/modules/vfs_acl_common.c
index 5b2b2ef60e3..0fd625bec1d 100644
--- a/source3/modules/vfs_acl_common.c
+++ b/source3/modules/vfs_acl_common.c
@@ -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)
{
diff --git a/source3/modules/vfs_acl_tdb.c b/source3/modules/vfs_acl_tdb.c
index c5ffa5e305b..4b61c274441 100644
--- a/source3/modules/vfs_acl_tdb.c
+++ b/source3/modules/vfs_acl_tdb.c
@@ -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
diff --git a/source3/modules/vfs_acl_xattr.c b/source3/modules/vfs_acl_xattr.c
index 38ad81cc244..62d26781fd5 100644
--- a/source3/modules/vfs_acl_xattr.c
+++ b/source3/modules/vfs_acl_xattr.c
@@ -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
diff --git a/source3/modules/vfs_audit.c b/source3/modules/vfs_audit.c
index 12477d5b01f..f34bcd19161 100644
--- a/source3/modules/vfs_audit.c
+++ b/source3/modules/vfs_audit.c
@@ -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
};
diff --git a/source3/modules/vfs_cap.c b/source3/modules/vfs_cap.c
index 0684c794c76..ffc35d60407 100644
--- a/source3/modules/vfs_cap.c
+++ b/source3/modules/vfs_cap.c
@@ -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,
diff --git a/source3/modules/vfs_catia.c b/source3/modules/vfs_catia.c
index ed22fa833b3..d26f7978290 100644
--- a/source3/modules/vfs_catia.c
+++ b/source3/modules/vfs_catia.c
@@ -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,
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index a2bc7c0e9f9..d05015fd297 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -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,
diff --git a/source3/modules/vfs_extd_audit.c b/source3/modules/vfs_extd_audit.c
index 7d1fe273978..abb019081e0 100644
--- a/source3/modules/vfs_extd_audit.c
+++ b/source3/modules/vfs_extd_audit.c
@@ -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,
};
diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c
index ee8dbbcff2c..bb8c306ea40 100644
--- a/source3/modules/vfs_full_audit.c
+++ b/source3/modules/vfs_full_audit.c
@@ -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,
diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c
index b022e9869ff..f000906261c 100644
--- a/source3/modules/vfs_glusterfs.c
+++ b/source3/modules/vfs_glusterfs.c
@@ -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,
diff --git a/source3/modules/vfs_linux_xfs_sgid.c b/source3/modules/vfs_linux_xfs_sgid.c
index ab41031d17f..b7c77069b89 100644
--- a/source3/modules/vfs_linux_xfs_sgid.c
+++ b/source3/modules/vfs_linux_xfs_sgid.c
@@ -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;
diff --git a/source3/modules/vfs_media_harmony.c b/source3/modules/vfs_media_harmony.c
index f0815d79f95..32ba45a7fe8 100644
--- a/source3/modules/vfs_media_harmony.c
+++ b/source3/modules/vfs_media_harmony.c
@@ -2015,39 +2015,6 @@ out:
}
/*
- * 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,
diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c
index b6745cf169b..aa7cd9c61d0 100644
--- a/source3/modules/vfs_shadow_copy2.c
+++ b/source3/modules/vfs_shadow_copy2.c
@@ -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,
diff --git a/source3/modules/vfs_snapper.c b/source3/modules/vfs_snapper.c
index 60851501a51..6b935c3df41 100644
--- a/source3/modules/vfs_snapper.c
+++ b/source3/modules/vfs_snapper.c
@@ -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,
};
diff --git a/source3/modules/vfs_time_audit.c b/source3/modules/vfs_time_audit.c
index 92ebcd8dcc6..13005ac1158 100644
--- a/source3/modules/vfs_time_audit.c
+++ b/source3/modules/vfs_time_audit.c
@@ -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,
diff --git a/source3/modules/vfs_unityed_media.c b/source3/modules/vfs_unityed_media.c
index 9859037722e..328a93d7043 100644
--- a/source3/modules/vfs_unityed_media.c
+++ b/source3/modules/vfs_unityed_media.c
@@ -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,
diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c
index 386e955243f..99119e1fddc 100644
--- a/source3/smbd/vfs.c
+++ b/source3/smbd/vfs.c
@@ -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)
{