mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-17 01:46:58 +02:00
remove(coreos-base/chromeos-auth-config): Unused passwd hackery
This appears to be part of a scheme to set an alternative login password in ChromeOS that we have not been using. Our solution will be to make /etc read-write so this can just go away.
This commit is contained in:
parent
d03376f5c3
commit
ba5f044fe4
@ -1,53 +0,0 @@
|
|||||||
# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
EAPI=2
|
|
||||||
|
|
||||||
DESCRIPTION="ChromiumOS-specific configuration files for pambase"
|
|
||||||
HOMEPAGE="http://www.chromium.org"
|
|
||||||
|
|
||||||
LICENSE="GPL-2"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="amd64 arm x86"
|
|
||||||
|
|
||||||
RDEPEND="
|
|
||||||
>=sys-auth/pambase-20090620.1-r7"
|
|
||||||
#TODO: chromeos-base/vboot_reference"
|
|
||||||
DEPEND="${RDEPEND}"
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
# Chrome OS: sudo and vt2 are important for system debugging both in
|
|
||||||
# developer mode and during development. These two stanzas allow sudo and
|
|
||||||
# login auth as user chronos under the following conditions:
|
|
||||||
#
|
|
||||||
# 1. password-less access:
|
|
||||||
# - system in developer mode
|
|
||||||
# - there is no passwd.devmode file
|
|
||||||
# - there is no system-wide password set above.
|
|
||||||
# 2. System-wide (/etc/shadow) password access:
|
|
||||||
# - image has a baked in password above
|
|
||||||
# 3. Developer mode password access
|
|
||||||
# - user creates a passwd.devmode file with "chronos:CRYPTED_PASSWORD"
|
|
||||||
# 4. System-wide (/etc/shadow) password access set by modifying /etc/shadow:
|
|
||||||
# - Cases #1 and #2 will apply but failure will fall through to the
|
|
||||||
# inserted password.
|
|
||||||
insinto /etc/pam.d
|
|
||||||
doins "${FILESDIR}/chromeos-auth" || die
|
|
||||||
|
|
||||||
dosbin "${FILESDIR}/is_developer_end_user" || die
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst() {
|
|
||||||
# If there's a shared user password or if the build target is the host,
|
|
||||||
# reset chromeos-auth to an empty file. We don't transition from empty to
|
|
||||||
# populated because binary packages lose FILESDIR.
|
|
||||||
local crypted_password='*'
|
|
||||||
if [ "${ROOT}" = "/" ]; then
|
|
||||||
crypted_password='host'
|
|
||||||
elif [ -r "${SHARED_USER_PASSWD_FILE}" ]; then
|
|
||||||
crypted_password=$(cat "${SHARED_USER_PASSWD_FILE}")
|
|
||||||
fi
|
|
||||||
if [ "${crypted_password}" != '*' ]; then
|
|
||||||
echo -n '' > "${ROOT}/etc/pam.d/chromeos-auth" || die
|
|
||||||
fi
|
|
||||||
}
|
|
@ -1,16 +0,0 @@
|
|||||||
# If we're not in dev-mode, skip to the system password stack.
|
|
||||||
auth [success=ignore default=3] pam_exec.so \
|
|
||||||
quiet /usr/bin/crossystem cros_debug?1
|
|
||||||
|
|
||||||
# Check if a custom devmode password file exists and prefer it.
|
|
||||||
auth [success=ignore default=1] pam_exec.so \
|
|
||||||
quiet /usr/bin/test -f /media/state/etc/devmode.passwd
|
|
||||||
|
|
||||||
# If we get to pwdfile, use it or bypass the password-less login.
|
|
||||||
auth [success=done default=1] pam_pwdfile.so \
|
|
||||||
pwdfile /media/state/etc/devmode.passwd
|
|
||||||
|
|
||||||
# If we get here, allow password-less access
|
|
||||||
auth sufficient pam_exec.so quiet /usr/bin/crossystem cros_debug?1
|
|
||||||
|
|
||||||
# Fallback to a system password if one was stamped in after initial build.
|
|
@ -1,13 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# Copyright (c) 2012 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.
|
|
||||||
|
|
||||||
# Exit status is 0 if this is a "developer system", non-zero if not.
|
|
||||||
# We define "developer system" as any of
|
|
||||||
# - a release image on a system with the developer hardware switch set on,
|
|
||||||
# - a developer or test image running on hardware or a VM, or
|
|
||||||
# - a system with a shared user password set (meaning it's possible to log in
|
|
||||||
# on a VT console).
|
|
||||||
crossystem "cros_debug?1" || grep -q '^chronos:[^*]' /etc/shadow
|
|
@ -100,7 +100,6 @@ RDEPEND="${RDEPEND}
|
|||||||
app-arch/gzip
|
app-arch/gzip
|
||||||
app-arch/tar
|
app-arch/tar
|
||||||
app-shells/bash
|
app-shells/bash
|
||||||
coreos-base/chromeos-auth-config
|
|
||||||
coreos-base/coreos-base
|
coreos-base/coreos-base
|
||||||
coreos-base/cros_boot_mode
|
coreos-base/cros_boot_mode
|
||||||
coreos-base/vboot_reference
|
coreos-base/vboot_reference
|
||||||
@ -125,7 +124,6 @@ RDEPEND="${RDEPEND}
|
|||||||
sys-apps/systemd
|
sys-apps/systemd
|
||||||
sys-apps/systemd-sysv-utils
|
sys-apps/systemd-sysv-utils
|
||||||
sys-apps/util-linux
|
sys-apps/util-linux
|
||||||
sys-auth/pam_pwdfile
|
|
||||||
sys-fs/e2fsprogs
|
sys-fs/e2fsprogs
|
||||||
sys-fs/aufs-util
|
sys-fs/aufs-util
|
||||||
sys-libs/timezone-data
|
sys-libs/timezone-data
|
||||||
|
Loading…
Reference in New Issue
Block a user