pub struct Recording {
pub program: PathBuf,
pub directory: PathBuf,
pub seccomp: bool,
/* private fields */
}Expand description
An external syscall recorder wrapping each command, with separate trace files.
Fields§
§program: PathBufThe recorder’s program: strace, or qk itself, whose helper loads the eBPF recorder.
directory: PathBuf§seccomp: boolWhether strace filters the traced calls in the kernel, with seccomp, so untraced calls run at full speed. strace 5.3 and later can.
Implementations§
Source§impl Recording
impl Recording
Sourcepub fn probe(directory: &Path) -> Result<Probed>
pub fn probe(directory: &Path) -> Result<Probed>
The recorder QK_RECORDER picks: by default eBPF, where its helper
can load it, else strace on PATH, checked to record child
processes, with seccomp filtering where it supports it. Its trial
traces go in directory. Err: QK_RECORDER misnamed, or the
recorder it names cannot record.
Sourcepub fn required(directory: &Path) -> Result<Self>
pub fn required(directory: &Path) -> Result<Self>
The recorder Self::probe picks, for what cannot go on without
one: the sandbox’s audit, input analysis.
Sourcepub fn in_directory(&self, directory: PathBuf) -> Self
pub fn in_directory(&self, directory: PathBuf) -> Self
The same settings, with traces in directory.
Sourcepub fn resolving(self) -> Self
pub fn resolving(self) -> Self
The same, recording an opened file’s path with what its links lead to, as a report of what a task read shows it. strace always does.
Sourcepub fn keying(self) -> Self
pub fn keying(self) -> Self
The same, keying the task’s result: see Self::keys.
Sourcepub fn keys(&self) -> bool
pub fn keys(&self) -> bool
Whether it may key the task’s result for qk:ultracache, as
--record gives it. A recording made only to audit the task does not.
Sourcepub fn settle(&self) -> Result<()>
pub fn settle(&self) -> Result<()>
Ends the recordings of the commands that have run, once they have finished, so that their traces are whole. strace’s are as soon as it exits; the eBPF recorder’s once its helper has sent every event.
Sourcepub fn accesses(
&self,
cwd: &Path,
limits: &Limits<'_>,
) -> Result<(Vec<Access>, Vec<String>)>
pub fn accesses( &self, cwd: &Path, limits: &Limits<'_>, ) -> Result<(Vec<Access>, Vec<String>)>
What the commands that have run did, settled, within limits, with
what kept it from being complete; their paths relative to cwd,
where they started.