MAC_IS_PRESENT(3)
π MAC_IS_PRESENT π
ok so bestie, welcome to mac_is_present β it's section 3 of the manual, and it lives in the Standard C Library (libc, link it with -lc). Its whole entire job? Telling you whether the system you're running on right now has MAC support. That's it. That's the gig. π
β¨ NAME β¨
mac_is_present β report whether the running system has MAC support. literally just a yes/no girlie, and she does it flawlessly. π
πΈ LIBRARY πΈ
Standard C Library (libc, -lc) β she's built in, no extra downloads, no cap. π«Ά
π¦ SYNOPSIS π¦
#include <sys/mac.h>
int
mac_is_present(const char *policyname);
that's the whole incantation, mwah π
π DESCRIPTION π
okay so mac_is_present() is the function that determines whether the currently-running kernel supports MAC for a given policy or not. vibe check on the kernel itself. π
Here's the tea on the argument:
- If
policynameis non-NULL, then the presence of the named policy gets checked β think names like"biba","mls","te". π - If
policynameisNULL, then it checks the presence of any MAC policies at all. like, does this system have any MAC energy whatsoever? π
π₯ RETURN VALUES π₯
1β slay! the system supports the given MAC policy. β0β nope, the specified MAC policy is not supported. π-1β something went wrong, an error occurred. π
π ERRORS π
[EINVAL]β the value ofpolicynameis not valid. bestie what did you even type π[ENOMEM]β insufficient memory was available to allocate internal storage. the system is out of room, no notes π«
β SEE ALSO β
the whole friend group, go say hi:
π§ HISTORY π§
Support for Mandatory Access Control was introduced in FreeBSD 5.0 as part of the TrustedBSD Project. iconic behavior honestly, we love a glow-up origin story π
and that's the page!! this beauty shipped with Debian, dated July 7, 2006 β yes she's an elder but she's still serving π π bye bestie, go check your policies π¦
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 2002 Networks Associates Technology, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms