All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael C Thompson <thompsmc@us.ibm.com>
To: Linda Knippers <linda.knippers@hp.com>
Cc: Linux Audit <linux-audit@redhat.com>
Subject: Re: Double addition of rule yields two log messages
Date: Fri, 19 May 2006 12:40:51 -0500	[thread overview]
Message-ID: <446E0323.4030905@us.ibm.com> (raw)
In-Reply-To: <446DEF68.5050405@hp.com>

Linda Knippers wrote:
> Michael C Thompson wrote:
>> Hey all,
>>
>> Adding a rule successfully (i.e. not malformed and that rule didn't
>> already exist) creates a log entry:
>> type=CONFIG_CHANGE msg=audit(1147986115.721:28510): auid=0
>> subj=root:staff_r:staff_t:s0-s15:c0.c255 add rule to list=2 res=0
>>
>> Then, adding the same rule again will resulting in an error message
>> being reported to the user saying that rule exists (although it uses the
>> work "File exists", which if that could be changed to "Rule exists",
>> might be nice). However, despite this apparent failure, we get a log entry:
>> type=CONFIG_CHANGE msg=audit(1147986117.389:28511): auid=0
>> subj=root:staff_r:staff_t:s0-s15:c0.c255 add rule to list=2 res=0
>>
>> Most FYI, not sure if this is a problem or not.
> 
> That's interesting.  When I do this sequence with the .22 kernel
> and the 1.2.1 tools:
> 
> # auditctl -a entry,always -S all -F pid=1005
> # auditctl -a entry,always -S all -F pid=1005
> Error sending add rule request (File exists)
> 
> I get these records:
> 
> type=CONFIG_CHANGE msg=audit(1148054817.056:575): auid=500
> subj=user_u:system_r:auditctl_t:s0-s0:c0.c255 add rule to list=2 res=1
> type=CONFIG_CHANGE msg=audit(1148054831.417:576): auid=500
> subj=user_u:system_r:auditctl_t:s0-s0:c0.c255 add rule to list=2 res=0
> 
> I believe res=1 means the operation was successful and the res=0 means
> it failed.  Are you sure one of your records doesn't have res=1?

Yes, you are infact correct. I missed that with my testing. 1 for the 
first entry, 0 for all subsequent doubles.

> I don't know what the "add rule to list=2" means though.

list=2 means that it was added to the entry list, now the CONFIG_CHANGE 
messages tell you which filter list it was added to. 2 == entry, 5 == 
exclude, etc.

> 
> What is the exact rule you're adding?  And which kernel/tools are you
> running?

auditctl -a entry,always -S chmod -F se_sen=s0-s15:c
However, the action seems to be independent of the rule. The audit is 
1.2.2 and 25 kernel.

Thanks,
Mike

  reply	other threads:[~2006-05-19 17:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-19 15:21 Double addition of rule yields two log messages Michael C Thompson
2006-05-19 16:16 ` Linda Knippers
2006-05-19 17:40   ` Michael C Thompson [this message]
2006-05-19 18:06     ` Linda Knippers
2006-05-19 18:29       ` Steve Grubb
2006-05-19 18:47         ` Linda Knippers
2006-05-19 19:01           ` Steve Grubb
2006-05-19 19:28             ` Linda Knippers
2006-05-19 19:37               ` Steve Grubb
2006-05-19 18:24 ` Steve Grubb

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=446E0323.4030905@us.ibm.com \
    --to=thompsmc@us.ibm.com \
    --cc=linda.knippers@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 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.