endpoint_sec/event/event_setreuid.rs
1//! [`EventSetreuid`]
2
3use endpoint_sec_sys::{es_event_setreuid_t, uid_t};
4
5/// A process has called `setreuid()`.
6#[doc(alias = "es_event_setreuid_t")]
7pub struct EventSetreuid<'a> {
8 /// Raw event
9 pub(crate) raw: &'a es_event_setreuid_t,
10}
11
12impl EventSetreuid<'_> {
13 /// `euid` argument to the `setreuid()` call.
14 #[inline(always)]
15 pub fn euid(&self) -> uid_t {
16 self.raw.euid
17 }
18
19 /// `ruid` argument to the `setreuid()` call.
20 #[inline(always)]
21 pub fn ruid(&self) -> uid_t {
22 self.raw.ruid
23 }
24}
25
26// Safety: safe to send across threads: does not contain any interior mutability nor depend on current thread state
27unsafe impl Send for EventSetreuid<'_> {}
28// Safety: safe to share across threads: does not contain any interior mutability nor depend on current thread state
29unsafe impl Sync for EventSetreuid<'_> {}
30
31impl_debug_eq_hash_with_functions!(EventSetreuid<'a>; euid, ruid);