c - Customize output of event auditing in FreeBSD -


i want customize output of event auditing in freebsd. read audit kernel , daemon code, , found auditd_gen_record function in /usr/src/contrib/openbsm/libauditd/auditd_lib.c, , think function generates event auditing records.

since wanted make sure function function want, wrote simple function , call in auditd_gen_record function, sample function wrote didn't work reason!

sample function is:

void test_audit(void) {     int     fd;     int     flags   = o_wronly | o_append;     char *  path    = "/root/testoutputdata";     char *  msg     = "audit gen rec\n";      fd = open(path, flags);     write(fd, msg, strlen(msg));     close(fd); } 

if think i'm in wrong place or function, or should manipulate else, please tell me. how can manipulate freebsd event auditing creating custom logfile? thanks!


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -