From: Michał Górny Date: Thu, 30 May 2019 04:08:11 +0000 (+0200) Subject: user.eclass: Die if no free UID/GID is found X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=fae75645950a766944e76cbd1d77811227fa50d9;p=gentoo.git user.eclass: Die if no free UID/GID is found Signed-off-by: Michał Górny --- diff --git a/eclass/user.eclass b/eclass/user.eclass index 92a07bb6b41b..8afbc101fac3 100644 --- a/eclass/user.eclass +++ b/eclass/user.eclass @@ -135,6 +135,7 @@ enewuser() { for ((euid = 101; euid <= 999; euid++)); do [[ -z $(egetent passwd ${euid}) ]] && break done + [[ ${euid} -le 999 ]] || die "${FUNCNAME}: no free UID found" fi opts+=( -u ${euid} ) einfo " - Userid: ${euid}" @@ -307,6 +308,7 @@ enewgroup() { for ((egid = 101; egid <= 999; egid++)) ; do [[ -z $(egetent group ${egid}) ]] && break done + [[ ${egid} -le 999 ]] || die "${FUNCNAME}: no free GID found" fi }