Gentoo Archives: gentoo-commits

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Mon, 28 Mar 2022 19:48:07
Message-Id: 1648496839.35c94832f16fa949ed7472e6b8ebe128ed333d3a.ulm@gentoo
1 commit: 35c94832f16fa949ed7472e6b8ebe128ed333d3a
2 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
3 AuthorDate: Sat Mar 26 09:43:45 2022 +0000
4 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
5 CommitDate: Mon Mar 28 19:47:19 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=35c94832
7
8 user.eclass: Use arithmetic test for UID
9
10 Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
11
12 eclass/user.eclass | 4 ++--
13 1 file changed, 2 insertions(+), 2 deletions(-)
14
15 diff --git a/eclass/user.eclass b/eclass/user.eclass
16 index 581704eae815..ff69be81c1ec 100644
17 --- a/eclass/user.eclass
18 +++ b/eclass/user.eclass
19 @@ -85,7 +85,7 @@ user_get_nologin() {
20 # If -M is passed, enewuser does not create the home directory if it does not
21 # exist.
22 enewuser() {
23 - if [[ ${EUID} != 0 ]] ; then
24 + if [[ ${EUID} -ne 0 ]] ; then
25 ewarn "Insufficient privileges to execute ${FUNCNAME[0]}"
26 return 0
27 fi
28 @@ -240,7 +240,7 @@ enewuser() {
29 # If -F is passed, enewgroup will always enforce specified GID and fail if it
30 # can not be assigned.
31 enewgroup() {
32 - if [[ ${EUID} != 0 ]] ; then
33 + if [[ ${EUID} -ne 0 ]] ; then
34 ewarn "Insufficient privileges to execute ${FUNCNAME[0]}"
35 return 0
36 fi