.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "AA_FIND_MOUNTPOINT 2" .TH AA_FIND_MOUNTPOINT 2 2024-04-04 "AppArmor 3.1.7" AppArmor .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME aa_is_enabled \- determine if apparmor is available .PP aa_find_mountpoint \- find where the apparmor interface filesystem is mounted .SH SYNOPSIS .IX Header "SYNOPSIS" \&\fB#include \fR .PP \&\fBint aa_is_enabled(void);\fR .PP \&\fBint aa_find_mountpoint(char **mnt);\fR .PP Link with \fB\-lapparmor\fR when compiling. .SH DESCRIPTION .IX Header "DESCRIPTION" The aa_is_enabled function returns true (1) if apparmor is enabled. If it isn't it sets the \fBerrno\fR\|(3) to reflect the reason it is not enabled and returns 0. .PP 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 \fBfree\fR\|(3) the returned path. .SH "RETURN VALUE" .IX Header "RETURN VALUE" \&\fBaa_is_enabled\fR On success 1 is returned. On error, 0 is returned, and \fBerrno\fR\|(3) is set appropriately. .PP \&\fBaa_find_mountpoint\fR On success zero is returned. On error, \-1 is returned, and \fBerrno\fR\|(3) is set appropriately. .SH ERRORS .IX Header "ERRORS" \&\fBaa_is_enabled\fR .IP \fBENOSYS\fR 4 .IX Item "ENOSYS" AppArmor extensions to the system are not available. .IP \fBECANCELED\fR 4 .IX Item "ECANCELED" AppArmor is available on the system but has been disabled at boot. .IP \fBEBUSY\fR 4 .IX Item "EBUSY" AppArmor is available but only via private interfaces. .IP \fBENOENT\fR 4 .IX Item "ENOENT" AppArmor is available (and maybe even enforcing policy) but the interface is not available. .IP \fBENOMEM\fR 4 .IX Item "ENOMEM" Insufficient memory was available. .IP \fBEPERM\fR 4 .IX Item "EPERM" Did not have sufficient permissions to determine if AppArmor is enabled. .IP \fBEACCES\fR 4 .IX Item "EACCES" Did not have sufficient permissions to determine if AppArmor is enabled. .IP \fBEBUSY\fR 4 .IX Item "EBUSY" AppArmor is enabled but does not have access to shared interfaces, and only private interfaces are available. .PP \&\fBaa_find_mountpoint\fR .IP \fBENOMEM\fR 4 .IX Item "ENOMEM" Insufficient memory was available. .IP \fBEACCES\fR 4 .IX Item "EACCES" Access to the required paths was denied. .IP \fBENOENT\fR 4 .IX Item "ENOENT" The apparmor filesystem mount could not be found .SH BUGS .IX Header "BUGS" None known. If you find any, please report them at . .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBapparmor\fR\|(7), \fBapparmor.d\fR\|(5), \fBapparmor_parser\fR\|(8), and .