aboutsummaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorJason Zaman <jason@perfinion.com>2014-10-30 10:22:02 +0800
committerWilliam Hubbs <w.d.hubbs@gmail.com>2014-11-03 09:31:25 -0600
commit1932360adca3f9fe9b47bcfad7b8bd5efbd33bee (patch)
tree48a6bcb311746736976c0650cf49ac567aaf42ae /mk
parentbe952bebb3647069fb93b9791ee3439698f697ca (diff)
Integrate the functionality from runscript_selinux.so
runscript used to dlopen() runscript_selinux.so. This adds equivalent functionality directly in to runscript instead. It authenticates with either PAM or shadow and optionally has a dep on audit. X-Gentoo-Bug: 517450 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=517450
Diffstat (limited to 'mk')
-rw-r--r--mk/os-Linux.mk15
-rw-r--r--mk/pam.mk6
2 files changed, 20 insertions, 1 deletions
diff --git a/mk/os-Linux.mk b/mk/os-Linux.mk
index dc76b968..bb6fa372 100644
--- a/mk/os-Linux.mk
+++ b/mk/os-Linux.mk
@@ -9,6 +9,19 @@ LIBDL= -Wl,-Bdynamic -ldl
ifeq (${MKSELINUX},yes)
CPPFLAGS+= -DHAVE_SELINUX
-LIBSELINUX= -lselinux
+LIBSELINUX?= -lselinux
LDADD += $(LIBSELINUX)
+
+ifneq (${MKPAM},pam)
+# if using selinux but not pam then we need crypt
+LIBCRYPT?= -lcrypt
+LDADD += $(LIBCRYPT)
+endif
+
+endif
+
+ifeq (${MKAUDIT},yes)
+LIBAUDIT?= -laudit
+CPPFLAGS+= -DHAVE_AUDIT
+LDADD+= ${LIBAUDIT}
endif
diff --git a/mk/pam.mk b/mk/pam.mk
index 15ffb546..199896cc 100644
--- a/mk/pam.mk
+++ b/mk/pam.mk
@@ -3,6 +3,12 @@ LIBPAM?= -lpam
CPPFLAGS+= -DHAVE_PAM
LDADD+= ${LIBPAM}
+ifeq (${MKSELINUX},yes)
+# with selinux, pam_misc is needed too
+LIBPAM_MISC?= -lpam_misc
+LDADD+= ${LIBPAM_MISC}
+endif
+
PAMDIR?= /etc/pam.d
PAMMODE?= 0644
else ifneq (${MKPAM},)