pub enum SyntheticEtcFile {
Passwd,
Group,
}Expand description
An /etc file a composed root gets in synthesised form instead of the host’s.
Both are account databases, and both are world-readable on every distribution — so binding the
host’s copy hands the capsule the machine’s full account list for no benefit. What a capsule
actually needs from them is that getpwuid(3)/getgrgid(3) resolve its own id: a shell’s ~
expansion, os.path.expanduser, whoami, and anything reading $HOME through the password
database. Two entries — root and the id the capsule runs as — satisfy all of that.
Variants§
Passwd
/etc/passwd, in the seven colon-separated fields of passwd(5).
Group
/etc/group, in the four colon-separated fields of group(5).
Trait Implementations§
Source§impl Clone for SyntheticEtcFile
impl Clone for SyntheticEtcFile
impl Copy for SyntheticEtcFile
Source§impl Debug for SyntheticEtcFile
impl Debug for SyntheticEtcFile
impl Eq for SyntheticEtcFile
Source§impl PartialEq for SyntheticEtcFile
impl PartialEq for SyntheticEtcFile
impl StructuralPartialEq for SyntheticEtcFile
Auto Trait Implementations§
impl Freeze for SyntheticEtcFile
impl RefUnwindSafe for SyntheticEtcFile
impl Send for SyntheticEtcFile
impl Sync for SyntheticEtcFile
impl Unpin for SyntheticEtcFile
impl UnsafeUnpin for SyntheticEtcFile
impl UnwindSafe for SyntheticEtcFile
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more