pub struct AuditLogger { /* private fields */ }Expand description
Audit logging structure.
Implementations§
Source§impl AuditLogger
impl AuditLogger
pub fn new(kernel: &Kernel) -> Self
pub fn is_disabled(&self) -> bool
Sourcepub fn audit_log<M: Display, T: FnOnce() -> M>(
&self,
audit_type: u16,
audit_formatter: T,
)
pub fn audit_log<M: Display, T: FnOnce() -> M>( &self, audit_type: u16, audit_formatter: T, )
Audit logging function that adds an audit message to the queue.
The audit_formatter function is called only if the auditing is enabled.
Sourcepub fn read_audit_log(
&self,
client: &Arc<AuditNetlinkClient>,
) -> Option<AuditMessage>
pub fn read_audit_log( &self, client: &Arc<AuditNetlinkClient>, ) -> Option<AuditMessage>
Called by the NetlinkAuditClient to pull the next audit log from the backlog.
Sourcepub fn detach_client(&self, client: &Arc<AuditNetlinkClient>)
pub fn detach_client(&self, client: &Arc<AuditNetlinkClient>)
Function to detach the AuditNetlinkClient from the AuditLogger if
the provided client matches the one registered.
Sourcepub fn set_status(
&self,
current_task: &CurrentTask,
status: audit_status,
client: &Arc<AuditNetlinkClient>,
) -> Result<(), Errno>
pub fn set_status( &self, current_task: &CurrentTask, status: audit_status, client: &Arc<AuditNetlinkClient>, ) -> Result<(), Errno>
Applies the specified changes to the audit logger settings.
Sourcepub fn get_status(&self) -> audit_status
pub fn get_status(&self) -> audit_status
Retrieve the AuditConfig as audit_status struct.
Sourcepub fn get_backlog_count(&self, client: &Arc<AuditNetlinkClient>) -> usize
pub fn get_backlog_count(&self, client: &Arc<AuditNetlinkClient>) -> usize
Retrieve the number of audit messages in the backlog.
Auto Trait Implementations§
impl !Freeze for AuditLogger
impl !RefUnwindSafe for AuditLogger
impl Send for AuditLogger
impl Sync for AuditLogger
impl Unpin for AuditLogger
impl !UnwindSafe for AuditLogger
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
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
Converts the given service transport handle of type
T to [Self]Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T, U> MultiArchFrom<T> for Uwhere
U: From<T>,
impl<T, U> MultiArchFrom<T> for Uwhere
U: From<T>,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T, U> TryIntoExt<U> for Twhere
U: TryFromExt<T>,
impl<T, U> TryIntoExt<U> for Twhere
U: TryFromExt<T>,
type Error = <U as TryFromExt<T>>::Error
§fn try_into_ext(self) -> Result<U, <T as TryIntoExt<U>>::Error>
fn try_into_ext(self) -> Result<U, <T as TryIntoExt<U>>::Error>
Tries to perform the conversion.