From: Steve Grubb <sgrubb@redhat.com>
To: Linux-Audit Mailing List <linux-audit@redhat.com>,
Richard Guy Briggs <rgb@redhat.com>
Subject: Re: [PATCH v1] auditctl: check for a watch before adding perm
Date: Thu, 28 Oct 2021 17:14:43 -0400 [thread overview]
Message-ID: <5631519.DvuYhMxLoT@x2> (raw)
In-Reply-To: <20211028194857.3100986-1-rgb@redhat.com>
On Thursday, October 28, 2021 3:48:57 PM EDT Richard Guy Briggs wrote:
> The existing check would never trigger since add and del are defaulted to
> AUDIT_FILTER_UNSET which is not zero.
Thanks! Applied.
-Steve
> Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
> ---
> src/auditctl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/auditctl.c b/src/auditctl.c
> index ca6905b2884e..06bb747c5fd2 100644
> --- a/src/auditctl.c
> +++ b/src/auditctl.c
> @@ -1020,7 +1020,7 @@ process_keys:
> }
> break;
> case 'p':
> - if (!add && !del) {
> + if (add == AUDIT_FILTER_UNSET && del == AUDIT_FILTER_UNSET) {
> audit_msg(LOG_ERR,
> "permission option needs a watch given prior to it");
> retval = -1;
--
Linux-audit mailing list
Linux-audit@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-audit
prev parent reply other threads:[~2021-10-28 21:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-28 19:48 [PATCH v1] auditctl: check for a watch before adding perm Richard Guy Briggs
2021-10-28 21:14 ` 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=5631519.DvuYhMxLoT@x2 \
--to=sgrubb@redhat.com \
--cc=linux-audit@redhat.com \
--cc=rgb@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