public inbox for linux-audit@redhat.com
 help / color / mirror / Atom feed
* capture mount event in /var/log/audit/audit.log
@ 2012-07-07  5:53 Betty Man
  2012-07-07 22:18 ` Linda Knippers
  0 siblings, 1 reply; 2+ messages in thread
From: Betty Man @ 2012-07-07  5:53 UTC (permalink / raw)
  To: linux-audit

Hi Everyone,

 in RHEL 5.5    kernel  2.6.18-194.el5         audit-1.7.17-3.el5

Have the following in the /etc/audit/audit.rules
## non-privilege users using mount command.
 -a exit,always -F arch=b32 -S mount -F auid>=500 -F auid!=4294967295 -k export
-a exit,always -F arch=b64 -S mount -F auid>=500 -F auid!=4294967295 -k export

from a general user account

$ mount /dev/hdc /dev/cdrom
mount: only root can do that

but /var/log/audit/audit.log   does not capture this event

Any input is much appreciated!

Thanks in advance

Betty

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

* Re: capture mount event in /var/log/audit/audit.log
  2012-07-07  5:53 capture mount event in /var/log/audit/audit.log Betty Man
@ 2012-07-07 22:18 ` Linda Knippers
  0 siblings, 0 replies; 2+ messages in thread
From: Linda Knippers @ 2012-07-07 22:18 UTC (permalink / raw)
  To: Betty Man; +Cc: linux-audit

Betty Man wrote:
> Hi Everyone,
> 
>  in RHEL 5.5    kernel  2.6.18-194.el5         audit-1.7.17-3.el5
> 
> Have the following in the /etc/audit/audit.rules
> ## non-privilege users using mount command.
>  -a exit,always -F arch=b32 -S mount -F auid>=500 -F auid!=4294967295 -k export
> -a exit,always -F arch=b64 -S mount -F auid>=500 -F auid!=4294967295 -k export

This audits the mount system call, rather than the mount command.
> 
> from a general user account
> 
> $ mount /dev/hdc /dev/cdrom
> mount: only root can do that
> 
> but /var/log/audit/audit.log   does not capture this event
> 
> Any input is much appreciated!

My guess is that the mount command is doing its own check and is
failing before it attempts the mount system call.  If you run

$ strace mount /dev/hdc /dev/cdrom

you'll see the system calls that are executed.
I suspect there is no mount system call in the output.

-- ljk
> 
> Thanks in advance
> 
> Betty
> 
> --
> Linux-audit mailing list
> Linux-audit@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-audit

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

end of thread, other threads:[~2012-07-07 22:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-07  5:53 capture mount event in /var/log/audit/audit.log Betty Man
2012-07-07 22:18 ` Linda Knippers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox