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  audit  search  API.
17       The  search conditions can then be used to scan logs, files, or buffers
18       for something of interest. The field value is the field name  that  the
19       value will be checked for. The op variable describes what kind of check
20       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  how  value  determines  how  this  search condition will be stored
36       internally. The possible values are:
37
38              AUSEARCH_RULE_CLEAR
39                     When this is used, it clears any previous  search  condi‐
40                     tion and inserts it as the first one.
41
42              AUSEARCH_RULE_OR
43                     When this is used, it means that the results of its eval‐
44                     uation will be "or"ed with other search conditions.
45
46              AUSEARCH_RULE_AND
47                     When this is used, it means that the results of its eval‐
48                     uation will be "and"ed with other search conditions.
49
50       All  search  conditions must be the same type, you cannot mix "and" and
51       "or".
52
53

RETURN VALUE

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

SEE ALSO

59       ausearch_add_regex(3), ausearch_set_stop(3),  ausearch_clear(3),  ause‐
60       arch_next_event(3).
61
62

AUTHOR

64       Steve Grubb
65
66
67
68Red Hat                            Feb 2007               AUSEARCH_ADD_ITEM(3)
Impressum