Patchwork [1/1] classes/image: disable pam nullok_secure with debug-tweaks

login
register
mail settings
Submitter Paul Eggleton
Date March 21, 2014, 4:31 p.m.
Message ID <d5a52f7e1877274915eccba65d6f603dadb7949e.1395419449.git.paul.eggleton@linux.intel.com>
Download mbox | patch
Permalink /patch/69003/
State New
Headers show

Comments

Paul Eggleton - March 21, 2014, 4:31 p.m.
If you want passwordless logins to work with pam enabled, then you can't
have "nullok_secure" enabled on pam_unix entries. Add some
postprocessing to change these to "nullok" when debug-tweaks is in
IMAGE_FEATURES, in order to make passwordless logins with PAM work
again.

Fixes [YOCTO #5973].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/classes/image.bbclass | 4 ++++
 1 file changed, 4 insertions(+)

Patch

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 9a04288..3436624 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -298,6 +298,10 @@  ssh_allow_empty_password () {
 			printf '\nDROPBEAR_EXTRA_ARGS="-B"\n' >> ${IMAGE_ROOTFS}${sysconfdir}/default/dropbear
 		fi
 	fi
+
+	if [ -d ${IMAGE_ROOTFS}${sysconfdir}/pam.d ] ; then
+		sed -i 's/nullok_secure/nullok/' ${IMAGE_ROOTFS}${sysconfdir}/pam.d/*
+	fi
 }
 
 # Enable postinst logging if debug-tweaks is enabled