[oe-commits] tprrt : image: zap_empty_root_password doesn' t handle passwd file in shadow case

git at git.openembedded.org git at git.openembedded.org
Fri Apr 24 10:08:47 UTC 2015


Module: openembedded-core.git
Branch: master-next
Commit: 09ac2664fba223111c20c3000af6b8d5cdaabeb1
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=09ac2664fba223111c20c3000af6b8d5cdaabeb1

Author: tprrt <tprrt at tupi.fr>
Date:   Tue Apr 14 00:08:03 2015 +0200

image: zap_empty_root_password doesn't handle passwd file in shadow case

/etc/passwd isn't editted if /etc/shadow exists and should be else
it can cause problems with some login providers such as toybox.

Signed-off-by: tprrt <tprrt at tupi.fr>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/classes/image.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index dc9bd80..01f8b3f 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -335,7 +335,8 @@ MULTILIB_TEMP_ROOTFS = "${WORKDIR}/multilib"
 zap_empty_root_password () {
 	if [ -e ${IMAGE_ROOTFS}/etc/shadow ]; then
 		sed -i 's%^root::%root:*:%' ${IMAGE_ROOTFS}/etc/shadow
-	elif [ -e ${IMAGE_ROOTFS}/etc/passwd ]; then
+        fi
+	if [ -e ${IMAGE_ROOTFS}/etc/passwd ]; then
 		sed -i 's%^root::%root:*:%' ${IMAGE_ROOTFS}/etc/passwd
 	fi
 } 



More information about the Openembedded-commits mailing list