Bug 443792 - s-c-audit: not possible to add new "Event type rule"
Summary: s-c-audit: not possible to add new "Event type rule"
Keywords:
Status: CLOSED DUPLICATE of bug 446080
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: audit
Version: 5.2
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Steve Grubb
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-04-23 11:59 UTC by Eduard Benes
Modified: 2008-08-28 18:06 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-08-28 18:06:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Fix -F in the help text of auditctl (712 bytes, patch)
2008-05-13 04:06 UTC, Miloslav Trmač
no flags Details | Diff

Description Eduard Benes 2008-04-23 11:59:23 UTC
Description of problem:
It is not possible to add new "Event type rule" using s-c-audit.
There seems to be problem with '-S all' added to the rule that is being 
generated by s-c-audit in /etc/audit/audit.rules. For example:
...
-a user,always -F auid=5000 -S all

And doesn't like it complainig:
Error: syscall auditing being added to user list
There was an error in line 7 of /etc/audit/audit.rules

Version-Release number of selected component (if applicable):
audit-1.6.5-9.el5

How reproducible:
always

Steps to Reproduce:
1. run s-c-audit  
2. try to add some "Event type rules"
3. save it and ask to apply changes right now
4. observe the above complain about error in audit.rules config
  
Actual results:
Generated rule is not correct ...

Expected results:
Successfully add "Event type rule" ...

Additional info:
The s-c-audit could also be helpful when user wants to add "bit mask" or "bit 
test" operators (&,&=) allowing him to use only meaningful field names, 
document it in man page. It should be also able load current rules from the 
audit.rules file as it does for file watches.

There is also a typo in auditctl program help, listing probably obsolete 
operator ^, that is not used anymore, and &= should be listed instead:

# auditctl -h 
... 
-F f=v   Build rule: field name, operator(=,!=,<,>,<=, >=,^,&) value

Comment 1 Miloslav Trmač 2008-05-13 04:06:07 UTC
Created attachment 305200 [details]
Fix -F in the help text of auditctl

Thanks for your report.

(In reply to comment #0)
> It is not possible to add new "Event type rule" using s-c-audit.
> There seems to be problem with '-S all' added to the rule that is being 
> generated by s-c-audit in /etc/audit/audit.rules. For example:
> ...
> -a user,always -F auid=5000 -S all
Will be fixed in system-config-audit-0.4.7.

> The s-c-audit could also be helpful when user wants to add "bit mask" or "bit

> test" operators (&,&=) allowing him to use only meaningful field names, 
> document it in man page. It should be also able load current rules from the 
> audit.rules file as it does for file watches.
(The problem is that the kernel prohibits & and &= with most field names in
some cases, and s-c-audit allows creating such rules.)	

kernel/auditfilter.c:audit_rule_to_entry() prohibits using & and &= with most
fields, but audit_data_to_entry() does not have such a restriction; therefore
the rules are at least potentially valid and s-c-audit must allow creating
them.  (From a theoretical cleanliness standpoint, there seems to be no reason
to prohibit the rules.)  s-c-audit already somewhat discourages the use of
these operators by placing them after a separator.

> There is also a typo in auditctl program help, listing probably obsolete 
> operator ^, that is not used anymore, and &= should be listed instead:
> 
> # auditctl -h 
> ... 
> -F f=v   Build rule: field name, operator(=,!=,<,>,<=, >=,^,&) value
Fixed in the attached patch.

Comment 2 Steve Grubb 2008-08-28 18:06:35 UTC
The fixes are in the current development audit package. Marking this as a duplicate of the audit rebase bug report.

*** This bug has been marked as a duplicate of bug 446080 ***


Note You need to log in before you can comment on or make changes to this bug.