pub struct ParsedPolicy<PS: ParseStrategy> { /* private fields */ }
Expand description
A parsed binary policy.
Implementations§
Source§impl<PS: ParseStrategy> ParsedPolicy<PS>
impl<PS: ParseStrategy> ParsedPolicy<PS>
Sourcepub fn policy_version(&self) -> u32
pub fn policy_version(&self) -> u32
The policy version stored in the underlying binary policy.
Sourcepub fn handle_unknown(&self) -> HandleUnknown
pub fn handle_unknown(&self) -> HandleUnknown
The way “unknown” policy decisions should be handed according to the underlying binary policy.
Sourcepub fn is_explicitly_allowed_custom(
&self,
source_type: TypeId,
target_type: TypeId,
target_class_name: &str,
permission_name: &str,
) -> Result<bool, QueryError>
pub fn is_explicitly_allowed_custom( &self, source_type: TypeId, target_type: TypeId, target_class_name: &str, permission_name: &str, ) -> Result<bool, QueryError>
Returns whether the input types are explicitly granted the permission named
permission_name
via an allow [...];
policy statement, or an error if looking up the
input types fails. This is the “custom” form of this API because permission_name
is
associated with a crate::AbstractPermission::Custom::permission
value.
Sourcepub fn compute_explicitly_allowed_custom(
&self,
source_type_name: TypeId,
target_type_name: TypeId,
target_class_name: &str,
) -> AccessDecision
pub fn compute_explicitly_allowed_custom( &self, source_type_name: TypeId, target_type_name: TypeId, target_class_name: &str, ) -> AccessDecision
Computes the access vector that associates type source_type_name
and target_type_name
via an explicit allow [...];
statement in the binary policy. Computes AccessVector::NONE
if no such statement exists. This is the “custom” form of this API because
target_class_name
is associated with a crate::AbstractObjectClass::Custom
value.
Trait Implementations§
Source§impl<PS: Debug + ParseStrategy> Debug for ParsedPolicy<PS>
impl<PS: Debug + ParseStrategy> Debug for ParsedPolicy<PS>
Source§impl<PS: ParseStrategy> Parse<PS> for ParsedPolicy<PS>where
Signature<PS>: Parse<PS>,
ExtensibleBitmap<PS>: Parse<PS>,
SymbolList<PS, CommonSymbol<PS>>: Parse<PS>,
SymbolList<PS, Class<PS>>: Parse<PS>,
SymbolList<PS, Role<PS>>: Parse<PS>,
SymbolList<PS, Type<PS>>: Parse<PS>,
SymbolList<PS, User<PS>>: Parse<PS>,
SymbolList<PS, ConditionalBoolean<PS>>: Parse<PS>,
SymbolList<PS, Sensitivity<PS>>: Parse<PS>,
SymbolList<PS, Category<PS>>: Parse<PS>,
Array<PS, PS::Output<U32>, Vec<AccessVector<PS>>>: Parse<PS>,
Array<PS, PS::Output<U32>, Vec<ConditionalNode<PS>>>: Parse<PS>,
RoleTransitions<PS>: Parse<PS>,
RoleAllows<PS>: Parse<PS>,
Array<PS, PS::Output<U32>, Vec<FilenameTransition<PS>>>: Parse<PS>,
Array<PS, PS::Output<U32>, Vec<DeprecatedFilenameTransition<PS>>>: Parse<PS>,
Array<PS, PS::Output<U32>, Vec<InitialSid<PS>>>: Parse<PS>,
Array<PS, PS::Output<U32>, Vec<NamedContextPair<PS>>>: Parse<PS>,
Array<PS, PS::Output<U32>, Vec<Port<PS>>>: Parse<PS>,
Array<PS, PS::Output<U32>, Vec<Node<PS>>>: Parse<PS>,
Array<PS, PS::Output<U32>, Vec<FsUse<PS>>>: Parse<PS>,
Array<PS, PS::Output<U32>, Vec<IPv6Node<PS>>>: Parse<PS>,
Array<PS, PS::Output<U32>, Vec<InfinitiBandPartitionKey<PS>>>: Parse<PS>,
Array<PS, PS::Output<U32>, Vec<InfinitiBandEndPort<PS>>>: Parse<PS>,
Array<PS, PS::Output<U32>, Vec<GenericFsContext<PS>>>: Parse<PS>,
Array<PS, PS::Output<U32>, Vec<RangeTransition<PS>>>: Parse<PS>,
impl<PS: ParseStrategy> Parse<PS> for ParsedPolicy<PS>where
Signature<PS>: Parse<PS>,
ExtensibleBitmap<PS>: Parse<PS>,
SymbolList<PS, CommonSymbol<PS>>: Parse<PS>,
SymbolList<PS, Class<PS>>: Parse<PS>,
SymbolList<PS, Role<PS>>: Parse<PS>,
SymbolList<PS, Type<PS>>: Parse<PS>,
SymbolList<PS, User<PS>>: Parse<PS>,
SymbolList<PS, ConditionalBoolean<PS>>: Parse<PS>,
SymbolList<PS, Sensitivity<PS>>: Parse<PS>,
SymbolList<PS, Category<PS>>: Parse<PS>,
Array<PS, PS::Output<U32>, Vec<AccessVector<PS>>>: Parse<PS>,
Array<PS, PS::Output<U32>, Vec<ConditionalNode<PS>>>: Parse<PS>,
RoleTransitions<PS>: Parse<PS>,
RoleAllows<PS>: Parse<PS>,
Array<PS, PS::Output<U32>, Vec<FilenameTransition<PS>>>: Parse<PS>,
Array<PS, PS::Output<U32>, Vec<DeprecatedFilenameTransition<PS>>>: Parse<PS>,
Array<PS, PS::Output<U32>, Vec<InitialSid<PS>>>: Parse<PS>,
Array<PS, PS::Output<U32>, Vec<NamedContextPair<PS>>>: Parse<PS>,
Array<PS, PS::Output<U32>, Vec<Port<PS>>>: Parse<PS>,
Array<PS, PS::Output<U32>, Vec<Node<PS>>>: Parse<PS>,
Array<PS, PS::Output<U32>, Vec<FsUse<PS>>>: Parse<PS>,
Array<PS, PS::Output<U32>, Vec<IPv6Node<PS>>>: Parse<PS>,
Array<PS, PS::Output<U32>, Vec<InfinitiBandPartitionKey<PS>>>: Parse<PS>,
Array<PS, PS::Output<U32>, Vec<InfinitiBandEndPort<PS>>>: Parse<PS>,
Array<PS, PS::Output<U32>, Vec<GenericFsContext<PS>>>: Parse<PS>,
Array<PS, PS::Output<U32>, Vec<RangeTransition<PS>>>: Parse<PS>,
Parse a data structure from a prefix of a ParseStrategy
.