1 |
Signed-off-by: Ulrich Müller <ulm@g.o> |
2 |
--- |
3 |
eclass/acct-user.eclass | 5 +++++ |
4 |
1 file changed, 5 insertions(+) |
5 |
|
6 |
diff --git a/eclass/acct-user.eclass b/eclass/acct-user.eclass |
7 |
index 2e2e1152f9ad..f2aaefc2ee39 100644 |
8 |
--- a/eclass/acct-user.eclass |
9 |
+++ b/eclass/acct-user.eclass |
10 |
@@ -473,6 +473,11 @@ acct-user_pkg_prerm() { |
11 |
return 0 |
12 |
fi |
13 |
|
14 |
+ if [[ ${ACCT_USER_ID} -eq 0 ]]; then |
15 |
+ elog "Refusing to lock out the superuser (UID 0)" |
16 |
+ return 0 |
17 |
+ fi |
18 |
+ |
19 |
if [[ -z ${REPLACED_BY_VERSION} ]]; then |
20 |
if [[ -z $(egetent passwd "${ACCT_USER_NAME}") ]]; then |
21 |
ewarn "User account not found: ${ACCT_USER_NAME}" |
22 |
-- |
23 |
2.35.1 |