mirror of
git://github.com/lxc/lxc
synced 2025-08-31 13:09:32 +00:00
Merge pull request #2192 from brauner/2018-02-26/enable_pam_flag
configure: add --enable-pam
This commit is contained in:
41
configure.ac
41
configure.ac
@@ -607,6 +607,43 @@ else
|
||||
fi
|
||||
AM_CONDITIONAL([IS_BIONIC], [test "x$is_bionic" = "xyes"])
|
||||
|
||||
# Configuration examples
|
||||
AC_ARG_ENABLE([pam],
|
||||
[AC_HELP_STRING([--enable-pam], [enable pam module [default=no]])],
|
||||
[], [enable_pam=no])
|
||||
AM_CONDITIONAL([ENABLE_PAM], [test "x$enable_pam" = "xyes"])
|
||||
|
||||
AM_COND_IF([ENABLE_PAM],
|
||||
[AC_ARG_WITH(
|
||||
[pamdir],
|
||||
[AS_HELP_STRING([--with-pamdir=PATH],[Specify the directory where PAM modules are stored,
|
||||
or "none" if PAM modules are not to be built])],
|
||||
[pamdir="${withval}"],
|
||||
[
|
||||
if test "${prefix}" = "/usr"; then
|
||||
pamdir="/lib${libdir##*/lib}/security"
|
||||
else
|
||||
pamdir="\$(libdir)/security"
|
||||
fi
|
||||
]
|
||||
)])
|
||||
|
||||
AM_CONDITIONAL([HAVE_PAM], [test x"$pamdir" != "xnone"])
|
||||
AM_COND_IF([ENABLE_PAM],
|
||||
[if test "z$pamdir" != "znone"; then
|
||||
AC_ARG_VAR([PAM_CFLAGS], [C compiler flags for pam])
|
||||
AC_ARG_VAR([PAM_LIBS], [linker flags for pam])
|
||||
AC_CHECK_LIB(
|
||||
[pam],
|
||||
[pam_authenticate],
|
||||
[PAM_LIBS="-lpam"],
|
||||
[AC_MSG_ERROR([*** libpam not found.])
|
||||
])
|
||||
|
||||
AC_SUBST(PAM_LIBS)
|
||||
AC_SUBST([pamdir])
|
||||
fi])
|
||||
|
||||
# Some systems lack PR_CAPBSET_DROP definition => HAVE_DECL_PR_CAPBSET_DROP
|
||||
AC_CHECK_DECLS([PR_CAPBSET_DROP], [], [], [#include <sys/prctl.h>])
|
||||
|
||||
@@ -927,6 +964,10 @@ Security features:
|
||||
- seccomp: $enable_seccomp
|
||||
- SELinux: $enable_selinux
|
||||
|
||||
PAM:
|
||||
- PAM module: $enable_pam
|
||||
- cgroup PAM module: $pamdir
|
||||
|
||||
Bindings:
|
||||
- lua: $enable_lua
|
||||
- python3: $enable_python
|
||||
|
Reference in New Issue
Block a user