Skip to contentSkip to conversation

System-call auditing

DISCUSSION Bradley Hook 1 participant 1 message May 19, 2004

lore
Share & tools
lore
#0 lore raw

I'm trying to put this system-call auditing to use, and I'm running into some trouble figuring it out. I've been studying the sources for the auditd example app and the audit.c/auditsc.c kernel files, and have yet to figure out how to accomplish my goal.

What I am trying to do is detect when a modified file is closed. I figured auditing __NR_open, __NR_write, and __NR_close would be the way to do this (perhaps I am wrong here?). My problem is that I haven't found a way to tie the open/write/close calls together with the info that the auditing code provides.

The audit info for __NR_open provides the filename (which I would need when my app goes to work) but doesn't provide any unique identifier that I can use to tie it to audits on __NR_write or __NR_close.

If anyone can give me some pointers on how to use this auditing code I would greatly appreciate it.

~Brad