linux-audit.redhat.com archive mirror
 help / color / mirror / Atom feed
* auparse with AUSOURCE_DESCRIPTOR
@ 2015-07-29 20:36 Satish Chandra Kilaru
  2015-07-30 14:16 ` Satish Chandra Kilaru
  0 siblings, 1 reply; 5+ messages in thread
From: Satish Chandra Kilaru @ 2015-07-29 20:36 UTC (permalink / raw)
  To: linux-audit@redhat.com


[-- Attachment #1.1: Type: text/plain, Size: 703 bytes --]

Has anyone tried AUSOURCE_DESCRIPTOR with a unix socket as fd?

I am doing the following.

int sd_u = socket(AF_UNIX, SOCK_STREAM, 0);
connect(sd_u, (struct sockaddr *) &sa, sizeof(sa))!=0)
auparse_state_t *au = auparse_init(AUSOURCE_DESCRIPTOR, (const void *)sd_u);
auparse_add_callback(au, auparse_callback, event_cnt, free);
ausearch_next_event(au);

My auparse_callback() is not getting called. My program just blocks in
ausearch_next_event().

read(sd_u, buf, sizeof(buf)) gets me events... That means I am using
correct unix socket.
How do I make the callback function to get called for each event?

Am I missing something here?

Thanks in advance.
--Satish
-- 
Please Donate to www.wikipedia.org

[-- Attachment #1.2: Type: text/html, Size: 1046 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-07-30 17:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-29 20:36 auparse with AUSOURCE_DESCRIPTOR Satish Chandra Kilaru
2015-07-30 14:16 ` Satish Chandra Kilaru
2015-07-30 16:12   ` Steve Grubb
2015-07-30 16:34     ` Satish Chandra Kilaru
2015-07-30 17:04       ` Steve Grubb

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).