Skip to contentSkip to conversation

PAM sanity

PATCH New Ross Burton 1 participant 3 messages Jun 20, 2013

lore
Share & tools
lore
#0 lore raw

cover PAM sanity

Hi,

A whitespace fix for libpam, and then something more "interesting". I spent an hour earlier cursing my build before finally realising the reason that my PAM modules were not running on login was because the pam DISTRO_FEATURE wasn't enabled. So, here's a patch to make libpam warn if it's being build without the pam DISTRO_FEATURE.

Ross

Ross Burton (2):
libpam: fix whitespace in shell function
libpam: check if PAM is enabled when building

 meta/recipes-extended/pam/libpam_1.1.6.bb |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/2 libpam: fix whitespace in shell function

---
 meta/recipes-extended/pam/libpam_1.1.6.bb |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-extended/pam/libpam_1.1.6.bb +2 -2
index 94101d4..96133c3 100644
@@ -96,6 +96,6 @@ do_install() {
 	install -d ${D}${sysconfdir}/pam.d/     
 	install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/
 
-    # The lsb requires unix_chkpwd has setuid permission
-    chmod 4755 ${D}${sbindir}/unix_chkpwd
+	# The lsb requires unix_chkpwd has setuid permission
+	chmod 4755 ${D}${sbindir}/unix_chkpwd
 }
Signature · 1 line
1.7.10.4
#2 lore raw

PATCH 2/2 libpam: check if PAM is enabled when building

In reply to Ross Burton
---
 meta/recipes-extended/pam/libpam_1.1.6.bb |    6 ++++++
 1 file changed, 6 insertions(+)
meta/recipes-extended/pam/libpam_1.1.6.bb +6 -0
index 96133c3..f811f4c 100644
@@ -99,3 +99,9 @@ do_install() {
 	# The lsb requires unix_chkpwd has setuid permission
 	chmod 4755 ${D}${sbindir}/unix_chkpwd
 }
+
+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
Signature · 1 line
1.7.10.4