#[repr(u32)]
pub enum PolicyCondition {
Show 15 variants BadHandle, WrongObject, VmarWx, NewAny, NewVMO, NewChannel, NewEvent, NewEventPair, NewPort, NewSocket, NewFIFO, NewTimer, NewProcess, NewProfile, AmbientMarkVMOExec,
}
Expand description

The condition when a policy is applied.

Variants

BadHandle

A process under this job is attempting to issue a syscall with an invalid handle. In this case, PolicyAction::Allow and PolicyAction::Deny are equivalent: if the syscall returns, it will always return the error ZX_ERR_BAD_HANDLE.

WrongObject

A process under this job is attempting to issue a syscall with a handle that does not support such operation.

VmarWx

A process under this job is attempting to map an address region with write-execute access.

NewAny

A special condition that stands for all of the above ZX_NEW conditions such as NEW_VMO, NEW_CHANNEL, NEW_EVENT, NEW_EVENTPAIR, NEW_PORT, NEW_SOCKET, NEW_FIFO, And any future ZX_NEW policy. This will include any new kernel objects which do not require a parent object for creation.

NewVMO

A process under this job is attempting to create a new vm object.

NewChannel

A process under this job is attempting to create a new channel.

NewEvent

A process under this job is attempting to create a new event.

NewEventPair

A process under this job is attempting to create a new event pair.

NewPort

A process under this job is attempting to create a new port.

NewSocket

A process under this job is attempting to create a new socket.

NewFIFO

A process under this job is attempting to create a new fifo.

NewTimer

A process under this job is attempting to create a new timer.

NewProcess

A process under this job is attempting to create a new process.

NewProfile

A process under this job is attempting to create a new profile.

AmbientMarkVMOExec

A process under this job is attempting to use zx_vmo_replace_as_executable() with a ZX_HANDLE_INVALID as the second argument rather than a valid ZX_RSRC_KIND_VMEX.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Casts the value.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Casts the value.

Casts the value.

Casts the value.

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s. Read more

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s. Read more

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Casts the value.

Casts the value.

Casts the value.

Casts the value.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Casts the value.

Casts the value.

Casts the value.

Casts the value.