AA_FIND_MOUNTPOINT(2)

πŸ’… AA_FIND_MOUNTPOINT(2) β€” the AppArmor girlies' guide ✨

okay so this is a page from the AppArmor manual, section 2 (that's the syscalls/libc functions girlies, iykyk), and it's all about two lil functions: aa_is_enabled and aa_find_mountpoint. yes bestie, both of them live here, we're sharing a page, it's giving roommate energy 🫢


🌸 NAME 🌸

  • aa_is_enabled β€” literally just tells you if AppArmor is available. vibe check for the kernel.
  • aa_find_mountpoint β€” finds where the AppArmor interface filesystem is mounted. like a Where's Waldo but the Waldo is a mount path πŸ¦‹

✨ SYNOPSIS ✨

#include <sys/apparmor.h>

int aa_is_enabled(void);

int aa_find_mountpoint(char **mnt);

and listen, when you compile, you gotta link with -lapparmor. no cap, that's non-negotiable πŸ’…


πŸ’– DESCRIPTION πŸ’–

so, the aa_is_enabled function returns true (that's 1, bestie β€” 1!) if AppArmor is enabled. and if it isn't enabled? it sets the errno(3) to reflect the reason it's not enabled and returns 0. so you get the why, which is honestly so thoughtful of it πŸ₯Ή

and the aa_find_mountpoint function finds where the AppArmor filesystem is mounted on the system, and returns a string containing the mount path. but β€” and this is the part where you gotta pay attention β€” it is the caller's responsibility to free(3) the returned path. that memory is yours now. you asked for it, you clean it up. main character responsibility πŸ”₯


🌈 RETURN VALUE 🌈

aa_is_enabled β€” on success, 1 is returned. slay. on error, 0 is returned, and the errno(3) is set appropriately.

aa_find_mountpoint β€” on success, zero is returned. on error, -1 is returned, and the errno(3) is set appropriately.

not me keeping track of which one returns 1/0 and which one returns 0/-1 β€” they're different, bestie, don't mix them up 😭


πŸŽ€ ERRORS πŸŽ€

πŸ‘‘ aa_is_enabled

  • ENOSYS β€” the AppArmor extensions to the system are not available. it's not here. she's not coming. πŸ’€
  • ECANCELED β€” AppArmor is available on the system but has been disabled at boot. so close and yet so far πŸ₯²
  • EBUSY β€” AppArmor is available but only via private interfaces. lowkey available, highkey not really.
  • ENOENT β€” AppArmor is available (and maybe even enforcing policy) but the interface is not available. the girl is employed but not answering her phone πŸ“΅
  • ENOMEM β€” insufficient memory was available. the system is broke, respectfully.
  • EPERM β€” did not have sufficient permissions to determine if AppArmor is enabled. you don't have the pass βœ‹
  • EACCES β€” did not have sufficient permissions to determine if AppArmor is enabled. same energy, different errno, periodt.
  • EBUSY β€” AppArmor is enabled but does not have access to shared interfaces, and only private interfaces are available. yes this is the second EBUSY on the list and no we're not going to question it, it's just built different πŸ’…

πŸ¦‹ aa_find_mountpoint

  • ENOMEM β€” insufficient memory was available. again. babe is going through it.
  • EACCES β€” access to the required paths was denied. not on the guest list.
  • ENOENT β€” the apparmor filesystem mount could not be found. it's not there. we looked. we checked twice. 🌸

πŸ™ˆ BUGS πŸ™ˆ

none known. ✨ and if you do find any, please report them at https://gitlab.com/apparmor/apparmor/-/issues.

like, tell on it. constructively. the devs literally want to know, that's so unproblematic of them 🫢


⭐ SEE ALSO ⭐

apparmor(7), apparmor.d(5), apparmor_parser(8), and https://wiki.apparmor.net.

go read, bestie. iykyk. πŸ“š


okay that's the whole page, mwah πŸ’‹ β€” this was AppArmor 4.1.8, dated 2026-10-18, brought to you by the AA_FIND_MOUNTPOINT(2) girlies in the AppArmor section. drink water, free your pointers, and stay enabled βœ¨πŸ’–πŸŽ€

πŸ“¦ where this page comes from
  • arch rolling: apparmor 4.1.8-2 Β· GPL-2.0-only AND LGPL-2.0-only AND LGPL-2.1-only
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms