From patchwork Wed Apr 26 20:37:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: jon X-Patchwork-Id: 6817 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4Q69gF3mL0z3xDh for ; Wed, 26 Apr 2023 20:38:17 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4Q69gC6L0dz1Fw; Wed, 26 Apr 2023 20:38:15 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4Q69gC4prXz2ySF; Wed, 26 Apr 2023 20:38:15 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4Q69gB3yG4z2xPk for ; Wed, 26 Apr 2023 20:38:14 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4Q69g84lMRzkj; Wed, 26 Apr 2023 20:38:12 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1682541493; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=tEr2sopn2bPv+XY+DrToTQ8EnAUIGyG7y7hzzL3+K4Q=; b=2Y4U62Xb+5nT15cACV8OXoowuLAmNGyZ1oceXalPhnMKbzyYwhlZ1rXfWIOfrzX0cHEs6a z1Wa68t/GLWjMcBQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1682541493; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=tEr2sopn2bPv+XY+DrToTQ8EnAUIGyG7y7hzzL3+K4Q=; b=GHr1ha4YG45lkji8+tFH9prjUmnyszlJinrdXpIE3Zgx/YhtB6y757Y44wqjj3KZRsu5eg p1r/hFMecoB+RH4upbsjBQMmmzt8irv6PIrQ1Cf7ezI/qFU0AKN9/r3whAsGq1pAEbjFlg lKpaAdeJtF0ITbtv4gn4hWJOASWv2BVY9sCLjou2eqkB9/oZxP4flW++XK6GXoNhW1C531 CgrDZhcRxlqyGJFgAGlJuKkD+CgC4mwykH00Ir0qSm+IcUwORzS0hFf8Y7/hU2U0Dk4rkU zjmd39ElK6t1hIrWnbmHSxMpM6m5QXpGn0JOfkscj9StwFFTQWiS5HfFua7FmQ== From: Jon Murphy To: development@lists.ipfire.org Subject: [PATCH] dbus: Fixes Bug#13094 - Check for existing user before `useradd` Date: Wed, 26 Apr 2023 15:37:13 -0500 Message-Id: <20230426203713.3274071-1-jon.murphy@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" - The dbus install.sh script useradd command causes an error: "failed adding user 'messagebus', exit code: 9" - This patch adds a check to only do the useradd if the user does not exist. - See the bump PAK_VER for dbus that Adolf publised. See this patch: https://lists.ipfire.org/pipermail/development/2023-April/015816.html Signed-off-by: Jon Murphy --- src/paks/dbus/install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/paks/dbus/install.sh b/src/paks/dbus/install.sh index bf4e5a6d5..e4f2abda2 100644 --- a/src/paks/dbus/install.sh +++ b/src/paks/dbus/install.sh @@ -17,13 +17,13 @@ # along with IPFire; if not, write to the Free Software # # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # # -# Copyright (C) 2007 IPFire-Team . # +# Copyright (C) 2007-2023 IPFire-Team . # # # ############################################################################ # . /opt/pakfire/lib/functions.sh extract_files -useradd messagebus +id -u messagebus &>/dev/null || useradd -r -d /var/empty -s /bin/false messagebus # Create start links ln -svf ../init.d/messagebus /etc/rc.d/rc3.d/S15messagebus