From: Jeremy Allison Date: Tue, 8 Jun 2021 23:16:32 +0000 (-0700) Subject: s3: VFS: RIP SMB_VFS_SYS_ACL_BLOB_GET_FILE() X-Git-Tag: tevent-0.11.0~468 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=71b278d1626ef4c81ec8503c0a9435be77b10238;p=thirdparty%2Fsamba.git s3: VFS: RIP SMB_VFS_SYS_ACL_BLOB_GET_FILE() (\ _ /) ( \ O / ) (// \\) X / \ /___\ _____/ \\_____ | + || | || | SMB_VFS_SYS_ACL || | BLOB_GET_FILE() || | || | || | || | _ ___ _ || | | \ | | \ || | | | | | | || | |_/ | |_/ || | | \ | | || | | \ | | || | | \. _|_. | . || | || * * | * ** * ** |** ** \)),.,\(/.,(//,,..,,\||(,,.,\\,.((// Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c index b41b33e17e2..2fad722de04 100644 --- a/examples/VFS/skel_opaque.c +++ b/examples/VFS/skel_opaque.c @@ -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, diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c index 15a50dc67ba..6783996a5e0 100644 --- a/examples/VFS/skel_transparent.c +++ b/examples/VFS/skel_transparent.c @@ -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, diff --git a/source3/include/vfs.h b/source3/include/vfs.h index 77628d040c0..5bc9f18ad57 100644 --- a/source3/include/vfs.h +++ b/source3/include/vfs.h @@ -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); diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h index e5fa87dd9b3..c5c7a993ac8 100644 --- a/source3/include/vfs_macros.h +++ b/source3/include/vfs_macros.h @@ -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) \ diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index 17a54bfdcdf..109ad4bd696 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -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, diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c index 148d3e385d8..5e1963c025f 100644 --- a/source3/modules/vfs_full_audit.c +++ b/source3/modules/vfs_full_audit.c @@ -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, diff --git a/source3/modules/vfs_not_implemented.c b/source3/modules/vfs_not_implemented.c index 814131b6b2b..2dfac2338c6 100644 --- a/source3/modules/vfs_not_implemented.c +++ b/source3/modules/vfs_not_implemented.c @@ -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, diff --git a/source3/modules/vfs_time_audit.c b/source3/modules/vfs_time_audit.c index 16c79a0478c..1e7b5c1b65f 100644 --- a/source3/modules/vfs_time_audit.c +++ b/source3/modules/vfs_time_audit.c @@ -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, diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c index ac6051d8121..5cc86fb96f1 100644 --- a/source3/smbd/vfs.c +++ b/source3/smbd/vfs.c @@ -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,