1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

s3: VFS: RIP SMB_VFS_SYS_ACL_BLOB_GET_FILE()

(\  _  /)
                        ( \ O / )
                         (// \\)
                            X
                           / \
                          /___\
                   _____/      \\_____
                  |         +         ||
                  |                   ||
                  |   SMB_VFS_SYS_ACL ||
                  | BLOB_GET_FILE()   ||
                  |                   ||
                  |                   ||
                  |                   ||
                  |  _     ___   _    ||
                  | | \     |   | \   ||
                  | |  |    |   |  |  ||
                  | |_/     |   |_/   ||
                  | | \     |   |     ||
                  | |  \    |   |     ||
                  | |   \. _|_. | .   ||
                  |                   ||
          *     * | *   **    * **    |**     **
           \)),.,\(/.,(//,,..,,\||(,,.,\\,.((//

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
Jeremy Allison 2021-06-08 16:16:32 -07:00 committed by Ralph Boehme
parent c8f468d29d
commit 71b278d162
9 changed files with 1 additions and 113 deletions

View File

@ -797,16 +797,6 @@ static SMB_ACL_T skel_sys_acl_get_fd(vfs_handle_struct *handle,
return (SMB_ACL_T) NULL;
}
static int skel_sys_acl_blob_get_file(vfs_handle_struct *handle,
const struct smb_filename *smb_fname,
TALLOC_CTX *mem_ctx,
char **blob_description,
DATA_BLOB *blob)
{
errno = ENOSYS;
return -1;
}
static int skel_sys_acl_blob_get_fd(vfs_handle_struct *handle,
files_struct *fsp, TALLOC_CTX *mem_ctx,
char **blob_description, DATA_BLOB *blob)
@ -1074,7 +1064,6 @@ static struct vfs_fn_pointers skel_opaque_fns = {
/* POSIX ACL operations. */
.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_fd_fn = skel_sys_acl_set_fd,
.sys_acl_delete_def_fd_fn = skel_sys_acl_delete_def_fd,

View File

@ -1059,16 +1059,6 @@ static SMB_ACL_T skel_sys_acl_get_fd(vfs_handle_struct *handle,
return SMB_VFS_NEXT_SYS_ACL_GET_FD(handle, fsp, type, mem_ctx);
}
static int skel_sys_acl_blob_get_file(vfs_handle_struct *handle,
const struct smb_filename *smb_fname,
TALLOC_CTX *mem_ctx,
char **blob_description,
DATA_BLOB *blob)
{
return SMB_VFS_NEXT_SYS_ACL_BLOB_GET_FILE(handle, smb_fname, mem_ctx,
blob_description, blob);
}
static int skel_sys_acl_blob_get_fd(vfs_handle_struct *handle,
files_struct *fsp, TALLOC_CTX *mem_ctx,
char **blob_description, DATA_BLOB *blob)
@ -1379,7 +1369,6 @@ static struct vfs_fn_pointers skel_transparent_fns = {
/* POSIX ACL operations. */
.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_fd_fn = skel_sys_acl_set_fd,
.sys_acl_delete_def_fd_fn = skel_sys_acl_delete_def_fd,

View File

@ -357,6 +357,7 @@
* Version 45 - Add SMB_VFS_PARENT_PATHNAME
* Version 45 - Remove SMB_VFS_GET_NT_ACL_AT
* Version 45 - Remove SYS_ACL_GET_FILE
* Version 45 - Remove SYS_ACL_BLOB_GET_FILE
*/
#define SMB_VFS_INTERFACE_VERSION 45
@ -1214,11 +1215,6 @@ struct vfs_fn_pointers {
struct files_struct *fsp,
SMB_ACL_TYPE_T type,
TALLOC_CTX *mem_ctx);
int (*sys_acl_blob_get_file_fn)(struct vfs_handle_struct *handle,
const struct smb_filename *smb_fname,
TALLOC_CTX *mem_ctx,
char **blob_description,
DATA_BLOB *blob);
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);
@ -1722,11 +1718,6 @@ SMB_ACL_T smb_vfs_call_sys_acl_get_fd(struct vfs_handle_struct *handle,
struct files_struct *fsp,
SMB_ACL_TYPE_T type,
TALLOC_CTX *mem_ctx);
int smb_vfs_call_sys_acl_blob_get_file(struct vfs_handle_struct *handle,
const struct smb_filename *smb_fname,
TALLOC_CTX *mem_ctx,
char **blob_description,
DATA_BLOB *blob);
int smb_vfs_call_sys_acl_blob_get_fd(struct vfs_handle_struct *handle,
struct files_struct *fsp,
TALLOC_CTX *mem_ctx,
@ -2131,11 +2122,6 @@ SMB_ACL_T vfs_not_implemented_sys_acl_get_fd(vfs_handle_struct *handle,
files_struct *fsp,
SMB_ACL_TYPE_T type,
TALLOC_CTX *mem_ctx);
int vfs_not_implemented_sys_acl_blob_get_file(vfs_handle_struct *handle,
const struct smb_filename *smb_fname,
TALLOC_CTX *mem_ctx,
char **blob_description,
DATA_BLOB *blob);
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);

View File

@ -489,11 +489,6 @@
#define SMB_VFS_NEXT_SYS_ACL_GET_FD(handle, fsp, type, mem_ctx) \
smb_vfs_call_sys_acl_get_fd((handle)->next, (fsp), (type), (mem_ctx))
#define SMB_VFS_SYS_ACL_BLOB_GET_FILE(conn, smb_fname, mem_ctx, blob_description, blob) \
smb_vfs_call_sys_acl_blob_get_file((conn)->vfs_handles, (smb_fname), (mem_ctx), (blob_description), (blob))
#define SMB_VFS_NEXT_SYS_ACL_BLOB_GET_FILE(handle, smb_fname, mem_ctx, blob_description, blob) \
smb_vfs_call_sys_acl_blob_get_file((handle)->next, (smb_fname), (mem_ctx), (blob_description), (blob))
#define SMB_VFS_SYS_ACL_BLOB_GET_FD(fsp, mem_ctx, blob_description, blob) \
smb_vfs_call_sys_acl_blob_get_fd((fsp)->conn->vfs_handles, (fsp), (mem_ctx), (blob_description), (blob))
#define SMB_VFS_NEXT_SYS_ACL_BLOB_GET_FD(handle, fsp, mem_ctx, blob_description, blob) \

View File

@ -3881,7 +3881,6 @@ static struct vfs_fn_pointers vfs_default_fns = {
/* POSIX ACL operations. */
.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_fd_fn = vfswrap_sys_acl_set_fd,
.sys_acl_delete_def_fd_fn = vfswrap_sys_acl_delete_def_fd,

View File

@ -197,7 +197,6 @@ typedef enum _vfs_op_type {
/* POSIX ACL operations. */
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_FD,
SMB_VFS_OP_SYS_ACL_DELETE_DEF_FD,
@ -327,7 +326,6 @@ static struct {
{ SMB_VFS_OP_FSET_NT_ACL, "fset_nt_acl" },
{ SMB_VFS_OP_AUDIT_FILE, "audit_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" },
{ SMB_VFS_OP_SYS_ACL_BLOB_GET_FD, "sys_acl_blob_get_fd" },
{ SMB_VFS_OP_SYS_ACL_SET_FD, "sys_acl_set_fd" },
{ SMB_VFS_OP_SYS_ACL_DELETE_DEF_FD, "sys_acl_delete_def_fd" },
@ -2540,26 +2538,6 @@ static SMB_ACL_T smb_full_audit_sys_acl_get_fd(vfs_handle_struct *handle,
return result;
}
static int smb_full_audit_sys_acl_blob_get_file(vfs_handle_struct *handle,
const struct smb_filename *smb_fname,
TALLOC_CTX *mem_ctx,
char **blob_description,
DATA_BLOB *blob)
{
int result;
result = SMB_VFS_NEXT_SYS_ACL_BLOB_GET_FILE(handle, smb_fname,
mem_ctx, blob_description, blob);
do_log(SMB_VFS_OP_SYS_ACL_BLOB_GET_FILE,
(result >= 0),
handle,
"%s",
smb_fname_str_do_log(handle->conn, smb_fname));
return result;
}
static int smb_full_audit_sys_acl_blob_get_fd(vfs_handle_struct *handle,
files_struct *fsp,
TALLOC_CTX *mem_ctx,
@ -2981,7 +2959,6 @@ static struct vfs_fn_pointers vfs_full_audit_fns = {
.fset_nt_acl_fn = smb_full_audit_fset_nt_acl,
.audit_file_fn = smb_full_audit_audit_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,
.sys_acl_blob_get_fd_fn = smb_full_audit_sys_acl_blob_get_fd,
.sys_acl_set_fd_fn = smb_full_audit_sys_acl_set_fd,
.sys_acl_delete_def_fd_fn = smb_full_audit_sys_acl_delete_def_fd,

View File

@ -801,16 +801,6 @@ SMB_ACL_T vfs_not_implemented_sys_acl_get_fd(vfs_handle_struct *handle,
return (SMB_ACL_T) NULL;
}
int vfs_not_implemented_sys_acl_blob_get_file(vfs_handle_struct *handle,
const struct smb_filename *smb_fname,
TALLOC_CTX *mem_ctx,
char **blob_description,
DATA_BLOB *blob)
{
errno = ENOSYS;
return -1;
}
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)
@ -1078,7 +1068,6 @@ static struct vfs_fn_pointers vfs_not_implemented_fns = {
/* POSIX ACL operations. */
.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_fd_fn = vfs_not_implemented_sys_acl_set_fd,
.sys_acl_delete_def_fd_fn = vfs_not_implemented_sys_acl_delete_def_fd,

View File

@ -2337,30 +2337,6 @@ static SMB_ACL_T smb_time_audit_sys_acl_get_fd(vfs_handle_struct *handle,
return result;
}
static int smb_time_audit_sys_acl_blob_get_file(vfs_handle_struct *handle,
const struct smb_filename *smb_fname,
TALLOC_CTX *mem_ctx,
char **blob_description,
DATA_BLOB *blob)
{
int result;
struct timespec ts1,ts2;
double timediff;
clock_gettime_mono(&ts1);
result = SMB_VFS_NEXT_SYS_ACL_BLOB_GET_FILE(handle, smb_fname,
mem_ctx, blob_description, blob);
clock_gettime_mono(&ts2);
timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
if (timediff > audit_timeout) {
smb_time_audit_log("sys_acl_blob_get_file", timediff);
}
return result;
}
static int smb_time_audit_sys_acl_blob_get_fd(vfs_handle_struct *handle,
files_struct *fsp,
TALLOC_CTX *mem_ctx,
@ -2807,7 +2783,6 @@ static struct vfs_fn_pointers vfs_time_audit_fns = {
.fset_nt_acl_fn = smb_time_audit_fset_nt_acl,
.audit_file_fn = smb_time_audit_audit_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,
.sys_acl_blob_get_fd_fn = smb_time_audit_sys_acl_blob_get_fd,
.sys_acl_set_fd_fn = smb_time_audit_sys_acl_set_fd,
.sys_acl_delete_def_fd_fn = smb_time_audit_sys_acl_delete_def_fd,

View File

@ -2741,17 +2741,6 @@ SMB_ACL_T smb_vfs_call_sys_acl_get_fd(struct vfs_handle_struct *handle,
return handle->fns->sys_acl_get_fd_fn(handle, fsp, type, mem_ctx);
}
int smb_vfs_call_sys_acl_blob_get_file(struct vfs_handle_struct *handle,
const struct smb_filename *smb_fname,
TALLOC_CTX *mem_ctx,
char **blob_description,
DATA_BLOB *blob)
{
VFS_FIND(sys_acl_blob_get_file);
return handle->fns->sys_acl_blob_get_file_fn(handle, smb_fname,
mem_ctx, blob_description, blob);
}
int smb_vfs_call_sys_acl_blob_get_fd(struct vfs_handle_struct *handle,
struct files_struct *fsp,
TALLOC_CTX *mem_ctx,