sftp: a sealed file opens while the vault is open

Decrypted a record at a time as it is read, from any offset, and sealed
again when it is written into or over, in a sealed folder or not. Shut,
the vault refuses the open and cuts off reads already under way. Reads
over the mount do not count as use, so a mount alone does not keep the
vault open.
This commit is contained in:
nvrl committed 2026-10-20 10:34:29 +02:00
1 parent fc593e6452
commit e4e3e2b5aa
3 files changed
+345 -34

No files matched your search

+8
View File
@@ -446,6 +446,14 @@ impl Vault {
}
}
/// Whether the vault is open, without counting as a use that keeps it so:
/// for a check that should not hold it open by being asked often.
pub fn is_open(&self) -> bool {
self.slot()
.as_ref()
.is_some_and(|open| open.touched.elapsed() < self.idle)
}
pub fn lock(&self) {
*self.slot() = None;
}