mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-15 17:06:58 +02:00
profiles: Do not modify preexisting users
Add an ebuild phase hook that runs when pkg_postinst is about to be executed. The hook sets up the environment for acct-user packages to 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).
This commit is contained in:
parent
2fa548c7d6
commit
3db813eb32
@ -94,6 +94,16 @@ cros_pre_pkg_setup_sysroot_build_bin_dir() {
|
||||
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 "${BASH_SOURCE[0]}.slsa-provenance"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user