mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-06 00:48:18 -07:00
acct-user.eclass: Refuse to lock out the superuser
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
This commit is contained in:
@@ -473,6 +473,11 @@ acct-user_pkg_prerm() {
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [[ ${ACCT_USER_ID} -eq 0 ]]; then
|
||||
elog "Refusing to lock out the superuser (UID 0)"
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [[ -z ${REPLACED_BY_VERSION} ]]; then
|
||||
if [[ -z $(egetent passwd "${ACCT_USER_NAME}") ]]; then
|
||||
ewarn "User account not found: ${ACCT_USER_NAME}"
|
||||
|
||||
Reference in New Issue
Block a user