Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1734)

Unified Diff: scripts/image_signing/common.sh

Issue 4480001: Refuse to change the chronos password if already set unless explicitly asked. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/vboot_reference.git@master
Patch Set: review fixes Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | scripts/image_signing/set_chronos_password.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/image_signing/common.sh
diff --git a/scripts/image_signing/common.sh b/scripts/image_signing/common.sh
index 17c01ba4bc1739aa77f7db6d2971e7c8d21a5543..5a3e600b316c86c622d418a1364ec0ad07f15386 100755
--- a/scripts/image_signing/common.sh
+++ b/scripts/image_signing/common.sh
@@ -238,5 +238,12 @@ rw_mount_disabled() {
return 1
}
+# Check if the 'chronos' user already has a password
+# ARGS: rootfs
+no_chronos_password() {
+ local rootfs=$1
+ sudo grep -q '^chronos:\*:' "$rootfs/etc/shadow"
+}
+
trap "cleanup_temps_and_mounts" EXIT
« no previous file with comments | « no previous file | scripts/image_signing/set_chronos_password.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698