}
static DIR *smb_full_audit_opendir(vfs_handle_struct *handle,
- const char *fname, const char *mask, uint32_t attr)
+ const struct smb_filename *smb_fname,
+ const char *mask,
+ uint32_t attr)
{
DIR *result;
- result = SMB_VFS_NEXT_OPENDIR(handle, fname, mask, attr);
+ result = SMB_VFS_NEXT_OPENDIR(handle, smb_fname, mask, attr);
- do_log(SMB_VFS_OP_OPENDIR, (result != NULL), handle, "%s", fname);
+ do_log(SMB_VFS_OP_OPENDIR, (result != NULL), handle, "%s",
+ smb_fname->base_name);
return result;
}
vfs_handle_struct *handle;
files_struct *fsp;
ssize_t ret;
- int err;
+ struct vfs_aio_state vfs_aio_state;
};
static void smb_full_audit_pread_done(struct tevent_req *subreq);
struct smb_full_audit_pread_state *state = tevent_req_data(
req, struct smb_full_audit_pread_state);
- state->ret = SMB_VFS_PREAD_RECV(subreq, &state->err);
+ state->ret = SMB_VFS_PREAD_RECV(subreq, &state->vfs_aio_state);
TALLOC_FREE(subreq);
tevent_req_done(req);
}
-static ssize_t smb_full_audit_pread_recv(struct tevent_req *req, int *err)
+static ssize_t smb_full_audit_pread_recv(struct tevent_req *req,
+ struct vfs_aio_state *vfs_aio_state)
{
struct smb_full_audit_pread_state *state = tevent_req_data(
req, struct smb_full_audit_pread_state);
- if (tevent_req_is_unix_error(req, err)) {
+ if (tevent_req_is_unix_error(req, &vfs_aio_state->error)) {
do_log(SMB_VFS_OP_PREAD_RECV, false, state->handle, "%s",
fsp_str_do_log(state->fsp));
return -1;
do_log(SMB_VFS_OP_PREAD_RECV, (state->ret >= 0), state->handle, "%s",
fsp_str_do_log(state->fsp));
- *err = state->err;
+ *vfs_aio_state = state->vfs_aio_state;
return state->ret;
}
vfs_handle_struct *handle;
files_struct *fsp;
ssize_t ret;
- int err;
+ struct vfs_aio_state vfs_aio_state;
};
static void smb_full_audit_pwrite_done(struct tevent_req *subreq);
struct smb_full_audit_pwrite_state *state = tevent_req_data(
req, struct smb_full_audit_pwrite_state);
- state->ret = SMB_VFS_PWRITE_RECV(subreq, &state->err);
+ state->ret = SMB_VFS_PWRITE_RECV(subreq, &state->vfs_aio_state);
TALLOC_FREE(subreq);
tevent_req_done(req);
}
-static ssize_t smb_full_audit_pwrite_recv(struct tevent_req *req, int *err)
+static ssize_t smb_full_audit_pwrite_recv(struct tevent_req *req,
+ struct vfs_aio_state *vfs_aio_state)
{
struct smb_full_audit_pwrite_state *state = tevent_req_data(
req, struct smb_full_audit_pwrite_state);
- if (tevent_req_is_unix_error(req, err)) {
+ if (tevent_req_is_unix_error(req, &vfs_aio_state->error)) {
do_log(SMB_VFS_OP_PWRITE_RECV, false, state->handle, "%s",
fsp_str_do_log(state->fsp));
return -1;
do_log(SMB_VFS_OP_PWRITE_RECV, (state->ret >= 0), state->handle, "%s",
fsp_str_do_log(state->fsp));
- *err = state->err;
+ *vfs_aio_state = state->vfs_aio_state;
return state->ret;
}
vfs_handle_struct *handle;
files_struct *fsp;
int ret;
- int err;
+ struct vfs_aio_state vfs_aio_state;
};
static void smb_full_audit_fsync_done(struct tevent_req *subreq);
struct smb_full_audit_fsync_state *state = tevent_req_data(
req, struct smb_full_audit_fsync_state);
- state->ret = SMB_VFS_FSYNC_RECV(subreq, &state->err);
+ state->ret = SMB_VFS_FSYNC_RECV(subreq, &state->vfs_aio_state);
TALLOC_FREE(subreq);
tevent_req_done(req);
}
-static int smb_full_audit_fsync_recv(struct tevent_req *req, int *err)
+static int smb_full_audit_fsync_recv(struct tevent_req *req,
+ struct vfs_aio_state *vfs_aio_state)
{
struct smb_full_audit_fsync_state *state = tevent_req_data(
req, struct smb_full_audit_fsync_state);
- if (tevent_req_is_unix_error(req, err)) {
+ if (tevent_req_is_unix_error(req, &vfs_aio_state->error)) {
do_log(SMB_VFS_OP_FSYNC_RECV, false, state->handle, "%s",
fsp_str_do_log(state->fsp));
return -1;
do_log(SMB_VFS_OP_FSYNC_RECV, (state->ret >= 0), state->handle, "%s",
fsp_str_do_log(state->fsp));
- *err = state->err;
+ *vfs_aio_state = state->vfs_aio_state;
return state->ret;
}
}
static int smb_full_audit_chmod(vfs_handle_struct *handle,
- const char *path, mode_t mode)
+ const struct smb_filename *smb_fname,
+ mode_t mode)
{
int result;
- result = SMB_VFS_NEXT_CHMOD(handle, path, mode);
+ result = SMB_VFS_NEXT_CHMOD(handle, smb_fname, mode);
- do_log(SMB_VFS_OP_CHMOD, (result >= 0), handle, "%s|%o", path, mode);
+ do_log(SMB_VFS_OP_CHMOD, (result >= 0), handle, "%s|%o",
+ smb_fname->base_name,
+ mode);
return result;
}
}
static int smb_full_audit_chown(vfs_handle_struct *handle,
- const char *path, uid_t uid, gid_t gid)
+ const struct smb_filename *smb_fname,
+ uid_t uid,
+ gid_t gid)
{
int result;
- result = SMB_VFS_NEXT_CHOWN(handle, path, uid, gid);
+ result = SMB_VFS_NEXT_CHOWN(handle, smb_fname, uid, gid);
do_log(SMB_VFS_OP_CHOWN, (result >= 0), handle, "%s|%ld|%ld",
- path, (long int)uid, (long int)gid);
+ smb_fname->base_name, (long int)uid, (long int)gid);
return result;
}
}
static int smb_full_audit_chmod_acl(vfs_handle_struct *handle,
- const char *path, mode_t mode)
+ const struct smb_filename *smb_fname,
+ mode_t mode)
{
int result;
- result = SMB_VFS_NEXT_CHMOD_ACL(handle, path, mode);
+ result = SMB_VFS_NEXT_CHMOD_ACL(handle, smb_fname, mode);
do_log(SMB_VFS_OP_CHMOD_ACL, (result >= 0), handle,
- "%s|%o", path, mode);
+ "%s|%o", smb_fname->base_name, mode);
return result;
}