| Updated: October 28, 2024 |
Returns a handle to a permission associated with a custom class
#include <secpol/secpol.h>
secpol_permission_t* secpol_get_permission(secpol_file_t *_handle,
const char *_class,
const char *permission,
unsigned flags)
By default, the secpol_get_permission() function will succeed even when no security policy is in use or if the class or permission cannot be found. However, if the system uses security policies, the permission will always be denied. If the system is not using security policies, the function checks whether the process is root. This behavior may be changed by passing appropriate flags.