NAME
security_class_to_string, security_av_perm_to_string, string_to_security_class, string_to_av_perm, security_av_string - convert
between SELinux class and permission values and string names.
SYNOPSIS
#include <selinux/selinux.h>
#include <selinux/flask.h>
I const char * security_class_to_string(security_class_t tclass );
I const char * security_av_perm_to_string(security_class_t tclass , access_vector_t av );
I int security_av_string(security_class_t tclass , access_vector_t av , char ** result );
I security_class_t string_to_security_class(const char * name );
I access_vector_t string_to_av_perm(security_class_t tclass , const char * name );
DESCRIPTION
security_class_to_string
returns a string name for class
R tclass ,
or NULL if the class is invalid. The returned string must not be modified or freed.
security_av_perm_to_string
returns a string name for the access vector bit
av
of class
R tclass ,
or NULL if either argument is invalid. The returned string must not be modified or freed.
security_av_string
computes a full access vector string representation using
tclass
and
R av ,
which may have multiple bits set. The string is returned in the memory pointed to by
R result ,
and should be freed by the caller using
free(3).
string_to_security_class
returns the class value corresponding to the string name
R name ,
or zero if no such class exists.
string_to_av_perm
returns the access vector bit corresponding to the string name
name
and security class
R tclass ,
or zero if no such value exists.
RETURN VALUE
security_av_string
returns returns zero on success or -1 on error with
errno
set appropriately. All other functions return zero or NULL on error.
ERRORS
EINVAL
A class or access vector argument is not recognized by the currently loaded policy.
ENOMEM
An attempt to allocate memory failed.
AUTHOR
Eamon Walsh <ewalsh@tycho.nsa.gov>
SEE ALSO