From patchwork Thu May 2 00:49:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Schantl X-Patchwork-Id: 2233 Return-Path: Received: from mail01.ipfire.org (unknown [172.28.1.200]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail01.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web07.i.ipfire.org (Postfix) with ESMTPS id D146985BD82 for ; Wed, 1 May 2019 15:49:32 +0100 (BST) Received: from mail01.i.ipfire.org (localhost [IPv6:::1]) by mail01.ipfire.org (Postfix) with ESMTP id 44vLrq3wtWz5D1h7; Wed, 1 May 2019 15:49:31 +0100 (BST) Received: from tuxedo.stevee (213162073179.public.t-mobile.at [213.162.73.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 44vLrm6Hb5z55Jp1; Wed, 1 May 2019 15:49:28 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201904rsa; t=1556722169; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:openpgp:autocrypt; bh=lHrGnLKmjZ25q6+F9k/E77DMRue4ZXTWFe/QAaKDs5Q=; b=txkxMpuusXD7SzQqSp/ttPFgZYX4BH/nSK611DM/rKvQWT6fR3gWO1cJc72JP9NrlFOZ1X 564vUy7nfqZPHu+MtpVHpup1QtJfCLXyxHQqRcUrQ+iFTz8b6jBNP+uNl4hvqDxH/qqDng ORZGynd10E3BRS+Fa2X/nSp4i0068UhseTPm1+oQpM4UNQDPUfRdfWteXq1Gvw1AQMU5m5 L6uVq7KlBoyjXl4Y2l8Pe84MMDk7tU1x9i07+jCmkUhw5gBoVL79ecblHRHA1HFV1HiaX7 tCQRTSFLxr6QnI2ZwYJ59WZ7oilUBprGS91mtFlr9KN6u45K2AjXTwG/1LLu4w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=201904ed25519; t=1556722169; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:openpgp:autocrypt; bh=lHrGnLKmjZ25q6+F9k/E77DMRue4ZXTWFe/QAaKDs5Q=; b=FtWUnR9AeDGkqcacX6hD8wQhreldccyk1fL9Fv7jaz754LWJW27WSz6QO2kip3fqvw6Fyp V+7ecLiShz9gVzBg== From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCH] update-ids-ruleset: Set correct ownership for the rulestarball. Date: Wed, 1 May 2019 16:49:25 +0200 Message-Id: <20190501144925.3766-1-stefan.schantl@ipfire.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Authentication-Results: mail01.ipfire.org; auth=pass smtp.auth=stevee smtp.mailfrom=stefan.schantl@ipfire.org X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.15 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" X-Spam: Yes The script usualy will be executed by cron which will start it with root permissions, so the downloaded tarball is owned by this user. This has to be changed to the user which runs the WUI (nobody:nobody) to allow, changing the ruleset to an other one and to display the ruleset area. Fixes #12066 Signed-off-by: Stefan Schantl --- src/scripts/update-ids-ruleset | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/scripts/update-ids-ruleset b/src/scripts/update-ids-ruleset index 14ea25ec6..f28a8c156 100644 --- a/src/scripts/update-ids-ruleset +++ b/src/scripts/update-ids-ruleset @@ -58,6 +58,9 @@ if(&IDS::downloadruleset()) { exit 0; } +# Set correct ownership for the downloaded tarball. +&IDS::set_ownership("$IDS::rulestarball"); + # Call oinkmaster to alter the ruleset. &IDS::oinkmaster();