diff options
author | Mike Frysinger <vapier@chromium.org> | 2019-09-19 13:34:40 -0400 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-09-20 09:27:07 +0000 |
commit | 183e1271f86797fe7b473cbcf78671eca075c122 (patch) | |
tree | 242532a0d05163c40e747de8e8ccd7ccbffdadeb /scripts | |
parent | 11ba70b77757db4d34eae8ed3de586416924078e (diff) | |
download | vboot-183e1271f86797fe7b473cbcf78671eca075c122.tar.gz |
image_signing: drop set_chronos_password.sh
We're dropping this from the signer, so drop it from here too.
Nothing else has referred to it.
BUG=None
TEST=CQ passes
BRANCH=None
Change-Id: I855ef036b620082ec98af7aac8ea330ae472435a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1814697
Reviewed-by: George Engelbrecht <engeg@google.com>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/image_signing/set_chronos_password.sh | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/scripts/image_signing/set_chronos_password.sh b/scripts/image_signing/set_chronos_password.sh deleted file mode 100755 index 0b8bce80..00000000 --- a/scripts/image_signing/set_chronos_password.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/bash - -# Copyright (c) 2010 The Chromium OS Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -# Customizes a Chrome OS release image by setting the chronos user password. - -# Usage: ./set_chronos_password.sh <image.bin> <chronos_password> [--force] - -# Load common constants and variables. -. "$(dirname "$0")/common.sh" - -change_chronos_password() { - local rootfs=$1 - local password=$2 - echo "Setting chronos password..." - local crypted_password="$(echo $password | openssl passwd -1 -stdin)" - local temp_shadow="$rootfs/etc/tempshadow" - echo "chronos:$crypted_password:14500:0:99999::::" \ - | sudo tee "$temp_shadow" > /dev/null - sudo grep -Ev ^chronos: "$rootfs/etc/shadow" \ - | sudo tee -a "$temp_shadow" > /dev/null - sudo mv -f "$temp_shadow" "$rootfs/etc/shadow" -} - -main() { - set -e - - local image=$1 - local chronos_password=$2 - if [ $# -ne 2 ] && [ $# -ne 3 ] || [ ! $3 = "--force" ] ; then - echo "Usage: $PROG <image.bin> <chronos_password> [--force]" - exit 1 - fi - - local loopdev=$(loopback_partscan "${image}") - local rootfs=$(make_temp_dir) - if [ $# -eq 2 ]; then - mount_loop_image_partition_ro "${loopdev}" 3 "${rootfs}" - if ! no_chronos_password "$rootfs"; then - echo "Password is already set [use --force if you'd like to update it]" - exit 1 - fi - # Prepare for remounting read/write. We can't use `mount -o rw,remount` - # because of the bits in the ext4 header we've set to block that. See - # enable_rw_mount for details. - sudo umount "${rootfs}" - fi - mount_loop_image_partition "${loopdev}" 3 "${rootfs}" - change_chronos_password "$rootfs" "$chronos_password" - touch "$image" # Updates the image modification time. - echo "Password Set." -} - -main $@ |