From patchwork Thu Apr 11 19:01:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Heimpold X-Patchwork-Id: 1084260 X-Patchwork-Delegate: dedeckeh@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=heimpold.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ayYDKtBr"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=heimpold.de header.i=@heimpold.de header.b="RFVtE8pW"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44g9PT62KPz9s5c for ; Fri, 12 Apr 2019 05:02:05 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=pZ+nXX2jkwWE3IXWhHsW6Ukg6uJRZbVEgdi4dXMtNMY=; b=ayYDKtBr1POKjY owVZYwuzOdNCM5H7gc5o5iL7VGZcJPgI6NCi21OpQj1ve8AWE7KwI/ubLLB6jouRHELMCPbpdbQXI rNaw2KXX/AMxhF+ifl7u310T1imp0ZY8vdv1bV4Z5oKycQ0ZVATN9iWbMBYsHH9VDFBhiepD0tYfM TrCW/DUqHtRDNX5NOPjJeu6gwLYQm9lt8jBI073M7toA8Dm06JhvFNfT1C490zDSM8iST3Ugzj4om S+fxRm9xXNRByy2FcFtcj6OW8HezDy47WKjrdT0JxidiPogOfalbTtnCaQBTilXspmWUm24yVvlQF dAP5FHNYY73LBkuYQx4Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hEexK-0001wA-Db; Thu, 11 Apr 2019 19:01:50 +0000 Received: from mo6-p01-ob.smtp.rzone.de ([2a01:238:20a:202:5301::7]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hEewo-0001Em-67 for openwrt-devel@lists.openwrt.org; Thu, 11 Apr 2019 19:01:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1555009272; s=strato-dkim-0002; d=heimpold.de; h=References:In-Reply-To:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=ZtXDv2wfc3Vq1zPgywh+akavoItc2YS+1NFwydBJBsw=; b=RFVtE8pW0kar4aFBb+rmtX0sx1lvi0dwjxUo0VGnVufBK6R5roLp/DEnXct9+/dr2p Q9a1ibvX0CabRde44xZtK0soVcenbrra2ufHwwdL+fXIubgvDkJq0GD37GOwPcJ7Rfui rapiX78B8D9a6dRTUXL8zoApe+UhRafoGXHR9fvuABhBcp//4Fn6tNyAELmJh+tGg4vP 61ex/FUeDk186ombsKbg0ZfLdTxtNeiZdyssW2b6X4ni2BF7k8zpnAnA2uOKAyIpIAjX jMNe6wmvr2QNvGICv2OIXy7IC6h6IqYLYbhn1EgEO6OXuG8WA2KUiqrgNqLFlt32xk8j Ni8w== X-RZG-AUTH: ":O2kGeEG7b/pS1EW8QnKjhhg/vO4pzqdNytq77N6ZKUSN7PfdWTGQORRBv+ASfYPl1MuRMYWiaOxmsXvCwkD1MIXR/qnteHeLGeCatA==" X-RZG-CLASS-ID: mo00 Received: from tonne.mhei.heimpold.itr by smtp.strato.de (RZmta 44.18 AUTH) with ESMTPSA id a05700v3BJ1CGqV (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Thu, 11 Apr 2019 21:01:12 +0200 (CEST) Received: from kerker.mhei.heimpold.itr (kerker.mhei.heimpold.itr [192.168.8.1]) by tonne.mhei.heimpold.itr (Postfix) with ESMTP id 9385B149E75; Thu, 11 Apr 2019 21:01:11 +0200 (CEST) From: Michael Heimpold To: openwrt-devel@lists.openwrt.org Date: Thu, 11 Apr 2019 21:01:08 +0200 Message-Id: <20190411190111.11738-3-mhei@heimpold.de> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190411_120118_371776_14DB5DBE X-CRM114-Status: UNSURE ( 6.44 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [2a01:238:20a:202:5301:0:0:7 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain Subject: [OpenWrt-Devel] [PATCH openwrt 3/4] procd: allow passing optional syslog facility as instance parameter X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hans Dedecker , Michael Heimpold MIME-Version: 1.0 Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org While at, also add stdout/stderr documentation. Signed-off-by: Michael Heimpold --- package/system/procd/files/procd.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/package/system/procd/files/procd.sh b/package/system/procd/files/procd.sh index 72f25fe0c0..6115f0702f 100644 --- a/package/system/procd/files/procd.sh +++ b/package/system/procd/files/procd.sh @@ -20,6 +20,9 @@ # limits: resource limits (passed to the process) # user info: array with 1 values $username # pidfile: file name to write pid into +# stdout: boolean whether to redirect commands stdout to syslog (default: 0) +# stderr: boolean whether to redirect commands stderr to syslog (default: 0) +# facility: syslog facility used when logging to syslog (default: daemon) # # No space separation is done for arrays/tables - use one function argument per command line argument # @@ -249,7 +252,7 @@ _procd_set_param() { reload_signal) json_add_int "$type" $(kill -l "$1") ;; - pidfile|user|seccomp|capabilities) + pidfile|user|seccomp|capabilities|facility) json_add_string "$type" "$1" ;; stdout|stderr|no_new_privs)