From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E495615808B for ; Mon, 28 Mar 2022 19:48:07 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4C55CE09A1; Mon, 28 Mar 2022 19:48:06 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2A8EFE0993 for ; Mon, 28 Mar 2022 19:48:06 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1A3E13413C2 for ; Mon, 28 Mar 2022 19:48:05 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3F73F34D for ; Mon, 28 Mar 2022 19:48:02 +0000 (UTC) From: "Ulrich Müller" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ulrich Müller" Message-ID: <1648496839.35c94832f16fa949ed7472e6b8ebe128ed333d3a.ulm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/user.eclass X-VCS-Directories: eclass/ X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Müller X-VCS-Revision: 35c94832f16fa949ed7472e6b8ebe128ed333d3a X-VCS-Branch: master Date: Mon, 28 Mar 2022 19:48:02 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 09fedb6f-a9e7-49d7-b94e-aacf54b73f7c X-Archives-Hash: 12d3196992bd5b1795555985e2aa6d5a commit: 35c94832f16fa949ed7472e6b8ebe128ed333d3a Author: Ulrich Müller gentoo org> AuthorDate: Sat Mar 26 09:43:45 2022 +0000 Commit: Ulrich Müller gentoo org> CommitDate: Mon Mar 28 19:47:19 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=35c94832 user.eclass: Use arithmetic test for UID Signed-off-by: Ulrich Müller gentoo.org> eclass/user.eclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eclass/user.eclass b/eclass/user.eclass index 581704eae815..ff69be81c1ec 100644 --- a/eclass/user.eclass +++ b/eclass/user.eclass @@ -85,7 +85,7 @@ user_get_nologin() { # If -M is passed, enewuser does not create the home directory if it does not # exist. enewuser() { - if [[ ${EUID} != 0 ]] ; then + if [[ ${EUID} -ne 0 ]] ; then ewarn "Insufficient privileges to execute ${FUNCNAME[0]}" return 0 fi @@ -240,7 +240,7 @@ enewuser() { # If -F is passed, enewgroup will always enforce specified GID and fail if it # can not be assigned. enewgroup() { - if [[ ${EUID} != 0 ]] ; then + if [[ ${EUID} -ne 0 ]] ; then ewarn "Insufficient privileges to execute ${FUNCNAME[0]}" return 0 fi