diff options
-rw-r--r-- | eclass/user.eclass | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/eclass/user.eclass b/eclass/user.eclass index 906e84e83c69..d5b827d2e76b 100644 --- a/eclass/user.eclass +++ b/eclass/user.eclass @@ -123,13 +123,13 @@ enewuser() { # handle uid local euid=${1}; shift if [[ -n ${euid} && ${euid} != -1 ]] ; then - if [[ ${euid} -gt 0 ]] ; then + if [[ ${euid} -ge 0 ]] ; then if [[ -n $(egetent passwd ${euid}) ]] ; then [[ -n ${force_uid} ]] && die "${FUNCNAME}: UID ${euid} already taken" euid="next" fi else - eerror "Userid given but is not greater than 0!" + eerror "Userid given but is not greater than or equal to 0!" die "${euid} is not a valid UID" fi else @@ -289,13 +289,13 @@ enewgroup() { # handle gid local egid=${1}; shift if [[ -n ${egid} && ${egid} != -1 ]] ; then - if [[ ${egid} -gt 0 ]] ; then + if [[ ${egid} -ge 0 ]] ; then if [[ -n $(egetent group ${egid}) ]] ; then [[ -n ${force_gid} ]] && die "${FUNCNAME}: GID ${egid} already taken" egid="next available; requested gid taken" fi else - eerror "Groupid given but is not greater than 0!" + eerror "Groupid given but is not greater than or equal to 0!" die "${egid} is not a valid GID" fi else |