From: Steve Grubb <sgrubb@redhat.com>
To: Keith Kaple <kak@cisco.com>
Cc: linux-audit@redhat.com
Subject: Re: open() syscall and success=0 question
Date: Tue, 13 May 2008 10:46:10 -0400 [thread overview]
Message-ID: <200805131046.10852.sgrubb@redhat.com> (raw)
In-Reply-To: <20080513143657.GC4939@cisco.com>
On Tuesday 13 May 2008 10:36:58 Keith Kaple wrote:
> Can you ellaborate a little on EPERM vs. EACCES?
>
> Say a normal user tries to cp /etc/passwd and gets "permission denied" in
> the shell, will exit=-EPERM or -EACCESS?
According to man 2 open, both could be returned for a permission error. strace
tells us this, though:
open("/etc/shadow", O_RDONLY) = -1 EACCES (Permission denied)
So, for that scenario, you want to also have a rule of:
auditctl -a exit,always -S open -F exit=-EACCES
> I assume there will be an entry for both if perhaps success=0 alone is
> used..
Yes, and there will be one for any ENOENT and a host of other failed returns.
You will need 2 rules to cover both permission denied return codes.
-Steve
prev parent reply other threads:[~2008-05-13 14:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-13 14:13 open() syscall and success=0 question Keith Kaple
2008-05-13 14:24 ` Steve Grubb
2008-05-13 14:36 ` Keith Kaple
2008-05-13 14:46 ` Steve Grubb [this message]
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=200805131046.10852.sgrubb@redhat.com \
--to=sgrubb@redhat.com \
--cc=kak@cisco.com \
--cc=linux-audit@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox