From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jyzwL-00074A-Gq for ptxdist@pengutronix.de; Fri, 24 Jul 2020 17:48:54 +0200 Received: by mail-wr1-x435.google.com with SMTP id r12so8701685wrj.13 for ; Fri, 24 Jul 2020 08:48:53 -0700 (PDT) From: Bruno Thomsen Date: Fri, 24 Jul 2020 17:48:42 +0200 Message-Id: <20200724154843.5552-5-bruno.thomsen@gmail.com> In-Reply-To: <20200724154843.5552-1-bruno.thomsen@gmail.com> References: <20200724154843.5552-1-bruno.thomsen@gmail.com> MIME-Version: 1.0 Subject: [ptxdist] [PATCH 5/6] chrony: run as chrony user option List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de Cc: Bruno Thomsen , bth@kamstrup.com Default chrony service run as root and that is not best practice as it's doing network communication. Signed-off-by: Bruno Thomsen --- rules/chrony.in | 7 +++++++ rules/chrony.make | 1 + 2 files changed, 8 insertions(+) diff --git a/rules/chrony.in b/rules/chrony.in index 525be2681..6a4f12de0 100644 --- a/rules/chrony.in +++ b/rules/chrony.in @@ -29,6 +29,13 @@ config CHRONY_USE_NETTLE Use nettle crypto library for stronger keys than MD5 in NTP authentication. +config CHRONY_RUN_AS_NON_ROOT + bool + prompt "Run chronyd as non root user" + help + Default chronyd is started as root, select this + to run service with chrony user. + comment "install options ---" config CHRONY_INSTALL_CHRONY_COMMAND diff --git a/rules/chrony.make b/rules/chrony.make index a72752030..d5ae52883 100644 --- a/rules/chrony.make +++ b/rules/chrony.make @@ -48,6 +48,7 @@ CHRONY_CONF_OPT := \ --disable-phc \ --disable-pps \ $(call ptx/ifdef, PTXCONF_GLOBAL_IPV6,,--disable-ipv6) \ + $(call ptx/ifdef, PTXCONF_CHRONY_RUN_AS_USER,--with-user=chrony,) \ --without-seccomp # ---------------------------------------------------------------------------- -- 2.26.2 _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de