AA\_FIND\_MOUNTPOINT(2) AppArmor AA\_FIND\_MOUNTPOINT(2)

# [NAME](#NAME)

aa\_is\_enabled - determine if apparmor is available

aa\_find\_mountpoint - find where the apparmor interface filesystem is mounted

# [SYNOPSIS](#SYNOPSIS)

**#include &lt;sys/apparmor.h&gt;**

**int aa\_is\_enabled(void);**

**int aa\_find\_mountpoint(char \*\*mnt);**

Link with **-lapparmor** when compiling.

# [DESCRIPTION](#DESCRIPTION)

The aa\_is\_enabled function returns [true (1)](/man/enterprise-packages/libapparmor/true.1) if apparmor is enabled. If it isn't it sets the [**errno**(3)](/man/enterprise-packages/libapparmor/errno.3) to reflect the reason it is not enabled and returns 0.

The aa\_find\_mountpoint function finds where the apparmor filesystem is mounted on the system, and returns a string containing the mount path. It is the caller's responsibility to [**free**(3)](/man/enterprise-packages/libapparmor/free.3) the returned path.

# [RETURN VALUE](#RETURN_VALUE)

**aa\_is\_enabled** On success 1 is returned. On error, 0 is returned, and [**errno**(3)](/man/enterprise-packages/libapparmor/errno.3) is set appropriately.

**aa\_find\_mountpoint** On success zero is returned. On error, -1 is returned, and [**errno**(3)](/man/enterprise-packages/libapparmor/errno.3) is set appropriately.

# [ERRORS](#ERRORS)

\# podchecker warns about duplicate link targets for EACCES, EBUSY, ENOENT, # and ENOMEM, but this is a warning that is safe to ignore.

**aa\_is\_enabled**

[**ENOSYS**](#ENOSYS)

AppArmor extensions to the system are not available.

[**ECANCELED**](#ECANCELED)

AppArmor is available on the system but has been disabled at boot.

[**EBUSY**](#EBUSY)

AppArmor is available but only via private interfaces.

[**ENOENT**](#ENOENT)

AppArmor is available (and maybe even enforcing policy) but the interface is not available.

[**ENOMEM**](#ENOMEM)

Insufficient memory was available.

[**EPERM**](#EPERM)

Did not have sufficient permissions to determine if AppArmor is enabled.

[**EACCES**](#EACCES)

Did not have sufficient permissions to determine if AppArmor is enabled.

[**EBUSY**](#EBUSY~2)

AppArmor is enabled but does not have access to shared interfaces, and only private interfaces are available.

**aa\_find\_mountpoint**

[**ENOMEM**](#ENOMEM~2)

Insufficient memory was available.

[**EACCES**](#EACCES~2)

Access to the required paths was denied.

[**ENOENT**](#ENOENT~2)

The apparmor filesystem mount could not be found

# [BUGS](#BUGS)

None known. If you find any, please report them at &lt;https://gitlab.com/apparmor/apparmor/-/issues&gt;.

# [SEE ALSO](#SEE_ALSO)

[**apparmor**(7)](/man/enterprise-packages/libapparmor/apparmor.7), [**apparmor.d**(5)](/man/enterprise-packages/libapparmor/apparmor.d.5), [**apparmor\_parser**(8)](/man/enterprise-packages/libapparmor/apparmor_parser.8), and &lt;https://wiki.apparmor.net&gt;.

2026-09-13 AppArmor 5.0.2

---

Document: aa_find_mountpoint(2) from libapparmor 5.0.2-r2 (Chainguard OS)
Source: https://gitlab.com/apparmor/apparmor.git
