summaryrefslogtreecommitdiff
path: root/source3/modules
diff options
context:
space:
mode:
Diffstat (limited to 'source3/modules')
-rw-r--r--source3/modules/vfs_default.c70
-rw-r--r--source3/modules/vfs_full_audit.c98
-rw-r--r--source3/modules/vfs_time_audit.c148
3 files changed, 0 insertions, 316 deletions
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index aa38a50b80..c9d32389c7 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -2155,69 +2155,6 @@ static int vfswrap_fsetxattr(struct vfs_handle_struct *handle, struct files_stru
return fsetxattr(fsp->fh->fd, name, value, size, flags);
}
-static int vfswrap_aio_read(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
-{
- int ret;
- if (!initialize_async_io_handler()) {
- errno = ENOSYS;
- return -1;
- }
- /*
- * aio_read must be done as root, because in the glibc aio
- * implementation the helper thread needs to be able to send a signal
- * to the main thread, even when it has done a seteuid() to a
- * different user.
- */
- become_root();
- ret = sys_aio_read(aiocb);
- unbecome_root();
- return ret;
-}
-
-static int vfswrap_aio_write(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
-{
- int ret;
- if (!initialize_async_io_handler()) {
- errno = ENOSYS;
- return -1;
- }
- /*
- * aio_write must be done as root, because in the glibc aio
- * implementation the helper thread needs to be able to send a signal
- * to the main thread, even when it has done a seteuid() to a
- * different user.
- */
- become_root();
- ret = sys_aio_write(aiocb);
- unbecome_root();
- return ret;
-}
-
-static ssize_t vfswrap_aio_return(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
-{
- return sys_aio_return(aiocb);
-}
-
-static int vfswrap_aio_cancel(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
-{
- return sys_aio_cancel(fsp->fh->fd, aiocb);
-}
-
-static int vfswrap_aio_error(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
-{
- return sys_aio_error(aiocb);
-}
-
-static int vfswrap_aio_fsync(struct vfs_handle_struct *handle, struct files_struct *fsp, int op, SMB_STRUCT_AIOCB *aiocb)
-{
- return sys_aio_fsync(op, aiocb);
-}
-
-static int vfswrap_aio_suspend(struct vfs_handle_struct *handle, struct files_struct *fsp, const SMB_STRUCT_AIOCB * const aiocb[], int n, const struct timespec *timeout)
-{
- return sys_aio_suspend(aiocb, n, timeout);
-}
-
static bool vfswrap_aio_force(struct vfs_handle_struct *handle, struct files_struct *fsp)
{
return false;
@@ -2393,13 +2330,6 @@ static struct vfs_fn_pointers vfs_default_fns = {
.fsetxattr_fn = vfswrap_fsetxattr,
/* aio operations */
- .aio_read_fn = vfswrap_aio_read,
- .aio_write_fn = vfswrap_aio_write,
- .aio_return_fn = vfswrap_aio_return,
- .aio_cancel_fn = vfswrap_aio_cancel,
- .aio_error_fn = vfswrap_aio_error,
- .aio_fsync_fn = vfswrap_aio_fsync,
- .aio_suspend_fn = vfswrap_aio_suspend,
.aio_force_fn = vfswrap_aio_force,
/* offline operations */
diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c
index 6d621f57ae..74cc663be8 100644
--- a/source3/modules/vfs_full_audit.c
+++ b/source3/modules/vfs_full_audit.c
@@ -205,13 +205,6 @@ typedef enum _vfs_op_type {
SMB_VFS_OP_FSETXATTR,
/* aio operations */
- SMB_VFS_OP_AIO_READ,
- SMB_VFS_OP_AIO_WRITE,
- SMB_VFS_OP_AIO_RETURN,
- SMB_VFS_OP_AIO_CANCEL,
- SMB_VFS_OP_AIO_ERROR,
- SMB_VFS_OP_AIO_FSYNC,
- SMB_VFS_OP_AIO_SUSPEND,
SMB_VFS_OP_AIO_FORCE,
/* offline operations */
@@ -332,13 +325,6 @@ static struct {
{ SMB_VFS_OP_FREMOVEXATTR, "fremovexattr" },
{ SMB_VFS_OP_SETXATTR, "setxattr" },
{ SMB_VFS_OP_FSETXATTR, "fsetxattr" },
- { SMB_VFS_OP_AIO_READ, "aio_read" },
- { SMB_VFS_OP_AIO_WRITE, "aio_write" },
- { SMB_VFS_OP_AIO_RETURN,"aio_return" },
- { SMB_VFS_OP_AIO_CANCEL,"aio_cancel" },
- { SMB_VFS_OP_AIO_ERROR, "aio_error" },
- { SMB_VFS_OP_AIO_FSYNC, "aio_fsync" },
- { SMB_VFS_OP_AIO_SUSPEND,"aio_suspend" },
{ SMB_VFS_OP_AIO_FORCE, "aio_force" },
{ SMB_VFS_OP_IS_OFFLINE, "is_offline" },
{ SMB_VFS_OP_SET_OFFLINE, "set_offline" },
@@ -2212,83 +2198,6 @@ static int smb_full_audit_fsetxattr(struct vfs_handle_struct *handle,
return result;
}
-static int smb_full_audit_aio_read(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
-{
- int result;
-
- result = SMB_VFS_NEXT_AIO_READ(handle, fsp, aiocb);
- do_log(SMB_VFS_OP_AIO_READ, (result >= 0), handle,
- "%s", fsp_str_do_log(fsp));
-
- return result;
-}
-
-static int smb_full_audit_aio_write(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
-{
- int result;
-
- result = SMB_VFS_NEXT_AIO_WRITE(handle, fsp, aiocb);
- do_log(SMB_VFS_OP_AIO_WRITE, (result >= 0), handle,
- "%s", fsp_str_do_log(fsp));
-
- return result;
-}
-
-static ssize_t smb_full_audit_aio_return(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
-{
- int result;
-
- result = SMB_VFS_NEXT_AIO_RETURN(handle, fsp, aiocb);
- do_log(SMB_VFS_OP_AIO_RETURN, (result >= 0), handle,
- "%s", fsp_str_do_log(fsp));
-
- return result;
-}
-
-static int smb_full_audit_aio_cancel(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
-{
- int result;
-
- result = SMB_VFS_NEXT_AIO_CANCEL(handle, fsp, aiocb);
- do_log(SMB_VFS_OP_AIO_CANCEL, (result >= 0), handle,
- "%s", fsp_str_do_log(fsp));
-
- return result;
-}
-
-static int smb_full_audit_aio_error(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
-{
- int result;
-
- result = SMB_VFS_NEXT_AIO_ERROR(handle, fsp, aiocb);
- do_log(SMB_VFS_OP_AIO_ERROR, (result >= 0), handle,
- "%s", fsp_str_do_log(fsp));
-
- return result;
-}
-
-static int smb_full_audit_aio_fsync(struct vfs_handle_struct *handle, struct files_struct *fsp, int op, SMB_STRUCT_AIOCB *aiocb)
-{
- int result;
-
- result = SMB_VFS_NEXT_AIO_FSYNC(handle, fsp, op, aiocb);
- do_log(SMB_VFS_OP_AIO_FSYNC, (result >= 0), handle,
- "%s", fsp_str_do_log(fsp));
-
- return result;
-}
-
-static int smb_full_audit_aio_suspend(struct vfs_handle_struct *handle, struct files_struct *fsp, const SMB_STRUCT_AIOCB * const aiocb[], int n, const struct timespec *ts)
-{
- int result;
-
- result = SMB_VFS_NEXT_AIO_SUSPEND(handle, fsp, aiocb, n, ts);
- do_log(SMB_VFS_OP_AIO_SUSPEND, (result >= 0), handle,
- "%s", fsp_str_do_log(fsp));
-
- return result;
-}
-
static bool smb_full_audit_aio_force(struct vfs_handle_struct *handle,
struct files_struct *fsp)
{
@@ -2433,13 +2342,6 @@ static struct vfs_fn_pointers vfs_full_audit_fns = {
.fremovexattr_fn = smb_full_audit_fremovexattr,
.setxattr_fn = smb_full_audit_setxattr,
.fsetxattr_fn = smb_full_audit_fsetxattr,
- .aio_read_fn = smb_full_audit_aio_read,
- .aio_write_fn = smb_full_audit_aio_write,
- .aio_return_fn = smb_full_audit_aio_return,
- .aio_cancel_fn = smb_full_audit_aio_cancel,
- .aio_error_fn = smb_full_audit_aio_error,
- .aio_fsync_fn = smb_full_audit_aio_fsync,
- .aio_suspend_fn = smb_full_audit_aio_suspend,
.aio_force_fn = smb_full_audit_aio_force,
.is_offline_fn = smb_full_audit_is_offline,
.set_offline_fn = smb_full_audit_set_offline,
diff --git a/source3/modules/vfs_time_audit.c b/source3/modules/vfs_time_audit.c
index a9b806a69a..16eb624ebb 100644
--- a/source3/modules/vfs_time_audit.c
+++ b/source3/modules/vfs_time_audit.c
@@ -2225,147 +2225,6 @@ static int smb_time_audit_fsetxattr(struct vfs_handle_struct *handle,
return result;
}
-static int smb_time_audit_aio_read(struct vfs_handle_struct *handle,
- struct files_struct *fsp,
- SMB_STRUCT_AIOCB *aiocb)
-{
- int result;
- struct timespec ts1,ts2;
- double timediff;
-
- clock_gettime_mono(&ts1);
- result = SMB_VFS_NEXT_AIO_READ(handle, fsp, aiocb);
- clock_gettime_mono(&ts2);
- timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
- if (timediff > audit_timeout) {
- smb_time_audit_log("aio_read", timediff);
- }
-
- return result;
-}
-
-static int smb_time_audit_aio_write(struct vfs_handle_struct *handle,
- struct files_struct *fsp,
- SMB_STRUCT_AIOCB *aiocb)
-{
- int result;
- struct timespec ts1,ts2;
- double timediff;
-
- clock_gettime_mono(&ts1);
- result = SMB_VFS_NEXT_AIO_WRITE(handle, fsp, aiocb);
- clock_gettime_mono(&ts2);
- timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
- if (timediff > audit_timeout) {
- smb_time_audit_log("aio_write", timediff);
- }
-
- return result;
-}
-
-static ssize_t smb_time_audit_aio_return(struct vfs_handle_struct *handle,
- struct files_struct *fsp,
- SMB_STRUCT_AIOCB *aiocb)
-{
- ssize_t result;
- struct timespec ts1,ts2;
- double timediff;
-
- clock_gettime_mono(&ts1);
- result = SMB_VFS_NEXT_AIO_RETURN(handle, fsp, aiocb);
- clock_gettime_mono(&ts2);
- timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
- if (timediff > audit_timeout) {
- smb_time_audit_log("aio_return", timediff);
- }
-
- return result;
-}
-
-static int smb_time_audit_aio_cancel(struct vfs_handle_struct *handle,
- struct files_struct *fsp,
- SMB_STRUCT_AIOCB *aiocb)
-{
- int result;
- struct timespec ts1,ts2;
- double timediff;
-
- clock_gettime_mono(&ts1);
- result = SMB_VFS_NEXT_AIO_CANCEL(handle, fsp, aiocb);
- clock_gettime_mono(&ts2);
- timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
- if (timediff > audit_timeout) {
- smb_time_audit_log("aio_cancel", timediff);
- }
-
- return result;
-}
-
-static int smb_time_audit_aio_error(struct vfs_handle_struct *handle,
- struct files_struct *fsp,
- SMB_STRUCT_AIOCB *aiocb)
-{
- int result;
- struct timespec ts1,ts2;
- double timediff;
-
- clock_gettime_mono(&ts1);
- result = SMB_VFS_NEXT_AIO_ERROR(handle, fsp, aiocb);
- clock_gettime_mono(&ts2);
- timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
- if (timediff > audit_timeout) {
- smb_time_audit_log("aio_error", timediff);
- }
-
- return result;
-}
-
-static int smb_time_audit_aio_fsync(struct vfs_handle_struct *handle,
- struct files_struct *fsp, int op,
- SMB_STRUCT_AIOCB *aiocb)
-{
- int result;
- struct timespec ts1,ts2;
- double timediff;
-
- clock_gettime_mono(&ts1);
- result = SMB_VFS_NEXT_AIO_FSYNC(handle, fsp, op, aiocb);
- clock_gettime_mono(&ts2);
- timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
- if (timediff > audit_timeout) {
- smb_time_audit_log("aio_fsync", timediff);
- }
-
- return result;
-}
-
-static int smb_time_audit_aio_suspend(struct vfs_handle_struct *handle,
- struct files_struct *fsp,
- const SMB_STRUCT_AIOCB * const aiocb[],
- int n, const struct timespec *ts)
-{
- int result;
- struct timespec ts1,ts2;
- double timediff;
-
- clock_gettime_mono(&ts1);
- result = SMB_VFS_NEXT_AIO_SUSPEND(handle, fsp, aiocb, n, ts);
- clock_gettime_mono(&ts2);
- timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
- if (timediff > audit_timeout) {
- smb_time_audit_log("aio_suspend", timediff);
- }
-
- return result;
-}
-
static bool smb_time_audit_aio_force(struct vfs_handle_struct *handle,
struct files_struct *fsp)
{
@@ -2495,13 +2354,6 @@ static struct vfs_fn_pointers vfs_time_audit_fns = {
.fremovexattr_fn = smb_time_audit_fremovexattr,
.setxattr_fn = smb_time_audit_setxattr,
.fsetxattr_fn = smb_time_audit_fsetxattr,
- .aio_read_fn = smb_time_audit_aio_read,
- .aio_write_fn = smb_time_audit_aio_write,
- .aio_return_fn = smb_time_audit_aio_return,
- .aio_cancel_fn = smb_time_audit_aio_cancel,
- .aio_error_fn = smb_time_audit_aio_error,
- .aio_fsync_fn = smb_time_audit_aio_fsync,
- .aio_suspend_fn = smb_time_audit_aio_suspend,
.aio_force_fn = smb_time_audit_aio_force,
};