-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
I'm looking to use Netlink to read audit events. To start with, I created a loop to read packets being sent over the bound Audit socket, but nothing seems to happen after creating the NetlinkReader (I'm running a nightly debug build as root, there are audits being generated by the system). Should I be expecting to see anything coming over Netlink? Have I misunderstood the binding? Thanks.
let mut nlsock = NetlinkSocket::bind(NetlinkProtocol::Audit, 0 as u32).unwrap();
let bufsz = nlsock.getrcvbuf().expect("Couln't getrcvbuf!");
let mut nlreader = NetlinkReader::new(&mut nlsock);
while let Ok(Some(pkt)) = nlreader.read_netlink() {
let kind = pkt.get_kind();
println!("Got packet: {:?}", kind);
}
Metadata
Metadata
Assignees
Labels
No labels