#[repr(C)]pub struct OriginRecord {
pub version: u32,
pub pid: u32,
pub ts_boot_ns: u64,
pub comm: [u8; 16],
pub creator_uid: u32,
pub _pad: u32,
pub creator_path: [u8; 256],
pub landing_filename: [u8; 256],
}Expand description
Provenance record. Carried in the security.bpf.linprov.origin xattr
and in the INODE_MARKS storage map.
Filled in stages:
- BPF
file_openwritesversion,pid,ts_boot_ns,comm,creator_uid, andlanding_filename(the path where the file was first written, viabpf_d_path). - Userspace, on the corresponding ringbuf event, reads
/proc/$pid/exeand overwrites the xattr with the augmented record (creator_pathfilled).
creator_path may be all-zeros if the creator process exited
before userspace got to it. Allowlist rules keyed on
creator_process won’t match such records, but other dims still do.
Fields§
§version: u32§pid: u32§ts_boot_ns: u64§comm: [u8; 16]§creator_uid: u32§_pad: u32§creator_path: [u8; 256]§landing_filename: [u8; 256]Trait Implementations§
Source§impl Clone for OriginRecord
impl Clone for OriginRecord
Source§fn clone(&self) -> OriginRecord
fn clone(&self) -> OriginRecord
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 moreimpl Copy for OriginRecord
Auto Trait Implementations§
impl Freeze for OriginRecord
impl RefUnwindSafe for OriginRecord
impl Send for OriginRecord
impl Sync for OriginRecord
impl Unpin for OriginRecord
impl UnsafeUnpin for OriginRecord
impl UnwindSafe for OriginRecord
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