SMB_STRUCT_DIR *dirp);
static int smb_full_audit_open(vfs_handle_struct *handle,
const char *fname, files_struct *fsp, int flags, mode_t mode);
-static int smb_full_audit_close(vfs_handle_struct *handle, files_struct *fsp, int fd);
+static int smb_full_audit_close(vfs_handle_struct *handle, files_struct *fsp);
static ssize_t smb_full_audit_read(vfs_handle_struct *handle, files_struct *fsp,
- int fd, void *data, size_t n);
+ void *data, size_t n);
static ssize_t smb_full_audit_pread(vfs_handle_struct *handle, files_struct *fsp,
void *data, size_t n, SMB_OFF_T offset);
static ssize_t smb_full_audit_write(vfs_handle_struct *handle, files_struct *fsp,
- int fd, const void *data, size_t n);
+ const void *data, size_t n);
static ssize_t smb_full_audit_pwrite(vfs_handle_struct *handle, files_struct *fsp,
const void *data, size_t n,
SMB_OFF_T offset);
static SMB_OFF_T smb_full_audit_lseek(vfs_handle_struct *handle, files_struct *fsp,
SMB_OFF_T offset, int whence);
static ssize_t smb_full_audit_sendfile(vfs_handle_struct *handle, int tofd,
- files_struct *fsp, int fromfd,
+ files_struct *fromfsp,
const DATA_BLOB *hdr, SMB_OFF_T offset,
size_t n);
static ssize_t smb_full_audit_recvfile(vfs_handle_struct *handle, int fromfd,
- files_struct *fsp, int tofd,
+ files_struct *tofsp,
SMB_OFF_T offset,
size_t n);
static int smb_full_audit_rename(vfs_handle_struct *handle,
static int smb_full_audit_chmod_acl(vfs_handle_struct *handle,
const char *path, mode_t mode);
static int smb_full_audit_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp,
- int fd, mode_t mode);
+ mode_t mode);
static int smb_full_audit_sys_acl_get_entry(vfs_handle_struct *handle,
SMB_ACL_T theacl, int entry_id,
SMB_ACL_ENTRY_T *entry_p);
const char *name, SMB_ACL_TYPE_T acltype,
SMB_ACL_T theacl);
static int smb_full_audit_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
- int fd, SMB_ACL_T theacl);
+ SMB_ACL_T theacl);
static int smb_full_audit_sys_acl_delete_def_file(vfs_handle_struct *handle,
const char *path);
static int smb_full_audit_sys_acl_get_perm(vfs_handle_struct *handle,
const char *path, const char *name,
void *value, size_t size);
static ssize_t smb_full_audit_fgetxattr(struct vfs_handle_struct *handle,
- struct files_struct *fsp, int fd,
+ struct files_struct *fsp,
const char *name, void *value, size_t size);
static ssize_t smb_full_audit_listxattr(struct vfs_handle_struct *handle,
const char *path, char *list, size_t size);
static ssize_t smb_full_audit_llistxattr(struct vfs_handle_struct *handle,
const char *path, char *list, size_t size);
static ssize_t smb_full_audit_flistxattr(struct vfs_handle_struct *handle,
- struct files_struct *fsp, int fd, char *list,
+ struct files_struct *fsp, char *list,
size_t size);
static int smb_full_audit_removexattr(struct vfs_handle_struct *handle,
const char *path,
const char *path,
const char *name);
static int smb_full_audit_fremovexattr(struct vfs_handle_struct *handle,
- struct files_struct *fsp, int fd,
+ struct files_struct *fsp,
const char *name);
static int smb_full_audit_setxattr(struct vfs_handle_struct *handle,
const char *path,
const char *name, const void *value, size_t size,
int flags);
static int smb_full_audit_fsetxattr(struct vfs_handle_struct *handle,
- struct files_struct *fsp, int fd, const char *name,
+ struct files_struct *fsp, const char *name,
const void *value, size_t size, int flags);
static int smb_full_audit_aio_read(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb);
static int smb_full_audit_aio_write(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb);
static ssize_t smb_full_audit_aio_return(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb);
-static int smb_full_audit_aio_cancel(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, SMB_STRUCT_AIOCB *aiocb);
+static int smb_full_audit_aio_cancel(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb);
static int smb_full_audit_aio_error(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb);
static int smb_full_audit_aio_fsync(struct vfs_handle_struct *handle, struct files_struct *fsp, int op, SMB_STRUCT_AIOCB *aiocb);
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);
{ SMB_VFS_OP_SET_QUOTA, "set_quota" },
{ SMB_VFS_OP_GET_SHADOW_COPY_DATA, "get_shadow_copy_data" },
{ SMB_VFS_OP_STATVFS, "statvfs" },
+ { SMB_VFS_OP_FS_CAPABILITIES, "fs_capabilities" },
{ SMB_VFS_OP_OPENDIR, "opendir" },
{ SMB_VFS_OP_READDIR, "readdir" },
{ SMB_VFS_OP_SEEKDIR, "seekdir" },
{ 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, "aio_is_offline" },
+ { SMB_VFS_OP_SET_OFFLINE, "aio_set_offline" },
{ SMB_VFS_OP_LAST, NULL }
};
int priority;
- priority = lp_parm_enum(SNUM(handle->conn), "full_audit", "priority", enum_log_priorities, LOG_NOTICE);
+ priority = lp_parm_enum(SNUM(handle->conn), "full_audit", "priority",
+ enum_log_priorities, LOG_NOTICE);
+ if (priority == -1) {
+ priority = LOG_WARNING;
+ }
return priority;
}
return result;
}
-static int smb_full_audit_close(vfs_handle_struct *handle, files_struct *fsp, int fd)
+static int smb_full_audit_close(vfs_handle_struct *handle, files_struct *fsp)
{
int result;
- result = SMB_VFS_NEXT_CLOSE(handle, fsp, fd);
+ result = SMB_VFS_NEXT_CLOSE(handle, fsp);
do_log(SMB_VFS_OP_CLOSE, (result >= 0), handle, "%s", fsp->fsp_name);
}
static ssize_t smb_full_audit_read(vfs_handle_struct *handle, files_struct *fsp,
- int fd, void *data, size_t n)
+ void *data, size_t n)
{
ssize_t result;
- result = SMB_VFS_NEXT_READ(handle, fsp, fd, data, n);
+ result = SMB_VFS_NEXT_READ(handle, fsp, data, n);
do_log(SMB_VFS_OP_READ, (result >= 0), handle, "%s", fsp->fsp_name);
}
static ssize_t smb_full_audit_write(vfs_handle_struct *handle, files_struct *fsp,
- int fd, const void *data, size_t n)
+ const void *data, size_t n)
{
ssize_t result;
- result = SMB_VFS_NEXT_WRITE(handle, fsp, fd, data, n);
+ result = SMB_VFS_NEXT_WRITE(handle, fsp, data, n);
do_log(SMB_VFS_OP_WRITE, (result >= 0), handle, "%s", fsp->fsp_name);
}
static ssize_t smb_full_audit_sendfile(vfs_handle_struct *handle, int tofd,
- files_struct *fsp, int fromfd,
+ files_struct *fromfsp,
const DATA_BLOB *hdr, SMB_OFF_T offset,
size_t n)
{
ssize_t result;
- result = SMB_VFS_NEXT_SENDFILE(handle, tofd, fsp, fromfd, hdr,
- offset, n);
+ result = SMB_VFS_NEXT_SENDFILE(handle, tofd, fromfsp, hdr, offset, n);
do_log(SMB_VFS_OP_SENDFILE, (result >= 0), handle,
- "%s", fsp->fsp_name);
+ "%s", fromfsp->fsp_name);
return result;
}
static ssize_t smb_full_audit_recvfile(vfs_handle_struct *handle, int fromfd,
- files_struct *fsp, int tofd,
+ files_struct *tofsp,
SMB_OFF_T offset,
size_t n)
{
ssize_t result;
- result = SMB_VFS_NEXT_RECVFILE(handle, fromfd, fsp, tofd,
- offset, n);
+ result = SMB_VFS_NEXT_RECVFILE(handle, fromfd, tofsp, offset, n);
do_log(SMB_VFS_OP_RECVFILE, (result >= 0), handle,
- "%s", fsp->fsp_name);
+ "%s", tofsp->fsp_name);
return result;
}
}
static int smb_full_audit_fchmod_acl(vfs_handle_struct *handle, files_struct *fsp,
- int fd, mode_t mode)
+ mode_t mode)
{
int result;
- result = SMB_VFS_NEXT_FCHMOD_ACL(handle, fsp, fd, mode);
+ result = SMB_VFS_NEXT_FCHMOD_ACL(handle, fsp, mode);
do_log(SMB_VFS_OP_FCHMOD_ACL, (result >= 0), handle,
"%s|%o", fsp->fsp_name, mode);
}
static int smb_full_audit_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp,
- int fd, SMB_ACL_T theacl)
+ SMB_ACL_T theacl)
{
int result;
- result = SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, fd, theacl);
+ result = SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, theacl);
do_log(SMB_VFS_OP_SYS_ACL_SET_FD, (result >= 0), handle,
"%s", fsp->fsp_name);
}
static ssize_t smb_full_audit_fgetxattr(struct vfs_handle_struct *handle,
- struct files_struct *fsp, int fd,
+ struct files_struct *fsp,
const char *name, void *value, size_t size)
{
ssize_t result;
- result = SMB_VFS_NEXT_FGETXATTR(handle, fsp, fd, name, value, size);
+ result = SMB_VFS_NEXT_FGETXATTR(handle, fsp, name, value, size);
do_log(SMB_VFS_OP_FGETXATTR, (result >= 0), handle,
"%s|%s", fsp->fsp_name, name);
}
static ssize_t smb_full_audit_flistxattr(struct vfs_handle_struct *handle,
- struct files_struct *fsp, int fd, char *list,
+ struct files_struct *fsp, char *list,
size_t size)
{
ssize_t result;
- result = SMB_VFS_NEXT_FLISTXATTR(handle, fsp, fd, list, size);
+ result = SMB_VFS_NEXT_FLISTXATTR(handle, fsp, list, size);
do_log(SMB_VFS_OP_FLISTXATTR, (result >= 0), handle,
"%s", fsp->fsp_name);
}
static int smb_full_audit_fremovexattr(struct vfs_handle_struct *handle,
- struct files_struct *fsp, int fd,
+ struct files_struct *fsp,
const char *name)
{
int result;
- result = SMB_VFS_NEXT_FREMOVEXATTR(handle, fsp, fd, name);
+ result = SMB_VFS_NEXT_FREMOVEXATTR(handle, fsp, name);
do_log(SMB_VFS_OP_FREMOVEXATTR, (result >= 0), handle,
"%s|%s", fsp->fsp_name, name);
}
static int smb_full_audit_fsetxattr(struct vfs_handle_struct *handle,
- struct files_struct *fsp, int fd, const char *name,
+ struct files_struct *fsp, const char *name,
const void *value, size_t size, int flags)
{
int result;
- result = SMB_VFS_NEXT_FSETXATTR(handle, fsp, fd, name, value, size,
- flags);
+ result = SMB_VFS_NEXT_FSETXATTR(handle, fsp, name, value, size, flags);
do_log(SMB_VFS_OP_FSETXATTR, (result >= 0), handle,
"%s|%s", fsp->fsp_name, name);
return result;
}
-static int smb_full_audit_aio_cancel(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, SMB_STRUCT_AIOCB *aiocb)
+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, fd, aiocb);
+ result = SMB_VFS_NEXT_AIO_CANCEL(handle, fsp, aiocb);
do_log(SMB_VFS_OP_AIO_CANCEL, (result >= 0), handle,
"%s", fsp->fsp_name);