man.bsd.lv manual page server

Manual Page Search Parameters

MAC_IS_PRESENT(3) Library Functions Manual MAC_IS_PRESENT(3)

mac_is_presentreport whether the running system has MAC support

library “libc”

#include <sys/mac.h>

int
mac_is_present(const char *policyname);

The () 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. “biba”, “mls”, “te”) is checked, otherwise the presence of any MAC policies at all is checked.

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.

mac(3), mac_free(3), mac_get(3), mac_prepare(3), mac_set(3), mac_text(3), mac(4), mac(9)

Support for Mandatory Access Control was introduced in FreeBSD 5.0 as part of the TrustedBSD Project.

July 7, 2006 FreeBSD-12.0