diff options
author | tprrt <tprrt@tupi.fr> | 2015-04-14 00:08:03 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-04-24 11:06:55 +0100 |
commit | 376b6b70680be04464293ef570b312ea7836952e (patch) | |
tree | 6cbf96e30d38e03f0fb1a6f759b26006fd0481cd /meta/classes | |
parent | bef330582e5724a8ba3bcad755aab42b846a49ed (diff) | |
download | poky-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')
-rw-r--r-- | meta/classes/image.bbclass | 3 |
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" | |||
335 | zap_empty_root_password () { | 335 | zap_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 | } |