All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael C Thompson <thompsmc@us.ibm.com>
To: Michael C Thompson <thompsmc@us.ibm.com>
Cc: Linux Audit <linux-audit@redhat.com>
Subject: Re: [PATCH] auditctl -l listing with correct operators
Date: Wed, 17 May 2006 14:14:02 -0500	[thread overview]
Message-ID: <446B75FA.8090109@us.ibm.com> (raw)
In-Reply-To: <446B7454.4000903@us.ibm.com>

Michael C Thompson wrote:
> With the current version of audit, auditctl -l only prints an equal, not 
> equal operator when it displays rules, while the rules in the kernel are 
> operating correctly, this is most an inconvenience, since is not 
> possible to tell what rules are really in the kernel.
> 
> The problem lies in the audit_print_reply logic not detecting the type 
> of the message (either AUDIT_LIST or AUDIT_LIST_RULE).
> 
> Below is a patch which adds this detection.
> 
> Thanks,
> Mike

This thread is technically a repost, because I realized that hiding a 
patch inside a big discussion thread is probably a no-no, and its just a 
dumb idea to begin with. Oh well, live and be dumb.

Below is some testing between the original code and the patched code.

# auditctl -a entry,always -S chmod -F 'uid=100'
# auditctl -a entry,always -S chmod -F 'uid>200'
# auditctl -a entry,always -S chmod -F 'uid>=300'
# auditctl -a entry,always -S chmod -F 'uid!=400'
# auditctl -a entry,always -S chmod -F 'uid<500'
# auditctl -a entry,always -S chmod -F 'uid<=600'

# auditctl -l    [ audit-1.2.2 auditctl pre-patch]
LIST_RULES: entry,always uid=100 (0x64) syscall=chmod
LIST_RULES: entry,always uid=200 (0xc8) syscall=chmod
LIST_RULES: entry,always uid=300 (0x12c) syscall=chmod
LIST_RULES: entry,always uid=400 (0x190) syscall=chmod
LIST_RULES: entry,always uid=500 (0x1f4) syscall=chmod
LIST_RULES: entry,always uid=600 (0x258) syscall=chmod


# auditctl -l   [ audit-1.2.2 auditctl post-patch ]
LIST_RULES: entry,always uid=100 (0x64) syscall=chmod
LIST_RULES: entry,always uid>200 (0xc8) syscall=chmod
LIST_RULES: entry,always uid>=300 (0x12c) syscall=chmod
LIST_RULES: entry,always uid!=400 (0x190) syscall=chmod
LIST_RULES: entry,always uid<500 (0x1f4) syscall=chmod
LIST_RULES: entry,always uid<=600 (0x258) syscall=chmod

Thanks,
Mike

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

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-17 19:07 [PATCH] auditctl -l listing with correct operators Michael C Thompson
2006-05-17 19:14 ` Michael C Thompson [this message]
2006-05-18 21:11   ` Dustin Kirkland
2006-05-18 21:25 ` 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=446B75FA.8090109@us.ibm.com \
    --to=thompsmc@us.ibm.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.