pub struct ProcessState {
pub uids: [u32; 3],
pub gids: [u32; 3],
pub groups: Vec<u32>,
pub threads: u32,
pub cap_inheritable: u64,
pub cap_permitted: u64,
pub cap_effective: u64,
pub cap_bounding: u64,
pub cap_ambient: u64,
pub no_new_privs: bool,
pub secure_bits: u32,
}Expand description
The calling process’s credential state.
Credentials come from system calls rather than /proc/self/status, so a
file mounted over procfs cannot misreport them.
Fields§
§uids: [u32; 3]Real, effective and saved UIDs.
gids: [u32; 3]Real, effective and saved GIDs.
groups: Vec<u32>Supplementary groups.
threads: u32Number of threads.
cap_inheritable: u64CapInh.
cap_permitted: u64CapPrm.
cap_effective: u64CapEff.
cap_bounding: u64CapBnd.
cap_ambient: u64CapAmb.
no_new_privs: boolNoNewPrivs.
secure_bits: u32Securebits.
Implementations§
Source§impl ProcessState
impl ProcessState
Sourcepub fn read_self(proc: BorrowedFd<'_>) -> Result<Self>
pub fn read_self(proc: BorrowedFd<'_>) -> Result<Self>
Reads the calling process’s state. proc must be a verified procfs
descriptor (see crate::probe::verify_procfs); it is used only for
the thread count, which no system call reports.
Sourcepub fn credentials(&self) -> Credentials
pub fn credentials(&self) -> Credentials
Current credentials in the form the planner uses.
Trait Implementations§
Source§impl Clone for ProcessState
impl Clone for ProcessState
Source§impl Debug for ProcessState
impl Debug for ProcessState
Source§impl Default for ProcessState
impl Default for ProcessState
impl Eq for ProcessState
Source§impl PartialEq for ProcessState
impl PartialEq for ProcessState
impl StructuralPartialEq for ProcessState
Auto Trait Implementations§
impl Forget for ProcessState
impl Freeze for ProcessState
impl RefUnwindSafe for ProcessState
impl Send for ProcessState
impl Sync for ProcessState
impl Unpin for ProcessState
impl UnsafeUnpin for ProcessState
impl UnwindSafe for ProcessState
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