|| FreeBSD Library Functions Manual
report whether the running system has MAC support
Standard C Library (libc, -lc)
#include < sys/mac.h>
mac_is_present( const char *policyname);
mac_is_present() function determines whether the currently-running kernel supports MAC for a given policy or not. If
policyname is non-
NULL, the presence of the named policy (e.g. “
te”) is checked, otherwise the presence of any MAC policies at all is checked.
RETURN VALUES If the system supports the given MAC policy, the value 1 is returned. If the specified MAC policy is not supported, the value 0 is returned. If an error occurs, the value -1 is returned.
The value of
policyname is not valid.
Insufficient memory was available to allocate internal storage.
HISTORY Support for Mandatory Access Control was introduced in
FreeBSD 5.0 as part of the TrustedBSD Project.