Go to main content

man pages section 3: Extended Library Functions, Volume 1

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

check_autags(3AUDIT)

Name

check_autags - validate audit tag definitions

Synopsis

cc [ flag...] file ... -laudit [library ...]

#include <limits.h>
#include <security/libaudit.h>

int check_autags(char *err_buf, size_t buf_len, char *tags_fname);

Description

The check_autags() function validates audit tag definitions and returns information about any errors.

tags_fname specifies the tags file name to be validated. If NULL is specified, then default system audit tags definitions are used.

For errors, detailed text about the error is written to the buffer provided in err_buf. buf_len specifies the size of err_buf. Error text is not returned if err_buf is NULL or if buf_len is 0. If buf_len is too small to hold the null-terminated error text, the text is truncated. If multiple errors are found, they are written to err_buf separated by newline characters. A buffer of size LINE_MAX or larger is recommended, in order to hold several lines if needed.

Return Values

Upon successful completion, 0 is returned. Otherwise an error code is returned.

Errors

The check_autags() function will fail if:

ENOENT

The specified tags file is not found or is not a regular file.

EACCES

The specified tags file is not accessible.

EINVAL

An error occurred while parsing the tags file(s).

Attributes

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Interface Stability
Uncommitted
MT-Level
MT-Safe

See Also

audit_tags(5), attributes(7)

History

The check_autags() function was added in Oracle Solaris 11.4.0.