Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
d4feae43
Unverified
Commit
d4feae43
authored
Feb 26, 2018
by
Stéphane Graber
Committed by
GitHub
Feb 26, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2192 from brauner/2018-02-26/enable_pam_flag
configure: add --enable-pam
parents
378ad0a0
f7a8609f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
0 deletions
+60
-0
configure.ac
configure.ac
+41
-0
Makefile.am
src/lxc/Makefile.am
+19
-0
pam_cgfs.c
src/lxc/pam/pam_cgfs.c
+0
-0
No files found.
configure.ac
View file @
d4feae43
...
...
@@ -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
...
...
src/lxc/Makefile.am
View file @
d4feae43
...
...
@@ -305,6 +305,16 @@ init_lxc_static_LDADD = @CAP_LIBS@
init_lxc_static_CFLAGS
=
$(AM_CFLAGS)
-DNO_LXC_CONF
endif
if
ENABLE_PAM
if
HAVE_PAM
pam_LTLIBRARIES
=
pam_cgfs.la
pam_cgfs_la_SOURCES
=
pam/pam_cgfs.c macro.h
pam_cgfs_la_CFLAGS
=
$(AM_CFLAGS)
pam_cgfs_la_LIBADD
=
$(AM_LIBS)
$(PAM_LIBS)
-L
$(top_srcdir)
pam_cgfs_la_LDFLAGS
=
$(AM_LDFLAGS)
-module
-avoid-version
-shared
endif
endif
install-exec-local
:
install-libLTLIBRARIES
mkdir
-p
$(DESTDIR)$(datadir)
/lxc
install
-c
-m
644 lxc.functions
$(DESTDIR)$(datadir)
/lxc
...
...
@@ -319,3 +329,12 @@ install-exec-hook:
uninstall-local
:
$(RM)
$(DESTDIR)$(libdir)
/liblxc.so
*
if
ENABLE_PAM
if
HAVE_PAM
$(RM)
$(DESTDIR)$(pamdir)/pam_cgfs.so*
install-data-hook
:
install-pamLTLIBRARIES
$(RM)
"
$(DESTDIR)$(pamdir)
/pam_cgfs.la"
$(RM)
"
$(DESTDIR)$(pamdir)
/pam_cgfs.a"
endif
endif
src/lxc/pam/pam_cgfs.c
0 → 100644
View file @
d4feae43
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment