Mercurial > dovecot > core-2.2
comparison m4/want_apparmor.m4 @ 22444:280d78e7fec8
apparmor: Add apparmor plugin
It lets dovecot temporarily switch to a new apparmor
context for a user.
author | Aki Tuomi <aki.tuomi@dovecot.fi> |
---|---|
date | Thu, 13 Jul 2017 10:02:26 +0300 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
22443:6ad4c4203dba | 22444:280d78e7fec8 |
---|---|
1 AC_DEFUN([DOVECOT_WANT_APPARMOR], [ | |
2 want_apparmor=auto | |
3 AC_ARG_WITH([apparmor], | |
4 [AS_HELP_STRING([--with-apparmor], [enable apparmor plugin (default=auto)])], | |
5 [want_apparmor=$withval]) | |
6 | |
7 have_apparmor=no | |
8 if test $want_apparmor != no; then | |
9 AC_CHECK_HEADER([sys/apparmor.h], [ | |
10 AC_CHECK_LIB([apparmor], [aa_change_hat], [ | |
11 have_apparmor=yes | |
12 AC_SUBST([APPARMOR_LIBS], [-lapparmor]) | |
13 ]) | |
14 ]) | |
15 fi | |
16 | |
17 if test $want_apparmor = yes; then | |
18 if test $have_apparmor = no; then | |
19 AC_MSG_FAILURE([apparmor was not found]) | |
20 fi | |
21 fi | |
22 | |
23 AM_CONDITIONAL(HAVE_APPARMOR, test "$have_apparmor" = "yes") | |
24 ]) |