public inbox for linux-audit@redhat.com
 help / color / mirror / Atom feed
* Refactoring src/ausearch-report.c:output_interpreted_node()
@ 2014-09-29  2:41 Burn Alting
  2014-09-29 20:48 ` Burn Alting
  2014-10-01 18:54 ` Steve Grubb
  0 siblings, 2 replies; 12+ messages in thread
From: Burn Alting @ 2014-09-29  2:41 UTC (permalink / raw)
  To: linux-audit

Steve,

In lib/lookup_table.c:audit_name_to_msg_type(), the event type value is
parsed and converted to an integer as per,

Given
        type=<type_value> 
then
        <type_value>
is parsed for
        - a known string 
        - a long integer number, n, found in the specific string
		"UNKNOWN[n]"
        - a long integer number, n, found in the specific string
		"n"

In src/ausearch-report.c:output_interpreted_node() it additionally
parses for a <type_value> of
        - a long integer number, n, found in the string "[^\[]*[n].*"
i.e.
        type=something[n]something_else

Is there any reason against adding this additional parsing into
lib/lookup_table.c:audit_name_to_msg_type()?

If we can, then output_interpreted_node() can be re-factored so we are
not parsing the same data twice for every event.

I am uncertain what effect of accepting this additional format would
have when adding rules to the running audit system - i.e.
audit_name_to_msg_type() is called by autrace/auditctl when parsing
rules (ie the msgtype field name).


Regards

Burn

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-10-07 15:26 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-29  2:41 Refactoring src/ausearch-report.c:output_interpreted_node() Burn Alting
2014-09-29 20:48 ` Burn Alting
2014-10-01 18:54 ` Steve Grubb
2014-10-01 21:08   ` Burn Alting
2014-10-01 21:19     ` Steve Grubb
2014-10-01 21:24       ` Steve Grubb
2014-10-01 21:54         ` Burn Alting
2014-10-01 21:52       ` Burn Alting
2014-10-01 22:28         ` Steve Grubb
2014-10-02  9:29           ` Burn Alting
2014-10-07  9:31             ` Burn Alting
2014-10-07 15:26               ` Steve Grubb

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox