]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
classes/image: disable pam nullok_secure with debug-tweaks
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Fri, 21 Mar 2014 16:31:31 +0000 (16:31 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 21 Mar 2014 17:14:53 +0000 (17:14 +0000)
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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/image.bbclass

index 9a04288ba6144326716277b27975ef3d64c42415..3436624c9da11c90597b531edaf578f0b373cc45 100644 (file)
@@ -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