summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorYi Zhao <yi.zhao@eng.windriver.com>2025-01-03 17:24:43 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-01-04 12:34:04 +0000
commite2e26a16190f7915e57f3c4df6c7bfc6368db109 (patch)
treeb5e58e8d07ea7949a061c8e72826d236f3fbb8b5 /meta
parente71a52a528b7737ef0939466c1b7359349dd0118 (diff)
downloadpoky-e2e26a16190f7915e57f3c4df6c7bfc6368db109.tar.gz
libpam: set pam module path to ${base_libdir}/security
After upgrading to 1.7.0, the pam module path is set to ${libdir}/security[1]. But from the pam.conf(5) man page, the default location seems to be "Module location: /lib/security/ or /lib64/security/, depending on the architecture"[2]. Many third-party pam modules still use {base_libdir}/security as the default module path, such as pam_lastlog2 (from util-linux), pam_cgroup (from libcgroup), pam_cap (from libcap), etc. So currently if you don't use the absolute path to these modules in the files in /etc/pam.d/, they will not be found: PAM unable to dlopen(/usr/lib/security/pam_lastlog2.so): /usr/lib/security/pam_lastlog2.so: cannot open shared object file: No such file or directory This change only affects sysvinit without usrmerge feature enabled, and has no effect on systems using systemd. [1] https://git.openembedded.org/openembedded-core/commit/?id=00eb730291f9630eb70480d37ed48fbadecc547a [2] https://www.man7.org/linux/man-pages/man5/pam.conf.5.html (From OE-Core rev: bc307ac262956a763fb68d621fb6463b1460bf59) Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-extended/pam/libpam_1.7.0.bb8
1 files changed, 4 insertions, 4 deletions
diff --git a/meta/recipes-extended/pam/libpam_1.7.0.bb b/meta/recipes-extended/pam/libpam_1.7.0.bb
index 53839e8cd3..1be3c9e2bb 100644
--- a/meta/recipes-extended/pam/libpam_1.7.0.bb
+++ b/meta/recipes-extended/pam/libpam_1.7.0.bb
@@ -29,7 +29,7 @@ SRC_URI[sha256sum] = "57dcd7a6b966ecd5bbd95e1d11173734691e16b68692fa59661cdae9b1
29 29
30DEPENDS = "bison-native flex-native libxml2-native virtual/crypt" 30DEPENDS = "bison-native flex-native libxml2-native virtual/crypt"
31 31
32EXTRA_OEMESON = "-Ddocs=disabled" 32EXTRA_OEMESON = "-Ddocs=disabled -Dsecuredir=${base_libdir}/security"
33 33
34S = "${WORKDIR}/Linux-PAM-${PV}" 34S = "${WORKDIR}/Linux-PAM-${PV}"
35 35
@@ -45,7 +45,7 @@ FILES:${PN} = " \
45 ${libdir}/lib*${SOLIBS} \ 45 ${libdir}/lib*${SOLIBS} \
46 ${nonarch_libdir}/tmpfiles.d/*.conf \ 46 ${nonarch_libdir}/tmpfiles.d/*.conf \
47" 47"
48FILES:${PN}-dev += "${libdir}/security/*.la ${libdir}/*.la ${libdir}/lib*${SOLIBSDEV}" 48FILES:${PN}-dev += "${base_libdir}/security/*.la ${libdir}/*.la ${libdir}/lib*${SOLIBSDEV}"
49FILES:${PN}-runtime = "${sysconfdir} ${sbindir} ${nonarch_libdir}/systemd/system" 49FILES:${PN}-runtime = "${sysconfdir} ${sbindir} ${nonarch_libdir}/systemd/system"
50FILES:${PN}-xtests = "${datadir}/Linux-PAM/xtests" 50FILES:${PN}-xtests = "${datadir}/Linux-PAM/xtests"
51 51
@@ -105,9 +105,9 @@ python populate_packages:prepend () {
105 105
106 mlprefix = d.getVar('MLPREFIX') or '' 106 mlprefix = d.getVar('MLPREFIX') or ''
107 dvar = d.expand('${WORKDIR}/package') 107 dvar = d.expand('${WORKDIR}/package')
108 pam_libdir = d.expand('${libdir}/security') 108 pam_libdir = d.expand('${base_libdir}/security')
109 pam_sbindir = d.expand('${sbindir}') 109 pam_sbindir = d.expand('${sbindir}')
110 pam_filterdir = d.expand('${libdir}/security/pam_filter') 110 pam_filterdir = d.expand('${base_libdir}/security/pam_filter')
111 pam_pkgname = mlprefix + 'pam-plugin%s' 111 pam_pkgname = mlprefix + 'pam-plugin%s'
112 112
113 do_split_packages(d, pam_libdir, r'^pam(.*)\.so$', pam_pkgname, 113 do_split_packages(d, pam_libdir, r'^pam(.*)\.so$', pam_pkgname,