.TH "AUSEARCH_ADD_EXPRESSION" "3" "Feb 2008" "Red Hat" "Linux Audit API" .SH NAME ausearch_add_expression \- build up search expression .SH "SYNOPSIS" .nf .B #include .PP .BI "int ausearch_add_expression(auparse_state_t *" au ", const char *" expression ", char **" error ", ausearch_rule_t " how );" .fi .SH "DESCRIPTION" .B ausearch_add_item adds an expression to the current audit search expression. The search conditions can then be used to scan logs, files, or buffers for something of interest. The \fIexpression\fP parameter contains an expression, as specified in .BR ausearch\-expression (5). The \fIhow\fP parameter determines how this search expression will affect the existing search expression, if one is already defined. The possible values are: .RS .TP .I AUSEARCH_RULE_CLEAR Clear the current search expression, if any, and use only this search expression. .TP .I AUSEARCH_RULE_OR If a search expression .I E is already configured, replace it by \fB(\fIE\fB || this_search_expression)\fR. .TP .I AUSEARCH_RULE_AND If a search expression .I E is already configured, replace it by \fB(\fIE\fB && this_search_expression)\fR. .RE The caller must free the error message using .BR free (3). If an error message is not available or can not be allocated, \fB*\fIerror\fR is set to \fBNULL\fR. .SH "SEE ALSO" .BR ausearch_add_item (3), .BR ausearch_add_interpreted_item (3), .BR ausearch_add_timestamp_item (3), .BR ausearch_add_regex (3), .BR ausearch_set_stop (3), .BR ausearch_clear (3), .BR ausearch_next_event (3), .BR ausearch_cur_event (3), .BR ausearch\-expression (5). .SH AUTHOR Miloslav Trmac