# This publication is intellectual property of Canonical Ltd. Its contents # can be duplicated, either in part or in whole, provided that a copyright # label is visibly located on each copy. # # All information found in this book has been compiled with utmost # attention to detail. However, this does not guarantee complete accuracy. # Neither Canonical Ltd, the authors, nor the translators shall be held # liable for possible errors or the consequences thereof. # # Many of the software and hardware descriptions cited in this book # are registered trademarks. All trade names are subject to copyright # restrictions and may be registered trade marks. Canonical Ltd. # essentially adhere to the manufacturer's spelling. # # Names of products and trademarks appearing in this book (with or without # specific notation) are likewise subject to trademark and trade protection # laws and may thus fall under copyright restrictions. # =pod =head1 NAME aa_is_enabled - determine if apparmor is available aa_find_mountpoint - find where the apparmor interface filesystem is mounted =head1 SYNOPSIS B<#include Esys/apparmor.hE> B B Link with B<-lapparmor> when compiling. =head1 DESCRIPTION The aa_is_enabled function returns true (1) if apparmor is enabled. If it isn't it sets the 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) the returned path. =head1 RETURN VALUE B On success 1 is returned. On error, 0 is returned, and errno(3) is set appropriately. B On success zero is returned. On error, -1 is returned, and errno(3) is set appropriately. =head1 ERRORS B =over 4 =item B AppArmor extensions to the system are not available. =item B AppArmor is available on the system but has been disabled at boot. =item B AppArmor is available (and maybe even enforcing policy) but the interface is not available. =item B Insufficient memory was available. =item B Did not have sufficient permissions to determine if AppArmor is enabled. =item B Did not have sufficient permissions to determine if AppArmor is enabled. =item B AppArmor is enabled but does not have access to shared interfaces, and only private interfaces are available. =back B =over 4 =item B Insufficient memory was available. =item B Access to the required paths was denied. =item B The apparmor filesystem mount could not be found =back =head1 BUGS None known. If you find any, please report them at L. =head1 SEE ALSO apparmor(7), apparmor.d(5), apparmor_parser(8), and L. =cut