From: Amy Griffis <amy.griffis@hp.com>
To: linux-audit@redhat.com
Subject: Re: [PATCH] Audit of POSIX Message Queue Syscalls
Date: Wed, 17 May 2006 12:39:28 -0400 [thread overview]
Message-ID: <20060517163928.GA30925@zk3.dec.com> (raw)
In-Reply-To: <200605170934.46091.sgrubb@redhat.com>
On Wed, May 17, 2006 at 09:34:46AM -0400, Steve Grubb wrote:
> > @@ -1242,6 +1313,187 @@ uid_t audit_get_loginuid(struct audit_co
> > }
> >
> > /**
> > + * audit_mq_open - record audit data for a POSIX MQ open
> > + * @oflag: open flag
> > + * @mode: mode bits
> > + * @u_attr: queue attributes
> > + *
> > + * Returns 0 for success or NULL context or < 0 on error.
> > + */
> > +int audit_mq_open(int oflag, mode_t mode, struct mq_attr __user *u_attr)
> > +{
> > + struct audit_aux_data_mq_open *ax;
> > + struct audit_context *context = current->audit_context;
> > +
> > + if (likely(!context))
> > + return 0;
>
> What if audit is not enabled? Need to check for it and bail out.
The audit_enabled flag is only checked once during syscall processing,
in audit_syscall_entry. Once we've made the decision to audit a
syscall, we don't re-check.
If audit_enabled was 0 in audit_syscall_entry, then
context->in_syscall will be 0. The latter is what you should check
along with !context.
Looking through the code, I see that audit_getname, audit_inode and
friends do both checks, while the other aux data collectors only check
!context. Looks like someone should add the second check for those
also (except maybe audit_avc_path). IIRC, we want the avc path
records even when syscall auditing is disabled.
Amy
next prev parent reply other threads:[~2006-05-17 16:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-17 1:40 [PATCH] Audit of POSIX Message Queue Syscalls George C. Wilson
2006-05-17 13:34 ` Steve Grubb
2006-05-17 16:39 ` Amy Griffis [this message]
2006-05-17 18:11 ` Steve Grubb
2006-05-17 22:38 ` George C. Wilson
2006-05-17 14:34 ` Timothy R. Chavez
2006-05-17 18:27 ` Steve Grubb
2006-05-24 21:09 ` [PATCH] Audit of POSIX Message Queue Syscalls v.2 George C. Wilson
2006-05-24 21:23 ` Linda Knippers
2006-05-24 21:32 ` Amy Griffis
2006-05-24 21:53 ` Steve Grubb
2006-05-25 1:33 ` George C. Wilson
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=20060517163928.GA30925@zk3.dec.com \
--to=amy.griffis@hp.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