From patchwork Mon Aug 22 06:30:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Peter_M=C3=BCller?= X-Patchwork-Id: 5972 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) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4MB2YF5PmKz3wfF for ; Mon, 22 Aug 2022 06:30:41 +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) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4MB2YD3PFZz152; Mon, 22 Aug 2022 06:30:40 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4MB2YD2CGrz2ycs; Mon, 22 Aug 2022 06:30:40 +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) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4MB2YC3yVmz2xdN for ; Mon, 22 Aug 2022 06:30:39 +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)) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4MB2Y92NB4zZR for ; Mon, 22 Aug 2022 06:30:36 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1661149838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Wu2W41DE4RG9U1yMGv6kGyZTPb9IlkYGL54OpX8FfMo=; b=5ilbtg50DuiRqbUH0xUV01DO7e+jlGue3+tC9Pt5ZW2OUAJRASZaEFj4fLdS2Fd6+3LCQu 3SX6clIVjIGuDTDQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1661149838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Wu2W41DE4RG9U1yMGv6kGyZTPb9IlkYGL54OpX8FfMo=; b=lfzS4eJNjUmGYsMgoye2STR/CxIdLQIf2WE81nalEIxM+V0MGhBvHHTp2/jgw2KK2xfSZ5 eDfnHsWNcJD7MA1shRzT74dRMrbGNIe+T9ti40ca8HFqq1rizZLsZuQojEKh1XO6ThcPwN Ic36Blvqswu0lg5ckBMF04RD7bHy4vwgiG9UG21oOLVRyRpXdTrIG8ZgWF2OT0QvPC/LPN 2VhLeQq2nMOwGQNzc+md2/3awBzFzlGpix+VQzreG2T1wUaHX+hMkpEfn4aeuu4oHMy2Dl 1ECiEjE1j1PaDuY4eWVojAA055Ohp22V6lN+Bzqh9O85UbI/qIrtRvoSKAy84g== Message-ID: <59c78fd9-46a7-6290-ad8e-cae28cfc2bfc@ipfire.org> Date: Mon, 22 Aug 2022 06:30:32 +0000 MIME-Version: 1.0 Content-Language: en-US To: "IPFire: Development" From: =?utf-8?q?Peter_M=C3=BCller?= Subject: [PATCH] ipblocklist: Ensure /var/ipfire/ipblocklist is owned and writable by "nobody" 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" Fixes: #12917 Signed-off-by: Peter Müller Reviewed-by: Bernhard Bitsch --- config/rootfiles/core/170/update.sh | 3 +++ lfs/ipblocklist-sources | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/config/rootfiles/core/170/update.sh b/config/rootfiles/core/170/update.sh index b6b66f3f1..c7dc09946 100644 --- a/config/rootfiles/core/170/update.sh +++ b/config/rootfiles/core/170/update.sh @@ -164,6 +164,9 @@ ldconfig mkdir -pv /var/lib/ipblocklist chown nobody:nobody /var/lib/ipblocklist +# Ensure permissions for /var/ipfire/ipblocklist are set properly +chown -Rv nobody:nobody /var/ipfire/ipblocklist + # Rebuild fcrontab from scratch /usr/bin/fcrontab -z diff --git a/lfs/ipblocklist-sources b/lfs/ipblocklist-sources index 30b9e94a4..87bd95cca 100644 --- a/lfs/ipblocklist-sources +++ b/lfs/ipblocklist-sources @@ -47,7 +47,7 @@ b2 : $(TARGET) : @$(PREBUILD) - mkdir -p /var/ipfire/ipblocklist - install -v -m 0644 $(DIR_SRC)/config/ipblocklist/sources /var/ipfire/ipblocklist + install -d -o nobody -g nobody -m 0755 /var/ipfire/ipblocklist + install -v -o nobody -g nobody -m 0644 $(DIR_SRC)/config/ipblocklist/sources /var/ipfire/ipblocklist @$(POSTBUILD)