Skip to main content

runtime_dir

Function runtime_dir 

Source
pub fn runtime_dir() -> Result<PathBuf>
Expand description

The runtime directory, created and owner-verified.

$ONLYNE_RUNTIME_DIR when set and non-empty, /tmp/onlyne-<uid>/ otherwise. Adoption follows [ensure_private_dir]: a directory this user owns that is closed to group and other access, which this process can still write. /tmp is shared and world-executable, so another user can create /tmp/onlyne-<uid> first; an endpoint inside a directory that user owns is one that user could swap from under a live daemon, which is the refusal [ensure_private_dir] makes.