Merge pull request #2379 from flatcar/krnowak/acct-hack

profiles: Do not modify preexisting users
This commit is contained in:
Krzesimir Nowak 2023-01-16 12:26:52 +01:00 committed by GitHub
commit ca26be6b85

View File

@ -94,6 +94,16 @@ cros_pre_pkg_setup_sysroot_build_bin_dir() {
PATH+=":${CROS_BUILD_BOARD_BIN}" PATH+=":${CROS_BUILD_BOARD_BIN}"
} }
# Avoid modifications of the preexisting users - these are provided by
# our baselayout and usermod can't change anything there anyway (it
# complains that the user is not in /etc/passwd).
cros_pre_pkg_postinst_no_modifications_of_users() {
if [[ "${CATEGORY}" != 'acct-user' ]]; then
return 0
fi
export ACCT_USER_NO_MODIFY=x
}
# Source hooks for SLSA build provenance report generation # Source hooks for SLSA build provenance report generation
source "${BASH_SOURCE[0]}.slsa-provenance" source "${BASH_SOURCE[0]}.slsa-provenance"