#[non_exhaustive]pub enum AuditMessage {
GetStatus(Option<StatusMessage>),
SetStatus(StatusMessage),
AddRule(RuleMessage),
DelRule(RuleMessage),
ListRules(Option<RuleMessage>),
Event((u16, String)),
Other((u16, String)),
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
GetStatus(Option<StatusMessage>)
SetStatus(StatusMessage)
AddRule(RuleMessage)
DelRule(RuleMessage)
ListRules(Option<RuleMessage>)
Event((u16, String))
Event message (message types 1300 through 1399). This includes the
following message types (this list is non-exhaustive, and not
really kept up to date): AUDIT_SYSCALL
, AUDIT_PATH
,
AUDIT_IPC
, AUDIT_SOCKETCALL
, AUDIT_CONFIG_CHANGE
,
AUDIT_SOCKADDR
, AUDIT_CWD
, AUDIT_EXECVE
,
AUDIT_IPC_SET_PERM
, AUDIT_MQ_OPEN
, AUDIT_MQ_SENDRECV
,
AUDIT_MQ_NOTIFY
, AUDIT_MQ_GETSETATTR
, AUDIT_KERNEL_OTHER
,
AUDIT_FD_PAIR
, AUDIT_OBJ_PID
, AUDIT_TTY
, AUDIT_EOE
,
AUDIT_BPRM_FCAPS
, AUDIT_CAPSET
, AUDIT_MMAP
,
AUDIT_NETFILTER_PKT
, AUDIT_NETFILTER_CFG
, AUDIT_SECCOMP
,
AUDIT_PROCTITLE
, AUDIT_FEATURE_CHANGE
, AUDIT_REPLACE
,
AUDIT_KERN_MODULE
, AUDIT_FANOTIFY
.
The first element of the tuple is the message type, and the second is the event data.
Other((u16, String))
All the other events are parsed as such as they can be parsed also.
Implementations§
source§impl AuditMessage
impl AuditMessage
pub fn is_event(&self) -> bool
pub fn is_get_status(&self) -> bool
pub fn is_set_status(&self) -> bool
pub fn is_add_rule(&self) -> bool
pub fn is_del_rule(&self) -> bool
pub fn is_list_rules(&self) -> bool
pub fn message_type(&self) -> u16
Trait Implementations§
source§impl Clone for AuditMessage
impl Clone for AuditMessage
source§fn clone(&self) -> AuditMessage
fn clone(&self) -> AuditMessage
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for AuditMessage
impl Debug for AuditMessage
source§impl Emitable for AuditMessage
impl Emitable for AuditMessage
source§impl From<AuditMessage> for NetlinkPayload<AuditMessage>
impl From<AuditMessage> for NetlinkPayload<AuditMessage>
source§fn from(message: AuditMessage) -> Self
fn from(message: AuditMessage) -> Self
source§impl NetlinkDeserializable for AuditMessage
impl NetlinkDeserializable for AuditMessage
type Error = DecodeError
source§fn deserialize(
header: &NetlinkHeader,
payload: &[u8]
) -> Result<Self, Self::Error>
fn deserialize( header: &NetlinkHeader, payload: &[u8] ) -> Result<Self, Self::Error>
Self
.source§impl NetlinkSerializable for AuditMessage
impl NetlinkSerializable for AuditMessage
fn message_type(&self) -> u16
source§fn buffer_len(&self) -> usize
fn buffer_len(&self) -> usize
source§fn serialize(&self, buffer: &mut [u8])
fn serialize(&self, buffer: &mut [u8])
buffer
’s length is exactly InnerMessage::buffer_len()
.
It means that if InnerMessage::buffer_len()
is buggy and does not
return the appropriate length, bad things can happen: Read moresource§impl<'a, T: AsRef<[u8]> + ?Sized> ParseableParametrized<AuditBuffer<&'a T>, u16> for AuditMessage
impl<'a, T: AsRef<[u8]> + ?Sized> ParseableParametrized<AuditBuffer<&'a T>, u16> for AuditMessage
source§fn parse_with_param(
buf: &AuditBuffer<&'a T>,
message_type: u16
) -> Result<Self, DecodeError>
fn parse_with_param( buf: &AuditBuffer<&'a T>, message_type: u16 ) -> Result<Self, DecodeError>
source§impl PartialEq<AuditMessage> for AuditMessage
impl PartialEq<AuditMessage> for AuditMessage
source§fn eq(&self, other: &AuditMessage) -> bool
fn eq(&self, other: &AuditMessage) -> bool
self
and other
values to be equal, and is used
by ==
.