secpol_resolve_name()

Resolve a type name to a type ID

Synopsis:

#include <secpol/secpol.h>
uint32_t secpol_resolve_name(secpol_file_t *handle,
                             const char *name,
                             uint32_t flags)

Arguments:

handle
Handle to the security policy file. Usually NULL, which specifies that the default security policy file is used (either the system default or one set using secpol_open()).
name
Type name to look up.
flags
Zero or more flags from secpol_flags_e ORred together.

Library:

libsecpol

Description:

By default, the type name is assumed to refer to a derived type; that is, a type that is selected based on the process' current type and the name passed in. The name parameter can also represent the actual type name by passing SECPOL_TYPE_NAME in the flags.

Returns:

The type ID that is associated with name based on the current type of the process, or SECPOL_INVALID_TYPE if there is no type ID to return.