mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-23 22:51:03 +02:00
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
This commit is contained in:
parent
1f5e84d157
commit
b8f2ace10f
@ -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}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user