From b8f2ace10fd45f1d27e1f03b419b7e07cf34cda8 Mon Sep 17 00:00:00 2001 From: Chris Masone Date: Tue, 24 Aug 2010 22:01:39 -0700 Subject: [PATCH] pam_google is no longer in the image, so we must create /etc/login_trust_root.pem from scratch pam_google used to install /etc/login_trust_root.pem, and then this script would modify it. We no longer install pam_google, so we need to create this file de-novo now. BUG=None TEST=build_image, then mod for test. Check that /etc/login_trust_root.pem exists, contains one cert, and has the right permissions. For maximum goodness, run login_LoginSuccess Change-Id: I409ffeea4b30905cf9e0506650b67556fa5ec80e Review URL: http://codereview.chromium.org/3185024 --- mod_for_test_scripts/710enableAuthTesting | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/mod_for_test_scripts/710enableAuthTesting b/mod_for_test_scripts/710enableAuthTesting index 3d9a96afd1..7d2aae8564 100755 --- a/mod_for_test_scripts/710enableAuthTesting +++ b/mod_for_test_scripts/710enableAuthTesting @@ -44,17 +44,12 @@ sudo chroot "${ROOT_FS_DIR}" ${QEMU} \ -n FakeCert -t "C,," -a -i "${FAKE_CA_DIR}/${CERT_NAME}.pem" chmod 0644 "${ROOT_FS_DIR}/${FAKE_NSSDB}"/* -# TODO(cmasone): get rid of this once we're off pam_google for good. -# Sadly, our fake cert HAS to be first in this file. -TMPFILE=$(mktemp) CERT_FILE="${ROOT_FS_DIR}/etc/login_trust_root.pem" -PERMS=$(stat --printf="%a" "${CERT_FILE}") -cat "${ROOT_FS_DIR}/${TMP_CERT}" "${CERT_FILE}" > "${TMPFILE}" -mv -f "${TMPFILE}" "${CERT_FILE}" -chmod "${PERMS}" "${CERT_FILE}" +mv -f "${ROOT_FS_DIR}/${TMP_CERT}" "${CERT_FILE}" +chmod 0644 "${CERT_FILE}" if [ -n "${QEMU}" ] ; then rm "${ROOT_FS_DIR}/${QEMU}" fi -rm "${ROOT_FS_DIR}/${TMP_KEY}" -rm "${ROOT_FS_DIR}/${TMP_CERT}" +rm -f "${ROOT_FS_DIR}/${TMP_KEY}" +rm -f "${ROOT_FS_DIR}/${TMP_CERT}"