From patchwork Sun Mar 3 04:26:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 2125 Return-Path: Received: from mail01.ipfire.org (mail01.i.ipfire.org [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 3DEEE88B0AC for ; Sat, 2 Mar 2019 17:29:15 +0000 (GMT) Received: from mail01.i.ipfire.org (localhost [IPv6:::1]) by mail01.ipfire.org (Postfix) with ESMTP id 44BYDp33Kcz5HMKr; Sat, 2 Mar 2019 17:29:14 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201801; t=1551547754; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references:list-id: list-unsubscribe:list-subscribe:list-post; bh=wDVNOiYatdDm4UK05CafBLF5XIqG/QAbYaescd/Sv8s=; b=oOZZtRoMqL5pYn36ilaA5HNEX6A9tUp1HLo+vfHJco1pM4Uu4XmF5f9ajT4v0M14nhOxEL FqmDQ9y2vSZyQJo7Qq15PLOkE7mj3sydvu++JmqT4Ucq7YwallHYpPU0bm8JL16gA7WGVd daBVdBG0U0VRvueEHq66oeeGR+zzvmZFKkZVbpjkm/gInIAG4z1kRQoz0PSsTC0I7jzgSw Yh+LlYgtsc2dexFtdPWkfWPvhN5YcVfeq3KofgnGEZJnxJu775TceRV+J61t9ByKZswchp 0KyoNiAAWV4a4a8nol/aeKm92TWznKkPpLsWUDPpI27SiliHnGnypzOmQEhbAg== Received: from ipfire.tremer.co.uk (unknown [88.215.19.234]) (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 44BYDl2SDYz57Jh4; Sat, 2 Mar 2019 17:29:11 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201801; t=1551547751; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=wDVNOiYatdDm4UK05CafBLF5XIqG/QAbYaescd/Sv8s=; b=r6Lo22M3E/stYPGQtTo9psKVzo0Qduo7ekrvXwmi0pjip114lnBY6rgLQzZ6VIsCPR3nd1 hpg+V/emifN5flxiD7cEXRuP7nS2gaEFGniUb3+6k9hjd8siA16quZOBsWTUwr2nd1Ei17 2DcKEWD5z3UYdgsKOTghk2rFtW64il9rGiek5SocKJ4XKTHrbNRn1CHwrDcCqeyzJ6HpbA HEotvy1RJtvtMEdUp3zrW3PmHLbYm6KJ25qrlAyd1Bcibix36HULTT2JavhvCBOc2o6YgV OUaL34NMy82YIgC8PzVJsuoW/Xu3KbyPK71lhMxTBcTsd002QkoRFPl0FAWiTA== From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH] suricata: Run as non-root user Date: Sat, 2 Mar 2019 17:26:34 +0000 Message-Id: <20190302172634.17190-1-michael.tremer@ipfire.org> X-Mailer: git-send-email 2.12.2 Authentication-Results: mail01.ipfire.org; auth=pass smtp.auth=ms smtp.mailfrom=michael.tremer@ipfire.org X-Spamd-Result: default: False [-4.15 / 11.00]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DKIM_SIGNED(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM(-2.29)[-0.765,0]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:31655, ipnet:88.215.0.0/18, country:GB]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-2.75)[98.93%] X-Spam-Status: No, score=-4.15 X-Rspamd-Server: mail01.i.ipfire.org Cc: Michael Tremer 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" This patch does not have any effect (yet) and is untested because suricata needs to be built against libcap-ng which is currently not being packaged for IPFire. Signed-off-by: Michael Tremer --- config/suricata/suricata.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/config/suricata/suricata.yaml b/config/suricata/suricata.yaml index 8b4ab8c3b..3701fe9c6 100644 --- a/config/suricata/suricata.yaml +++ b/config/suricata/suricata.yaml @@ -268,6 +268,15 @@ asn1-max-frames: 256 ## ############################################################################## +## +## Run Options +## + +# Run suricata as user and group. +run-as: + user: nobody + group: nobody + # Suricata core dump configuration. Limits the size of the core dump file to # approximately max-dump. The actual core dump size will be a multiple of the # page size. Core dumps that would be larger than max-dump are truncated. On