From patchwork Thu Apr 11 19:01:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Heimpold X-Patchwork-Id: 1084257 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="V1XHde3q"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=heimpold.de header.i=@heimpold.de header.b="qddZa30Y"; 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 44g9P130GVz9s5c for ; Fri, 12 Apr 2019 05:01:41 +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=b+85FdI+Ys152G9eF4WZ/huojvFLeAENOVjcHZourPA=; b=V1XHde3qk1x6Us zi37QgmoE/1u6zMTQz1/RUNzqE774Fko13Y1Y4wLXcBqXKgtqAb5onY1twYXSM7VhVFZccq4MDqN1 dAtIOnO9kAZPX8jY1OCSPKIV1PrdZcFX+icwewONKrN2iGrSBWs3Llk1FJ+xco+nSZ1NEy4Q8zSNT UDKOU0/hvI9F6nfmqUpu0USG65v3HbQuFv5VuAt1O/STGD+1gbX1P5d+H7sidX2Js2iSxYcB9FNEF +U1vFbrJVMVGt24yKaniGAIGlE1X4818dYnQp0zpo1B2f/ZazLdKgrR+GbGwJRaFotlcBIMNiokju h3OxNE+lyZ6+5sATB9Yg==; 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 1hEewr-0001G6-1V; Thu, 11 Apr 2019 19:01:21 +0000 Received: from mo6-p00-ob.smtp.rzone.de ([2a01:238:20a:202:5300::6]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hEewo-0001Ek-5U for openwrt-devel@lists.openwrt.org; Thu, 11 Apr 2019 19:01:19 +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=hxOCE213TNTvZ9LqnIg/sxSeVQbGH9TbEFYONfsII1s=; b=qddZa30Yye3mGXXohkfa+wavTS2IjpXhVy+x4ylrX6olLJl5wlWqy2JoOx5VJ+DVcA 1+KjSSHXLw3ppNUYVMumZlwgwuLLYLFpQHq3QWgyJMoc6xH01uLmU58iwjlbltWuqk8p AIne0qG952SHIX1eRMcG7PdlN21Bp651e5IkuYdMFoI1xoJm6vsGFgYj1Nd3C43BgIfC 86kahsd4NBIgXlJuSpKYZ7bHK1f9RryLQZm+fxLrJjlAGXtNSnQFQJHe0a7tENyp59qF EVpT3aDwR0EuW+NkVIZDWU/q1O9ymu5IxlCczHNfO4DBFEgXf6ZrFv/y4/TJdLIwdUEY yERw== 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 a05700v3BJ1CGqW (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 A69C3149E77; 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:09 +0200 Message-Id: <20190411190111.11738-4-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_357782_9E3DFA46 X-CRM114-Status: UNSURE ( 6.84 ) 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:5300:0:0:6 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 4/4] procd: allow passing optional group 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 Signed-off-by: Michael Heimpold --- package/system/procd/files/procd.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package/system/procd/files/procd.sh b/package/system/procd/files/procd.sh index 6115f0702f..b49b2b9d01 100644 --- a/package/system/procd/files/procd.sh +++ b/package/system/procd/files/procd.sh @@ -18,7 +18,8 @@ # file: configuration files (array) # netdev: bound network device (detects ifindex changes) # limits: resource limits (passed to the process) -# user info: array with 1 values $username +# user: $username to run service as +# group: $groupname to run service as # 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) @@ -252,7 +253,7 @@ _procd_set_param() { reload_signal) json_add_int "$type" $(kill -l "$1") ;; - pidfile|user|seccomp|capabilities|facility) + pidfile|user|group|seccomp|capabilities|facility) json_add_string "$type" "$1" ;; stdout|stderr|no_new_privs)