2010-11-24 00:41:49 +00:00
|
|
|
SUMMARY = "Linux-PAM (Pluggable Authentication Modules)"
|
2012-01-12 22:11:49 +00:00
|
|
|
DESCRIPTION = "Linux-PAM (Pluggable Authentication Modules for Linux), a flexible mechanism for authenticating users"
|
|
|
|
HOMEPAGE = "https://fedorahosted.org/linux-pam/"
|
|
|
|
BUGTRACKER = "https://fedorahosted.org/linux-pam/newticket"
|
2010-11-24 00:41:49 +00:00
|
|
|
SECTION = "base"
|
|
|
|
# PAM is dual licensed under GPL and BSD.
|
2010-08-03 07:53:38 +00:00
|
|
|
# /etc/pam.d comes from Debian libpam-runtime in 2009-11 (at that time
|
|
|
|
# libpam-runtime-1.0.1 is GPLv2+), by openembedded
|
|
|
|
LICENSE = "GPLv2+ | BSD"
|
2012-08-18 04:56:41 +00:00
|
|
|
LIC_FILES_CHKSUM = "file://COPYING;md5=7eb5c1bf854e8881005d673599ee74d3"
|
2010-11-24 00:41:49 +00:00
|
|
|
|
2012-08-18 04:56:41 +00:00
|
|
|
SRC_URI = "http://linux-pam.org/library/Linux-PAM-${PV}.tar.bz2 \
|
2010-08-03 07:53:38 +00:00
|
|
|
file://99_pam \
|
2013-05-29 15:09:47 +00:00
|
|
|
file://pam.d/common-account \
|
|
|
|
file://pam.d/common-auth \
|
|
|
|
file://pam.d/common-password \
|
|
|
|
file://pam.d/common-session \
|
|
|
|
file://pam.d/common-session-noninteractive \
|
|
|
|
file://pam.d/other \
|
2012-07-04 20:12:38 +00:00
|
|
|
file://libpam-xtests.patch \
|
2012-08-19 12:30:07 +00:00
|
|
|
file://destdirfix.patch \
|
2013-03-21 14:19:03 +00:00
|
|
|
file://fixsepbuild.patch \
|
2013-04-17 09:00:25 +00:00
|
|
|
file://reflect-the-enforce_for_root-semantics-change-in-pam.patch \
|
|
|
|
file://add-checks-for-crypt-returning-NULL.patch \
|
2013-06-19 03:21:29 +00:00
|
|
|
file://libpam-fix-for-CVE-2010-4708.patch \
|
2013-07-18 02:04:22 +00:00
|
|
|
file://pam-security-abstract-securetty-handling.patch \
|
|
|
|
file://pam-unix-nullok-secure.patch \
|
2012-07-04 20:12:38 +00:00
|
|
|
"
|
2012-08-18 04:56:41 +00:00
|
|
|
SRC_URI[md5sum] = "7b73e58b7ce79ffa321d408de06db2c4"
|
|
|
|
SRC_URI[sha256sum] = "bab887d6280f47fc3963df3b95735a27a16f0f663636163ddf3acab5f1149fc2"
|
2010-08-03 07:53:38 +00:00
|
|
|
|
2011-04-01 03:45:29 +00:00
|
|
|
SRC_URI_append_libc-uclibc = " file://pam-no-innetgr.patch"
|
|
|
|
|
2012-01-12 22:11:49 +00:00
|
|
|
DEPENDS = "bison flex flex-native cracklib"
|
2010-11-24 00:41:49 +00:00
|
|
|
|
2010-08-03 07:53:38 +00:00
|
|
|
EXTRA_OECONF = "--with-db-uniquename=_pam \
|
|
|
|
--includedir=${includedir}/security \
|
|
|
|
--libdir=${base_libdir} \
|
2012-08-03 08:21:30 +00:00
|
|
|
--disable-nis \
|
2013-09-23 16:34:01 +00:00
|
|
|
--disable-regenerate-docu \
|
|
|
|
--disable-prelude"
|
2012-01-12 22:11:49 +00:00
|
|
|
|
2010-08-03 07:53:38 +00:00
|
|
|
CFLAGS_append = " -fPIC "
|
|
|
|
|
2013-07-18 02:04:22 +00:00
|
|
|
PR = "r3"
|
2012-08-19 12:30:07 +00:00
|
|
|
|
2010-08-03 07:53:38 +00:00
|
|
|
S = "${WORKDIR}/Linux-PAM-${PV}"
|
|
|
|
|
2013-07-05 00:49:54 +00:00
|
|
|
inherit autotools gettext pkgconfig
|
2010-08-03 07:53:38 +00:00
|
|
|
|
2013-08-23 17:42:38 +00:00
|
|
|
PACKAGECONFIG[audit] = "--enable-audit,--disable-audit,audit,"
|
|
|
|
|
2011-07-19 09:08:31 +00:00
|
|
|
PACKAGES += "${PN}-runtime ${PN}-xtests"
|
2010-08-03 07:53:38 +00:00
|
|
|
FILES_${PN} = "${base_libdir}/lib*${SOLIBS}"
|
|
|
|
FILES_${PN}-dbg += "${base_libdir}/security/.debug \
|
2011-07-27 15:21:31 +00:00
|
|
|
${base_libdir}/security/pam_filter/.debug \
|
|
|
|
${datadir}/Linux-PAM/xtests/.debug"
|
|
|
|
|
2010-08-03 07:53:38 +00:00
|
|
|
FILES_${PN}-dev += "${base_libdir}/security/*.la ${base_libdir}/*.la ${base_libdir}/lib*${SOLIBSDEV}"
|
|
|
|
FILES_${PN}-runtime = "${sysconfdir}"
|
2011-07-19 09:08:31 +00:00
|
|
|
FILES_${PN}-xtests = "${datadir}/Linux-PAM/xtests"
|
2010-08-03 07:53:38 +00:00
|
|
|
|
2012-10-12 10:46:38 +00:00
|
|
|
PACKAGES_DYNAMIC += "^pam-plugin-.*"
|
2010-08-03 07:53:38 +00:00
|
|
|
|
2012-01-12 22:11:49 +00:00
|
|
|
RDEPENDS_${PN}-runtime = "libpam pam-plugin-deny pam-plugin-permit pam-plugin-warn pam-plugin-unix"
|
|
|
|
RDEPENDS_${PN}-xtests = "libpam pam-plugin-access pam-plugin-debug pam-plugin-cracklib pam-plugin-pwhistory pam-plugin-succeed-if pam-plugin-time coreutils"
|
|
|
|
RRECOMMENDS_${PN} = "libpam-runtime"
|
|
|
|
|
2010-08-03 07:53:38 +00:00
|
|
|
python populate_packages_prepend () {
|
2012-07-11 17:33:43 +00:00
|
|
|
def pam_plugin_append_file(pn, dir, file):
|
|
|
|
nf = os.path.join(dir, file)
|
|
|
|
of = d.getVar('FILES_' + pn, True)
|
|
|
|
if of:
|
|
|
|
nf = of + " " + nf
|
|
|
|
d.setVar('FILES_' + pn, nf)
|
|
|
|
|
|
|
|
dvar = bb.data.expand('${WORKDIR}/package', d, True)
|
|
|
|
pam_libdir = d.expand('${base_libdir}/security')
|
|
|
|
pam_sbindir = d.expand('${sbindir}')
|
|
|
|
pam_filterdir = d.expand('${base_libdir}/security/pam_filter')
|
|
|
|
|
|
|
|
do_split_packages(d, pam_libdir, '^pam(.*)\.so$', 'pam-plugin%s', 'PAM plugin for %s', extra_depends='')
|
2012-12-20 23:01:18 +00:00
|
|
|
mlprefix = d.getVar('MLPREFIX', True) or ''
|
|
|
|
pam_plugin_append_file('%spam-plugin-unix' % mlprefix, pam_sbindir, 'unix_chkpwd')
|
|
|
|
pam_plugin_append_file('%spam-plugin-unix' % mlprefix, pam_sbindir, 'unix_update')
|
|
|
|
pam_plugin_append_file('%spam-plugin-tally' % mlprefix, pam_sbindir, 'pam_tally')
|
|
|
|
pam_plugin_append_file('%spam-plugin-tally2' % mlprefix, pam_sbindir, 'pam_tally2')
|
|
|
|
pam_plugin_append_file('%spam-plugin-timestamp' % mlprefix, pam_sbindir, 'pam_timestamp_check')
|
|
|
|
pam_plugin_append_file('%spam-plugin-mkhomedir' % mlprefix, pam_sbindir, 'mkhomedir_helper')
|
2012-07-11 17:33:43 +00:00
|
|
|
do_split_packages(d, pam_filterdir, '^(.*)$', 'pam-filter-%s', 'PAM filter for %s', extra_depends='')
|
2010-08-03 07:53:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
do_install() {
|
|
|
|
autotools_do_install
|
|
|
|
|
|
|
|
# don't install /var/run when populating rootfs. Do it through volatile
|
2012-08-05 19:48:47 +00:00
|
|
|
rm -rf ${D}${localstatedir}
|
2010-08-03 07:53:38 +00:00
|
|
|
install -d ${D}${sysconfdir}/default/volatiles
|
2012-08-05 19:48:47 +00:00
|
|
|
install -m 0644 ${WORKDIR}/99_pam ${D}${sysconfdir}/default/volatiles
|
2010-08-03 07:53:38 +00:00
|
|
|
|
|
|
|
install -d ${D}${sysconfdir}/pam.d/
|
|
|
|
install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/
|
2011-08-20 07:30:32 +00:00
|
|
|
|
2013-06-20 16:38:23 +00:00
|
|
|
# The lsb requires unix_chkpwd has setuid permission
|
|
|
|
chmod 4755 ${D}${sbindir}/unix_chkpwd
|
2013-09-19 15:03:21 +00:00
|
|
|
|
|
|
|
if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then
|
|
|
|
echo "session optional pam_systemd.so" >> ${D}${sysconfdir}/pam.d/common-session
|
|
|
|
fi
|
2011-08-20 07:30:32 +00:00
|
|
|
}
|
2013-06-20 16:38:24 +00:00
|
|
|
|
|
|
|
python do_pam_sanity () {
|
|
|
|
if "pam" not in d.getVar("DISTRO_FEATURES", True).split():
|
|
|
|
bb.warn("Building libpam but 'pam' isn't in DISTRO_FEATURES, PAM won't work correctly")
|
|
|
|
}
|
|
|
|
addtask pam_sanity before do_configure
|