1AUSEARCH_ADD_ITEM(3)            Linux Audit API           AUSEARCH_ADD_ITEM(3)
2
3
4

NAME

6       ausearch_add_item - build up search rule
7

SYNOPSIS

9       #include <auparse.h>
10
11       int  ausearch_add_item(auparse_state_t  *au,  const  char *field, const
12       char *op, const char *value, ausearch_rule_t how);
13
14

DESCRIPTION

16       ausearch_add_item adds one search condition to the current audit search
17       expression. The search conditions can then be used to scan logs, files,
18       or buffers for something of interest. The field value is the field name
19       that the value will be checked for. The op variable describes what kind
20       of check is to be done. Legal op values are:
21
22
23              exists
24                      just check that a field name exists
25
26              =
27                      locate the field name and check that the  value  associ‐
28                     ated with it is equal to the value given in this rule.
29
30              !=
31                      locate  the  field name and check that the value associ‐
32                     ated with it is NOT equal to  the  value  given  in  this
33                     rule.
34
35       The value parameter is compared to the uninterpreted field value.
36
37       The  how  value  determines  how  this search condition will affect the
38       existing search expression if one is already defined. The possible val‐
39       ues are:
40
41              AUSEARCH_RULE_CLEAR
42                     Clear the current search expression, if any, and use only
43                     this search condition.
44
45              AUSEARCH_RULE_OR
46                     If a search expression E is already  configured,  replace
47                     it by (E || this_search_condition).
48
49              AUSEARCH_RULE_AND
50                     If  a  search expression E is already configured, replace
51                     it by (E && this_search_condition).
52
53

RETURN VALUE

55       Returns -1 if an error occurs; otherwise, 0 for success.
56
57

SEE ALSO

59       ausearch_add_expression(3),   ausearch_add_interpreted_item(3),   ause‐
60       arch_add_timestamp_item(3),         ausearch_add_regex(3),        ause‐
61       arch_set_stop(3), ausearch_clear(3), ausearch_next_event(3),  ausearch-
62       expression(5).
63
64

AUTHOR

66       Steve Grubb
67
68
69
70Red Hat                            Nov 2007               AUSEARCH_ADD_ITEM(3)
Impressum