User Tools

Site Tools


solaris:get_matching_autag_info.3audit

get_matching_autag_info


NAME

get_matching_autag_info - get tag information for a binary audit record

SYNOPSIS

cc [ flag…] file … -laudit [library …]
#include <security/libaudit.h>

nvlist_t *get_matching_autag_info(void *audit_record,
char *tags_fname)

DESCRIPTION

The get_matching_autag_info() function returns an nvlist containing information about names of audit tags which the specified binary audit record matches. All nvpairs in the returned nvlist will be of the same name (“tagname”), and the values are all string type containing the tagname matched.

audit_record points to the binary audit record.

tags_fname specifies the tags file name to be used. If NULL is specified, then the definition of default audit tags are used.

RETURN VALUES

Upon successful completion, an nvlist is allocated and the address is returned. Otherwise, NULL is returned if no tags are found or if an error occurs errno is set to indicate the error.

The caller must call the nvlist_free() function to deallocate any returned nvlist. For more information, see the nvlist_free(3NVPAIR) man page.

ERRORS

The get_matching_autag_info() function will fail if:

ENOENT

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

EACCES

The specified tag file is not accessible.

EINVAL

An error occurred while parsing the audit record argument.

EXAMPLES

Example 1 Example to get all tag names that a binary audit record
(“record”) matches.

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

int error;
nvlist_t *list;
nvpair_t *pair = NULL;
char *tagname;
.
.
.
errno = 0;
if 1) == NULL) {

if (errno != 0) {
perror(“get_matching_autag_info”);

exit(1);
}

return (0);

}
while 2) != NULL) {

error = nvpair_value_string(pair, &tagname);
.
.
.

}
nvlist_free(list);

ATTRIBUTES

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

SEE ALSO

1)
list = get_matching_autag_info(record, NULL
2)
pair = nvlist_next_nvpair(list, pair
solaris/get_matching_autag_info.3audit.txt · Last modified: 2023/07/19 08:58 by A User Not Logged in