commit:     34ede2f61724b2931f4edc7af81129d1af421c62
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 26 09:45:17 2022 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Mon Mar 28 19:47:20 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34ede2f6

acct-user.eclass: Use arithmetic test for EUID

Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 eclass/acct-user.eclass | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/eclass/acct-user.eclass b/eclass/acct-user.eclass
index 70ae2434b5df..2e2e1152f9ad 100644
--- a/eclass/acct-user.eclass
+++ b/eclass/acct-user.eclass
@@ -1,4 +1,4 @@
-# Copyright 2019-2021 Gentoo Authors
+# Copyright 2019-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: acct-user.eclass
@@ -178,7 +178,7 @@ acct-user_add_deps() {
 eislocked() {
        [[ $# -eq 1 ]] || die "usage: ${FUNCNAME} <user>"
 
-       if [[ ${EUID} != 0 ]]; then
+       if [[ ${EUID} -ne 0 ]]; then
                einfo "Insufficient privileges to execute ${FUNCNAME[0]}"
                return 0
        fi
@@ -215,7 +215,7 @@ eislocked() {
 elockuser() {
        [[ $# -eq 1 ]] || die "usage: ${FUNCNAME} <user>"
 
-       if [[ ${EUID} != 0 ]]; then
+       if [[ ${EUID} -ne 0 ]]; then
                einfo "Insufficient privileges to execute ${FUNCNAME[0]}"
                return 0
        fi
@@ -258,7 +258,7 @@ elockuser() {
 eunlockuser() {
        [[ $# -eq 1 ]] || die "usage: ${FUNCNAME} <user>"
 
-       if [[ ${EUID} != 0 ]]; then
+       if [[ ${EUID} -ne 0 ]]; then
                einfo "Insufficient privileges to execute ${FUNCNAME[0]}"
                return 0
        fi
@@ -440,7 +440,7 @@ acct-user_pkg_preinst() {
 acct-user_pkg_postinst() {
        debug-print-function ${FUNCNAME} "${@}"
 
-       if [[ ${EUID} != 0 ]]; then
+       if [[ ${EUID} -ne 0 ]]; then
                einfo "Insufficient privileges to execute ${FUNCNAME[0]}"
                return 0
        fi
@@ -468,7 +468,7 @@ acct-user_pkg_postinst() {
 acct-user_pkg_prerm() {
        debug-print-function ${FUNCNAME} "${@}"
 
-       if [[ ${EUID} != 0 ]]; then
+       if [[ ${EUID} -ne 0 ]]; then
                einfo "Insufficient privileges to execute ${FUNCNAME[0]}"
                return 0
        fi

Reply via email to