summaryrefslogtreecommitdiffstats
path: root/meta/classes/image.bbclass
diff options
context:
space:
mode:
authortprrt <tprrt@tupi.fr>2015-04-14 00:08:03 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-04-24 11:06:55 +0100
commit376b6b70680be04464293ef570b312ea7836952e (patch)
tree6cbf96e30d38e03f0fb1a6f759b26006fd0481cd /meta/classes/image.bbclass
parentbef330582e5724a8ba3bcad755aab42b846a49ed (diff)
downloadpoky-376b6b70680be04464293ef570b312ea7836952e.tar.gz
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. (From OE-Core rev: 09ac2664fba223111c20c3000af6b8d5cdaabeb1) Signed-off-by: tprrt <tprrt@tupi.fr> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/image.bbclass')
-rw-r--r--meta/classes/image.bbclass3
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index dc9bd80165..01f8b3fc19 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -335,7 +335,8 @@ MULTILIB_TEMP_ROOTFS = "${WORKDIR}/multilib"
335zap_empty_root_password () { 335zap_empty_root_password () {
336 if [ -e ${IMAGE_ROOTFS}/etc/shadow ]; then 336 if [ -e ${IMAGE_ROOTFS}/etc/shadow ]; then
337 sed -i 's%^root::%root:*:%' ${IMAGE_ROOTFS}/etc/shadow 337 sed -i 's%^root::%root:*:%' ${IMAGE_ROOTFS}/etc/shadow
338 elif [ -e ${IMAGE_ROOTFS}/etc/passwd ]; then 338 fi
339 if [ -e ${IMAGE_ROOTFS}/etc/passwd ]; then
339 sed -i 's%^root::%root:*:%' ${IMAGE_ROOTFS}/etc/passwd 340 sed -i 's%^root::%root:*:%' ${IMAGE_ROOTFS}/etc/passwd
340 fi 341 fi
341} 342}