All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Grubb <sgrubb@redhat.com>
To: linux-audit@redhat.com, xi-chen-0@northwestern.edu
Subject: Re: command missing
Date: Mon, 23 Apr 2007 11:05:25 -0400	[thread overview]
Message-ID: <200704231105.25952.sgrubb@redhat.com> (raw)
In-Reply-To: <20070423144612.19CE11C@lulu.it.northwestern.edu>

On Monday 23 April 2007 10:46, xi-chen-0@northwestern.edu wrote:
> If I do "auditctl -a entry,always -w /etc/passwd", 

This is mixing syscall auditing with filesystem auditing. It would be more 
correct to do:

auditctl -w /etc/passwd

> then "grep man /etc/passwd", then "ausearch -f passwd", the "grep" command
> is logged in  the log file.

correct.

> However, if I do "auditctl -a entry,always -w /etc", 

This will watch the directory, not its contents. IOW, it will detect changes 
to the directory entries, not access to the files in the directories.

> then "grep man /etc/passwd", then "ausearch -f passwd", the "grep" command
> is not logged in the log file.

See above

> However, the "vim" command is recorded if I use vim to open
> that "/etc/passwd" file.

Because it modifies the dir entries.

> Is this the preassumed behavior for the auditing system 

In its current state, yes.

> ps: Is there a better way to monitor the whole filesystem behaviors, such
> as open, create, delete syscalls, instead of just monitoring a single
> directory?

Yes, you may use syscall auditing:

auditctl -a always,exit -S open -F devmajor=0x10 -F devminor=0x0F

You can use devmajor/minor to select the partition that you want to audit. You 
can also use -f  exit to select failed accesses.

We are working on a way to audit whole subtrees with audit rules, but right 
now syscall auditing is the only option.

-Steve

  reply	other threads:[~2007-04-23 15:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-23 14:46 command missing xi-chen-0
2007-04-23 15:05 ` Steve Grubb [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-04-20 22:28 xi-chen-0

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200704231105.25952.sgrubb@redhat.com \
    --to=sgrubb@redhat.com \
    --cc=linux-audit@redhat.com \
    --cc=xi-chen-0@northwestern.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.