mac_is_present3
Report whether the running system has mac support
Usage
#include <sys/mac.h>
int
mac_is_present(const char *policyname);
Library
Standard C Library (libc, -lc)
Overview
The 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. “biba”, “mls”, “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.
Errors
- [EINVAL]
-
The value of policyname is not valid.
- [ENOMEM]
-
Insufficient memory was available to allocate internal storage.
Releases
44 releases since FreeBSD 7.0-RELEASE; the text changed 30 times.