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

c++ - llvm function pass ReplaceInstWithInst malloc -

Cross-Compiling Linux Kernel for Raspberry Pi - ${CCPREFIX}gcc -v does not work -

java.lang.NoClassDefFoundError When Creating New Android Project -