summaryrefslogtreecommitdiff
path: root/Linux-PAM/modules/pam_namespace
diff options
context:
space:
mode:
authorSteve Langasek <steve.langasek@ubuntu.com>2019-01-03 16:09:38 -0800
committerSteve Langasek <steve.langasek@ubuntu.com>2019-01-03 16:09:38 -0800
commit03398c56c56ed427818d2ce879d45d1009f7d46b (patch)
tree9a7bc0d7d15ac988ac9ad31ad18a769030faced7 /Linux-PAM/modules/pam_namespace
parente78677298d54010c3a62b932baefdae152fd0fed (diff)
parent281e859131adad49301befbc50cfc5cd282c6937 (diff)
merge upstream version 0.99.9.0
Diffstat (limited to 'Linux-PAM/modules/pam_namespace')
-rw-r--r--Linux-PAM/modules/pam_namespace/Makefile.am4
-rw-r--r--Linux-PAM/modules/pam_namespace/Makefile.in7
-rw-r--r--Linux-PAM/modules/pam_namespace/pam_namespace.c5
3 files changed, 9 insertions, 7 deletions
diff --git a/Linux-PAM/modules/pam_namespace/Makefile.am b/Linux-PAM/modules/pam_namespace/Makefile.am
index bbcb2f70..002678ba 100644
--- a/Linux-PAM/modules/pam_namespace/Makefile.am
+++ b/Linux-PAM/modules/pam_namespace/Makefile.am
@@ -22,8 +22,7 @@ secureconfdir = $(SCONFIGDIR)
AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \
-DPAM_NAMESPACE_CONFIG=\"$(SCONFIGDIR)/namespace.conf\"
-AM_LDFLAGS = -no-undefined -avoid-version -module \
- -L$(top_builddir)/libpam -lpam @LIBSELINUX@
+AM_LDFLAGS = -no-undefined -avoid-version -module
if HAVE_VERSIONING
AM_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map
endif
@@ -31,6 +30,7 @@ endif
if HAVE_UNSHARE
securelib_LTLIBRARIES = pam_namespace.la
pam_namespace_la_SOURCES = pam_namespace.c pam_namespace.h md5.c md5.h
+pam_namespace_la_LIBADD = -L$(top_builddir)/libpam -lpam @LIBSELINUX@
secureconf_DATA = namespace.conf
secureconf_SCRIPTS = namespace.init
diff --git a/Linux-PAM/modules/pam_namespace/Makefile.in b/Linux-PAM/modules/pam_namespace/Makefile.in
index 8beee4ce..89244535 100644
--- a/Linux-PAM/modules/pam_namespace/Makefile.in
+++ b/Linux-PAM/modules/pam_namespace/Makefile.in
@@ -69,7 +69,7 @@ am__installdirs = "$(DESTDIR)$(securelibdir)" \
"$(DESTDIR)$(man8dir)" "$(DESTDIR)$(secureconfdir)"
securelibLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(securelib_LTLIBRARIES)
-pam_namespace_la_LIBADD =
+pam_namespace_la_DEPENDENCIES =
am__pam_namespace_la_SOURCES_DIST = pam_namespace.c pam_namespace.h \
md5.c md5.h
@HAVE_UNSHARE_TRUE@am_pam_namespace_la_OBJECTS = pam_namespace.lo \
@@ -189,6 +189,7 @@ POSUB = @POSUB@
RANLIB = @RANLIB@
SCONFIGDIR = @SCONFIGDIR@
SECUREDIR = @SECUREDIR@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
@@ -270,10 +271,10 @@ secureconfdir = $(SCONFIGDIR)
AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \
-DPAM_NAMESPACE_CONFIG=\"$(SCONFIGDIR)/namespace.conf\"
-AM_LDFLAGS = -no-undefined -avoid-version -module \
- -L$(top_builddir)/libpam -lpam @LIBSELINUX@ $(am__append_1)
+AM_LDFLAGS = -no-undefined -avoid-version -module $(am__append_1)
@HAVE_UNSHARE_TRUE@securelib_LTLIBRARIES = pam_namespace.la
@HAVE_UNSHARE_TRUE@pam_namespace_la_SOURCES = pam_namespace.c pam_namespace.h md5.c md5.h
+@HAVE_UNSHARE_TRUE@pam_namespace_la_LIBADD = -L$(top_builddir)/libpam -lpam @LIBSELINUX@
@HAVE_UNSHARE_TRUE@secureconf_DATA = namespace.conf
@HAVE_UNSHARE_TRUE@secureconf_SCRIPTS = namespace.init
@HAVE_UNSHARE_TRUE@TESTS = tst-pam_namespace
diff --git a/Linux-PAM/modules/pam_namespace/pam_namespace.c b/Linux-PAM/modules/pam_namespace/pam_namespace.c
index 73d8e591..d3612f59 100644
--- a/Linux-PAM/modules/pam_namespace/pam_namespace.c
+++ b/Linux-PAM/modules/pam_namespace/pam_namespace.c
@@ -589,8 +589,9 @@ static int poly_name(const struct polydir_s *polyptr, char **i_name,
#ifdef WITH_SELINUX
*i_context = NULL;
*origcon = NULL;
- if ((rc=form_context(polyptr, i_context, origcon, idata)) != PAM_SUCCESS) {
- return rc;
+ if ((idata->flags & PAMNS_SELINUX_ENABLED) &&
+ (rc=form_context(polyptr, i_context, origcon, idata)) != PAM_SUCCESS) {
+ return rc;
}
#endif