All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Grubb <sgrubb@redhat.com>
To: Linux-audit@redhat.com, Andreas Hasenack <andreas@canonical.com>
Subject: Re: Replacing file watch (-w) with syscall
Date: Fri, 28 May 2021 11:26:09 -0400	[thread overview]
Message-ID: <11760122.O9o76ZdvQC@x2> (raw)
In-Reply-To: <CANYNYEF=9QnN3TnhrC3OsrWD1LbRifepfzDJBXR-NeKsNdy5qA@mail.gmail.com>

On Friday, May 28, 2021 8:34:45 AM EDT Andreas Hasenack wrote:
> I wanted to place a file watch on a file, but with an auid filter,
> i.e., I didn't want to log accesses done by a particular user. That is
> not possible with -w, so we have to use a syscall rule.
> 
> The manpage has many examples of such conversions, so here is what I would
> use:
> 
> -a always,exit -F auid!=andreas -F path=/etc/myfile -F perm=wa -F
> key=myfile-changed
> 
> No syscall, because the manpage also says this for the perm filter:
> "You can use this without specifying a syscall and the kernel will
> select the syscalls that satisfy the permissions being requested."
> 
> Right after loading that rule, though, auditctl shows it with "-S all":
> 
> -a always,exit -S all -F auid!=1000 -F path=/etc/myfile -F perm=wa -F
> key=myfile-changed
> 
> That had me a bit worried, in terms of performance impact, if "-S all"
> is true and all syscalls will be checked. Is this a terrible rule?

I think what you  are seeing is auditctl trying to display something 
meaningful. The syscalls are selected by the perm filter but it keeps this 
information private and doesn't move it to the syscall mask. The watch does 
the same thing you just don't see anything displayed when you list the rule.

-Steve


--
Linux-audit mailing list
Linux-audit@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-audit


  reply	other threads:[~2021-05-28 15:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-28 12:34 Replacing file watch (-w) with syscall Andreas Hasenack
2021-05-28 15:26 ` Steve Grubb [this message]
2021-05-28 15:55   ` Richard Guy Briggs
2021-05-28 16:25     ` Andreas Hasenack

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=11760122.O9o76ZdvQC@x2 \
    --to=sgrubb@redhat.com \
    --cc=Linux-audit@redhat.com \
    --cc=andreas@canonical.com \
    /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.