pub struct CapsPolicy {
pub bounding: CapSetPolicy,
pub ambient: CapSetPolicy,
pub effective: CapSetPolicy,
pub inheritable: CapSetPolicy,
}Expand description
Parsed capability policy from a TOML file.
Fields§
§bounding: CapSetPolicyBounding set configuration. Empty keep = drop all from bounding.
ambient: CapSetPolicyAmbient set configuration.
effective: CapSetPolicyEffective set configuration.
inheritable: CapSetPolicyInheritable set configuration.
Implementations§
Source§impl CapsPolicy
impl CapsPolicy
Sourcepub fn validate_production(&self) -> Result<()>
pub fn validate_production(&self) -> Result<()>
Validate that the policy does not retain dangerous capabilities in production mode.
Sourcepub fn apply(&self, mgr: &mut CapabilityManager) -> Result<()>
pub fn apply(&self, mgr: &mut CapabilityManager) -> Result<()>
Apply this policy using the given CapabilityManager.
If all sets are empty, delegates to drop_all().
Otherwise, applies each set explicitly.
Trait Implementations§
Source§impl Clone for CapsPolicy
impl Clone for CapsPolicy
Source§fn clone(&self) -> CapsPolicy
fn clone(&self) -> CapsPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CapsPolicy
impl Debug for CapsPolicy
Source§impl<'de> Deserialize<'de> for CapsPolicy
impl<'de> Deserialize<'de> for CapsPolicy
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CapsPolicy
impl RefUnwindSafe for CapsPolicy
impl Send for CapsPolicy
impl Sync for CapsPolicy
impl Unpin for CapsPolicy
impl UnsafeUnpin for CapsPolicy
impl UnwindSafe for CapsPolicy
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