/* Directory operations */
SMB_VFS_OP_OPENDIR,
+ SMB_VFS_OP_FDOPENDIR,
SMB_VFS_OP_READDIR,
SMB_VFS_OP_SEEKDIR,
SMB_VFS_OP_TELLDIR,
{ SMB_VFS_OP_STATVFS, "statvfs" },
{ SMB_VFS_OP_FS_CAPABILITIES, "fs_capabilities" },
{ SMB_VFS_OP_OPENDIR, "opendir" },
+ { SMB_VFS_OP_FDOPENDIR, "fdopendir" },
{ SMB_VFS_OP_READDIR, "readdir" },
{ SMB_VFS_OP_SEEKDIR, "seekdir" },
{ SMB_VFS_OP_TELLDIR, "telldir" },
{ 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_IS_OFFLINE, "is_offline" },
+ { SMB_VFS_OP_SET_OFFLINE, "set_offline" },
{ SMB_VFS_OP_LAST, NULL }
};
}
result = talloc_sub_advanced(ctx,
lp_servicename(SNUM(conn)),
- conn->server_info->unix_name,
+ conn->session_info->unix_name,
conn->connectpath,
- conn->server_info->utok.gid,
- conn->server_info->sanitized_username,
- conn->server_info->info3->base.domain.string,
+ conn->session_info->utok.gid,
+ conn->session_info->sanitized_username,
+ conn->session_info->info3->base.domain.string,
prefix);
TALLOC_FREE(prefix);
return result;
return result;
}
+static SMB_STRUCT_DIR *smb_full_audit_fdopendir(vfs_handle_struct *handle,
+ files_struct *fsp, const char *mask, uint32 attr)
+{
+ SMB_STRUCT_DIR *result;
+
+ result = SMB_VFS_NEXT_FDOPENDIR(handle, fsp, mask, attr);
+
+ do_log(SMB_VFS_OP_FDOPENDIR, (result != NULL), handle, "%s",
+ fsp_str_do_log(fsp));
+
+ return result;
+}
+
static SMB_STRUCT_DIRENT *smb_full_audit_readdir(vfs_handle_struct *handle,
SMB_STRUCT_DIR *dirp, SMB_STRUCT_STAT *sbuf)
{
return result;
}
+static bool smb_full_audit_is_offline(struct vfs_handle_struct *handle,
+ const struct smb_filename *fname,
+ SMB_STRUCT_STAT *sbuf)
+{
+ bool result;
+
+ result = SMB_VFS_NEXT_IS_OFFLINE(handle, fname, sbuf);
+ do_log(SMB_VFS_OP_IS_OFFLINE, result, handle, "%s",
+ smb_fname_str_do_log(fname));
+ return result;
+}
+
+static int smb_full_audit_set_offline(struct vfs_handle_struct *handle,
+ const struct smb_filename *fname)
+{
+ int result;
+
+ result = SMB_VFS_NEXT_SET_OFFLINE(handle, fname);
+ do_log(SMB_VFS_OP_SET_OFFLINE, result >= 0, handle, "%s",
+ smb_fname_str_do_log(fname));
+ return result;
+}
+
static struct vfs_fn_pointers vfs_full_audit_fns = {
/* Disk operations */
.statvfs = smb_full_audit_statvfs,
.fs_capabilities = smb_full_audit_fs_capabilities,
.opendir = smb_full_audit_opendir,
+ .fdopendir = smb_full_audit_fdopendir,
.readdir = smb_full_audit_readdir,
.seekdir = smb_full_audit_seekdir,
.telldir = smb_full_audit_telldir,
.aio_fsync = smb_full_audit_aio_fsync,
.aio_suspend = smb_full_audit_aio_suspend,
.aio_force = smb_full_audit_aio_force,
+ .is_offline = smb_full_audit_is_offline,
+ .set_offline = smb_full_audit_set_offline,
};
NTSTATUS vfs_full_audit_init(void)