---
name: "mac_is_present"
section: "3"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd"]
url: "https://new.carta.tech/mac_is_present"
---

# mac\_is\_present(3)

report whether the running system has MAC support

## NAME

**mac\_is\_present** – report whether the running system has MAC support

## LIBRARY

Standard C Library (libc, -lc)

## SYNOPSIS

**#include \<sys/mac.h\>**

*int*\

**mac\_is\_present**(*const char \*policyname*);

## DESCRIPTION

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.

## SEE ALSO

[mac(3)](/mac/3.md), [mac\_free(3)](/mac_free/3.md), [mac\_get(3)](/mac_get/3.md), [mac\_prepare(3)](/mac_prepare/3.md), [mac\_set(3)](/mac_set/3.md), [mac\_text(3)](/mac_text/3.md), [mac(4)](/mac/4.md), [mac(9)](/mac/9.md)

## HISTORY

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