pub struct JailRecord {
pub root: PathBuf,
pub uid: u32,
pub gid: u32,
}Expand description
The jail a running VMM is in, as the process that put it there knew it.
Recorded rather than derived, because neither half survives the spawn:
a jailer unshares its mount namespace and pivots into the chroot, so
/proc/<pid>/root reads back as / from outside and the confinement
cannot be observed at all; and re-deriving the root instead — from an
IsolationSpec’s chroot_base and the adopting process’s own config
— names a different directory the moment that config differs from the
one the VM was booted with.
What follows from getting it wrong is not a wrong path but a wrong VM: an adopter that concludes “unconfined” rebuilds the VM as one, and every operation that needs the jail — reaching the guest, checkpointing it — is then refused or aimed outside it (CORE-155).
Fields§
§root: PathBufThe chroot the VMM is confined to, as the host names it.
uid: u32The uid the VMM runs as.
gid: u32The gid the VMM runs as.
Trait Implementations§
Source§impl Clone for JailRecord
impl Clone for JailRecord
Source§impl Debug for JailRecord
impl Debug for JailRecord
Source§impl<'de> Deserialize<'de> for JailRecord
impl<'de> Deserialize<'de> for JailRecord
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for JailRecord
Source§impl PartialEq for JailRecord
impl PartialEq for JailRecord
Source§impl Serialize for JailRecord
impl Serialize for JailRecord
impl StructuralPartialEq for JailRecord
Auto Trait Implementations§
impl Freeze for JailRecord
impl RefUnwindSafe for JailRecord
impl Send for JailRecord
impl Sync for JailRecord
impl Unpin for JailRecord
impl UnsafeUnpin for JailRecord
impl UnwindSafe for JailRecord
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.