1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

s3: VFS: Remove SMB_VFS_FCHMOD_ACL().

No longer used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
This commit is contained in:
Jeremy Allison 2018-05-17 11:48:55 -07:00
parent a3d7544b8c
commit 5bbb831041
21 changed files with 1 additions and 179 deletions

View File

@ -630,8 +630,6 @@ struct vfs_ops example_ops = {
NULL, /* fset_nt_acl */
NULL, /* set_nt_acl */
NULL, /* fchmod_acl */
NULL, /* sys_acl_get_entry */
NULL, /* sys_acl_get_tag_type */
NULL, /* sys_acl_get_permset */

View File

@ -47,7 +47,6 @@
<member>unlink</member>
<member>chmod</member>
<member>fchmod</member>
<member>fchmod_acl</member>
</simplelist>
<para>This module is stackable.</para>

View File

@ -50,7 +50,6 @@
<member>disconnect</member>
<member>disk_free</member>
<member>fchmod</member>
<member>fchmod_acl</member>
<member>fchown</member>
<member>fget_nt_acl</member>
<member>fgetxattr</member>

View File

@ -751,13 +751,6 @@ static NTSTATUS skel_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
return NT_STATUS_NOT_IMPLEMENTED;
}
static int skel_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp,
mode_t mode)
{
errno = ENOSYS;
return -1;
}
static SMB_ACL_T skel_sys_acl_get_file(vfs_handle_struct *handle,
const struct smb_filename *smb_fname,
SMB_ACL_TYPE_T type,
@ -997,8 +990,6 @@ struct vfs_fn_pointers skel_opaque_fns = {
/* POSIX ACL operations. */
.fchmod_acl_fn = skel_fchmod_acl,
.sys_acl_get_file_fn = skel_sys_acl_get_file,
.sys_acl_get_fd_fn = skel_sys_acl_get_fd,
.sys_acl_blob_get_file_fn = skel_sys_acl_blob_get_file,

View File

@ -942,12 +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_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp,
mode_t mode)
{
return SMB_VFS_NEXT_FCHMOD_ACL(handle, fsp, mode);
}
static SMB_ACL_T skel_sys_acl_get_file(vfs_handle_struct *handle,
const struct smb_filename *smb_fname,
SMB_ACL_TYPE_T type,
@ -1174,8 +1168,6 @@ struct vfs_fn_pointers skel_transparent_fns = {
/* POSIX ACL operations. */
.fchmod_acl_fn = skel_fchmod_acl,
.sys_acl_get_file_fn = skel_sys_acl_get_file,
.sys_acl_get_fd_fn = skel_sys_acl_get_fd,
.sys_acl_blob_get_file_fn = skel_sys_acl_blob_get_file,

View 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(fchmod_acl) \
SMBPROFILE_STATS_SECTION_END \
\
SMBPROFILE_STATS_SECTION_START(statcache, "Stat Cache") \

View File

@ -252,6 +252,7 @@
/* Version 39 - Remove SMB_VFS_WRITE
All users are now pwrite or async versions. */
/* Version 39 - Remove SMB_VFS_CHMOD_ACL - no longer used. */
/* Version 39 - Remove SMB_VFS_FCHMOD_ACL - no longer used. */
#define SMB_VFS_INTERFACE_VERSION 39
@ -917,8 +918,6 @@ struct vfs_fn_pointers {
/* POSIX ACL operations. */
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,
const struct smb_filename *smb_fname,
SMB_ACL_TYPE_T type,
@ -1408,8 +1407,6 @@ NTSTATUS smb_vfs_call_audit_file(struct vfs_handle_struct *handle,
int smb_vfs_call_chmod_acl(struct vfs_handle_struct *handle,
const struct smb_filename *file,
mode_t mode);
int smb_vfs_call_fchmod_acl(struct vfs_handle_struct *handle,
struct files_struct *fsp, mode_t mode);
SMB_ACL_T smb_vfs_call_sys_acl_get_file(struct vfs_handle_struct *handle,
const struct smb_filename *smb_fname,
SMB_ACL_TYPE_T type,

View File

@ -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_FCHMOD_ACL(fsp, mode) \
smb_vfs_call_fchmod_acl((fsp)->conn->vfs_handles, (fsp), (mode))
#define SMB_VFS_NEXT_FCHMOD_ACL(handle, fsp, mode) \
smb_vfs_call_fchmod_acl((handle)->next, (fsp), (mode))
#define SMB_VFS_SYS_ACL_GET_FILE(conn, smb_fname, type, mem_ctx) \
smb_vfs_call_sys_acl_get_file((conn)->vfs_handles, (smb_fname), (type), (mem_ctx))
#define SMB_VFS_NEXT_SYS_ACL_GET_FILE(handle, smb_fname, type, mem_ctx) \

View File

@ -1244,13 +1244,3 @@ int fchmod_acl_module_common(struct vfs_handle_struct *handle,
}
return 0;
}
int fchmod_acl_acl_module_common(struct vfs_handle_struct *handle,
struct files_struct *fsp, mode_t mode)
{
if (fsp->posix_flags & FSP_POSIX_FLAGS_OPEN) {
/* Only allow this on POSIX opens. */
return SMB_VFS_NEXT_FCHMOD_ACL(handle, fsp, mode);
}
return 0;
}

View File

@ -44,9 +44,6 @@ int fchmod_acl_module_common(struct vfs_handle_struct *handle,
int chmod_acl_acl_module_common(struct vfs_handle_struct *handle,
const struct smb_filename *smb_fname,
mode_t mode);
int fchmod_acl_acl_module_common(struct vfs_handle_struct *handle,
struct files_struct *fsp, mode_t mode);
NTSTATUS get_nt_acl_common(
NTSTATUS (*get_acl_blob_fn)(TALLOC_CTX *ctx,
vfs_handle_struct *handle,

View 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,
.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
};

View 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,
.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
};

View File

@ -247,20 +247,6 @@ static int audit_fchmod(vfs_handle_struct *handle, files_struct *fsp, mode_t mod
return result;
}
static int audit_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp, mode_t mode)
{
int result;
result = SMB_VFS_NEXT_FCHMOD_ACL(handle, fsp, mode);
syslog(audit_syslog_priority(handle), "fchmod_acl %s mode 0x%x %s%s\n",
fsp->fsp_name->base_name, mode,
(result < 0) ? "failed: " : "",
(result < 0) ? strerror(errno) : "");
return result;
}
static struct vfs_fn_pointers vfs_audit_fns = {
.connect_fn = audit_connect,
.disconnect_fn = audit_disconnect,
@ -273,7 +259,6 @@ static struct vfs_fn_pointers vfs_audit_fns = {
.unlink_fn = audit_unlink,
.chmod_fn = audit_chmod,
.fchmod_fn = audit_fchmod,
.fchmod_acl_fn = audit_fchmod_acl
};
static_decl_vfs;

View File

@ -1731,25 +1731,6 @@ static int catia_sys_acl_set_fd(vfs_handle_struct *handle,
return ret;
}
static int catia_fchmod_acl(vfs_handle_struct *handle,
files_struct *fsp,
mode_t mode)
{
struct catia_cache *cc = NULL;
int ret;
ret = CATIA_FETCH_FSP_PRE_NEXT(talloc_tos(), handle, fsp, &cc);
if (ret != 0) {
return ret;
}
ret = SMB_VFS_NEXT_FCHMOD_ACL(handle, fsp, mode);
CATIA_FETCH_FSP_POST_NEXT(&cc, fsp);
return ret;
}
static NTSTATUS catia_fget_nt_acl(vfs_handle_struct *handle,
files_struct *fsp,
uint32_t security_info,
@ -2478,8 +2459,6 @@ static struct vfs_fn_pointers vfs_catia_fns = {
.fset_nt_acl_fn = catia_fset_nt_acl,
/* POSIX ACL operations. */
.fchmod_acl_fn = catia_fchmod_acl,
.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,

View File

@ -2674,21 +2674,6 @@ static NTSTATUS vfswrap_audit_file(struct vfs_handle_struct *handle,
return NT_STATUS_OK; /* Nothing to do here ... */
}
static int vfswrap_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp, mode_t mode)
{
#ifdef HAVE_NO_ACL
errno = ENOSYS;
return -1;
#else
int result;
START_PROFILE(fchmod_acl);
result = fchmod_acl(fsp, mode);
END_PROFILE(fchmod_acl);
return result;
#endif
}
static SMB_ACL_T vfswrap_sys_acl_get_file(vfs_handle_struct *handle,
const struct smb_filename *smb_fname,
SMB_ACL_TYPE_T type,
@ -2950,8 +2935,6 @@ static struct vfs_fn_pointers vfs_default_fns = {
/* POSIX ACL operations. */
.fchmod_acl_fn = vfswrap_fchmod_acl,
.sys_acl_get_file_fn = vfswrap_sys_acl_get_file,
.sys_acl_get_fd_fn = vfswrap_sys_acl_get_fd,
.sys_acl_blob_get_file_fn = posix_sys_acl_blob_get_file,

View File

@ -312,26 +312,6 @@ static int audit_fchmod(vfs_handle_struct *handle, files_struct *fsp, mode_t mod
return result;
}
static int audit_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp, mode_t mode)
{
int result;
result = SMB_VFS_NEXT_FCHMOD_ACL(handle, fsp, mode);
if (lp_syslog() > 0) {
syslog(audit_syslog_priority(handle), "fchmod_acl %s mode 0x%x %s%s\n",
fsp->fsp_name->base_name, mode,
(result < 0) ? "failed: " : "",
(result < 0) ? strerror(errno) : "");
}
DEBUG(1, ("vfs_extd_audit: fchmod_acl %s mode 0x%x %s %s",
fsp_str_dbg(fsp), (unsigned int)mode,
(result < 0) ? "failed: " : "",
(result < 0) ? strerror(errno) : ""));
return result;
}
static struct vfs_fn_pointers vfs_extd_audit_fns = {
.connect_fn = audit_connect,
.disconnect_fn = audit_disconnect,
@ -344,7 +324,6 @@ static struct vfs_fn_pointers vfs_extd_audit_fns = {
.unlink_fn = audit_unlink,
.chmod_fn = audit_chmod,
.fchmod_fn = audit_fchmod,
.fchmod_acl_fn = audit_fchmod_acl,
};
static_decl_vfs;

View File

@ -324,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_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" },
{ SMB_VFS_OP_SYS_ACL_BLOB_GET_FILE, "sys_acl_blob_get_file" },
@ -2130,19 +2129,6 @@ static NTSTATUS smb_full_audit_audit_file(struct vfs_handle_struct *handle,
return result;
}
static int smb_full_audit_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp,
mode_t mode)
{
int result;
result = SMB_VFS_NEXT_FCHMOD_ACL(handle, fsp, mode);
do_log(SMB_VFS_OP_FCHMOD_ACL, (result >= 0), handle,
"%s|%o", fsp_str_do_log(fsp), mode);
return result;
}
static SMB_ACL_T smb_full_audit_sys_acl_get_file(vfs_handle_struct *handle,
const struct smb_filename *smb_fname,
SMB_ACL_TYPE_T type,
@ -2529,7 +2515,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,
.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,
.sys_acl_blob_get_file_fn = smb_full_audit_sys_acl_blob_get_file,

View File

@ -1499,7 +1499,6 @@ static struct vfs_fn_pointers glusterfs_fns = {
.audit_file_fn = NULL,
/* Posix ACL Operations */
.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,
.sys_acl_blob_get_file_fn = posix_sys_acl_blob_get_file,

View File

@ -1390,20 +1390,6 @@ static int streams_xattr_fsetxattr(struct vfs_handle_struct *handle,
return -1;
}
static int streams_xattr_fchmod_acl(vfs_handle_struct *handle,
files_struct *fsp,
mode_t mode)
{
struct stream_io *sio =
(struct stream_io *)VFS_FETCH_FSP_EXTENSION(handle, fsp);
if (sio == NULL) {
return SMB_VFS_NEXT_FCHMOD_ACL(handle, fsp, mode);
}
return 0;
}
static SMB_ACL_T streams_xattr_sys_acl_get_fd(vfs_handle_struct *handle,
files_struct *fsp,
TALLOC_CTX *mem_ctx)
@ -1677,8 +1663,6 @@ static struct vfs_fn_pointers vfs_streams_xattr_fns = {
.fremovexattr_fn = streams_xattr_fremovexattr,
.fsetxattr_fn = streams_xattr_fsetxattr,
.fchmod_acl_fn = streams_xattr_fchmod_acl,
.sys_acl_get_fd_fn = streams_xattr_sys_acl_get_fd,
.sys_acl_blob_get_fd_fn = streams_xattr_sys_acl_blob_get_fd,
.sys_acl_set_fd_fn = streams_xattr_sys_acl_set_fd,

View File

@ -2159,25 +2159,6 @@ static NTSTATUS smb_time_audit_audit_file(struct vfs_handle_struct *handle,
return result;
}
static int smb_time_audit_fchmod_acl(vfs_handle_struct *handle,
files_struct *fsp, mode_t mode)
{
int result;
struct timespec ts1,ts2;
double timediff;
clock_gettime_mono(&ts1);
result = SMB_VFS_NEXT_FCHMOD_ACL(handle, fsp, mode);
clock_gettime_mono(&ts2);
timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
if (timediff > audit_timeout) {
smb_time_audit_log_fsp("fchmod_acl", timediff, fsp);
}
return result;
}
static SMB_ACL_T smb_time_audit_sys_acl_get_file(vfs_handle_struct *handle,
const struct smb_filename *smb_fname,
SMB_ACL_TYPE_T type,
@ -2678,7 +2659,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,
.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,
.sys_acl_blob_get_file_fn = smb_time_audit_sys_acl_blob_get_file,

View File

@ -2490,13 +2490,6 @@ NTSTATUS smb_vfs_call_audit_file(struct vfs_handle_struct *handle,
access_denied);
}
int smb_vfs_call_fchmod_acl(struct vfs_handle_struct *handle,
struct files_struct *fsp, mode_t mode)
{
VFS_FIND(fchmod_acl);
return handle->fns->fchmod_acl_fn(handle, fsp, mode);
}
SMB_ACL_T smb_vfs_call_sys_acl_get_file(struct vfs_handle_struct *handle,
const struct smb_filename *smb_fname,
SMB_ACL_TYPE_T type,