both ls -i both stat return 252 as inode for /tmp/test (I considered your /tmp/watch a typo) <br>I also tried to add read permission to the watch and execute a cat on the file, but not even that get recognized by audit.<br>
<br><div class="gmail_quote">2011/6/2 Steve Grubb <span dir="ltr"><<a href="mailto:sgrubb@redhat.com">sgrubb@redhat.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Thursday, June 02, 2011 12:41:41 PM 4javier wrote:<br>
> root@Archbox /home/javier $ touch /tmp/test<br>
> root@Archbox /home/javier $ cat /tmp/test<br>
> root@Archbox /home/javier $ auditctl -w /tmp/test -p wa<br>
> root@Archbox /home/javier $ echo ppp >> /tmp/test<br>
> root@Archbox /home/javier $ cat /tmp/test<br>
> ppp<br>
> root@Archbox /home/javier $ ausearch -i -f /tmp/test<br>
> <no matches><br>
> root@Archbox /home/javier $ auditctl -l<br>
> LIST_RULES: exit,always watch=/tmp/test perm=wa<br>
> root@Archbox /home/javier $ echo ppp > /tmp/test<br>
> root@Archbox /home/javier $ ausearch -i -f /tmp/test<br>
> <no matches><br>
> root@Archbox /home/javier $ ausearch -f /tmp/test<br>
> <no matches><br>
><br>
> As you can see from auditcrl -l output, rule seems to be correctly set, but<br>
> ausearch doesn't show anything.<br>
<br>
</div>I duplicated your tests here:<br>
[root@localhost ~]# auditctl -w /tmp/test -p wa -k watch<br>
[root@localhost ~]# echo "ppp" >> /tmp/test<br>
[root@localhost ~]# cat /tmp/test<br>
<br>
ppp<br>
[root@localhost ~]# ausearch --start recent -i -f /tmp/test<br>
----<br>
type=PATH msg=audit(06/02/2011 14:32:45.146:112) : item=0 name=/tmp/test inode=164740<br>
<div class="im">dev=fd:01 mode=file,644 ouid=root ogid=root rdev=00:00<br>
obj=unconfined_u:object_r:user_tmp_t:s0<br>
</div>type=CWD msg=audit(06/02/2011 14:32:45.146:112) :  cwd=/root<br>
type=SYSCALL msg=audit(06/02/2011 14:32:45.146:112) : arch=x86_64 syscall=open<br>
success=yes exit=3 a0=1842830 a1=441 a2=1b6 a3=0 items=1 ppid=1298 pid=1304<br>
<div class="im">auid=sgrubb uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root<br>
</div>fsgid=root tty=pts0 ses=1 comm=bash exe=/bin/bash<br>
<div class="im">subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=watch<br>
<br>
</div>Admittedly I am on the 2.6.38.6 kernel. But I'm not seeing a regression. When you set<br>
the perms to "wa" that is only going to be opens for writing or changes to file<br>
attributes. So, the cat command will not trigger an event and that is why I only get 1<br>
event. I am also on a 64 bit system, but I would think that didn't matter...unless we<br>
have a signed/unsigned comparison problem...what do you have for an inode on the<br>
/tmp/watch file? ls -i /tmp/watch should get it.<br>
<font color="#888888"><br>
-Steve<br>
</font></blockquote></div><br>