From c38fee231b42b9123dd1fd102235eac6240ba4c8 Mon Sep 17 00:00:00 2001 From: Chen Qi Date: Wed, 11 Dec 2013 13:41:36 +0800 Subject: 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. (From OE-Core rev: c1037a74f934966a0df8c85138b09d672b9f8b36) Signed-off-by: Chen Qi Signed-off-by: Saul Wold Signed-off-by: Richard Purdie --- meta/classes/core-image.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'meta/classes/core-image.bbclass') diff --git a/meta/classes/core-image.bbclass b/meta/classes/core-image.bbclass index e7c34e2791..fc4bd2f6f1 100644 --- a/meta/classes/core-image.bbclass +++ b/meta/classes/core-image.bbclass @@ -74,7 +74,7 @@ inherit image ROOTFS_POSTPROCESS_COMMAND += "rootfs_update_timestamp ; " # Zap the root password if debug-tweaks feature is not enabled -ROOTFS_POSTPROCESS_COMMAND += '${@base_contains("IMAGE_FEATURES", "debug-tweaks", "", "zap_root_password ; ",d)}' +ROOTFS_POSTPROCESS_COMMAND += '${@base_contains("IMAGE_FEATURES", "debug-tweaks", "", "zap_empty_root_password ; ",d)}' # Tweak the mount options for rootfs in /etc/fstab if read-only-rootfs is enabled ROOTFS_POSTPROCESS_COMMAND += '${@base_contains("IMAGE_FEATURES", "read-only-rootfs", "read_only_rootfs_hook; ", "",d)}' -- cgit v1.2.3-54-g00ecf