]> code.ossystems Code Review - openembedded-core.git/commit
image.bbclass: fix for zap_root_password
authorChen Qi <Qi.Chen@windriver.com>
Wed, 11 Dec 2013 05:41:36 +0000 (13:41 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 14 Dec 2013 09:16:32 +0000 (09:16 +0000)
commitc1037a74f934966a0df8c85138b09d672b9f8b36
tree5efa3877d887d12a74565a7afdd0a63ced76d1e6
parent31dee7946340bf0f1e94e4e714191d3d6ca3bf6a
image.bbclass: fix for zap_root_password

Previously, this function replaces the root password with '*' if
'debug-tweaks' is not in IMAGE_FEATURES. It not only zaps empty root
password, but also zaps non-empty root password. That means, if the
user uses a bbappend file for base-passwd to set the root password, he
would not be able to login as root; if the user uses 'EXTRA_USERS_PARAMS'
to set the root password, he would still not be able to login as root.

What we really want from this function is to disallow empty root password
if 'debug-tweaks' is not in IMAGE_FEATURES. This function should not remove
non-empty root password because that password is usually deliberately set
by the user.

This patch renames zap_root_password to zap_empty_root_password to
better reflect the intent of this function. It also modifies the code
to make this function work correctly.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
meta/classes/core-image.bbclass
meta/classes/image.bbclass