From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Sat, 19 Jun 2021 17:27:04 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1lucsC-000863-5n for lore@lore.pengutronix.de; Sat, 19 Jun 2021 17:27:04 +0200 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1lucsB-00068s-O7; Sat, 19 Jun 2021 17:27:03 +0200 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lucrc-00068j-Sq for ptxdist@pengutronix.de; Sat, 19 Jun 2021 17:26:29 +0200 Received: by mail-wm1-x32b.google.com with SMTP id v20-20020a05600c2154b02901dcefb16af0so57943wml.5 for ; Sat, 19 Jun 2021 08:26:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=aPDiWN7QgY86j7exLeFu56bUKlMFaulsOp6B74w+dMw=; b=CqmvqZEzglZCjTv0sTytpOaKKNT4NjC5K7CrDWk9TImhE4S/edQje//2PUMsTbhLUW o1GHn7xv+u0Mt2Vyp4HdsIkxfPTB4QQZkgBRAkySwBATkoOtgyY7uOGnmlQ7Bmr9Sw5M 97z0BYyTQ1lOx2Mu9M8BufXk3/dbl656mEB7RVAS7P0rTXebW09e5neIiufROv3zCpQB fUf+9P16F4ZmefEa4//pOUJFmm1ZvJ0enSclBqfXHRqYErNyE+eD5DNIfIBBNFwduMDG kBQxVeZ7ru0rNs697/iU1ugpifqri+lcxXJZHeIM7/qkYqiOllvrh2SP7oI7Iwgc/84l hO5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=aPDiWN7QgY86j7exLeFu56bUKlMFaulsOp6B74w+dMw=; b=pzRQT6RbgsLif6O+Ym6xgEOowrfhKGCOwVEfFCDArxPFLILC8WnkOBFCaGL9Q1Mh2v C1l9Ckyiv1amqrGCizIE82BFLuh8FuCexBYhyYO9rbfAS5VP83PhW4sSmK4aed/Tp7Hc DX41nClSJQqXXmsT1H7FnBJFDrbSJiWIh/2odgsbFoIH6RLTwxHLRqRDDrxcx6IgXlZB HDqQR6OrL3X31do1vGD4epOhXKyDnqT8TI2Bvs0ytAoDQMLaE5bE+I4w+YxReveusSku Xq1IsGi3oa2v9HD0oxMzub0D8eert+AI4jH/l1ZvWV27bRcBkl1iCMKxWd1QTJQ/r4In Z4ag== X-Gm-Message-State: AOAM533c83R3hpskPVOAl5ug+/7dBXlhZFGlkkQnxIkEshhB2RNsfDc+ 1IQkfZNg/br9Iyi7qY31KPcZRyLl6azweA== X-Google-Smtp-Source: ABdhPJw4B1B5miG8TtJSzZx6IMlHaTW29AA6IH6wipaPFKpvyFhvutxPrts7A4GbopFQLEQe/llQLA== X-Received: by 2002:a1c:c90c:: with SMTP id f12mr1725344wmb.80.1624116388125; Sat, 19 Jun 2021 08:26:28 -0700 (PDT) Received: from xps13.lan (3e6b100e.rev.stofanet.dk. [62.107.16.14]) by smtp.gmail.com with ESMTPSA id b71sm5403592wmb.2.2021.06.19.08.26.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Jun 2021 08:26:27 -0700 (PDT) From: Bruno Thomsen To: ptxdist@pengutronix.de Date: Sat, 19 Jun 2021 17:26:07 +0200 Message-Id: <20210619152607.858107-1-bruno.thomsen@gmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.ext.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-2.7 required=4.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Subject: [ptxdist] [PATCH] chrony: fix runtime with busybox init X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: bruno.thomsen@gmail.com, bth@kamstrup.com, m.ciocan@ppc-ag.de Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false Run as root if busybox init is used (INITMETHOD_BBINIT) so runtime directory is read and writable. When running under systemd (INITMETHOD_SYSTEMD) use chrony user. A busybox init system typically ends up with a turtle shell security architecture where systemd is used when defense in depth is needed. Signed-off-by: Bruno Thomsen --- rules/chrony.make | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules/chrony.make b/rules/chrony.make index 4435b8e97..cbdf9314b 100644 --- a/rules/chrony.make +++ b/rules/chrony.make @@ -54,7 +54,7 @@ CHRONY_CONF_OPT := \ --disable-phc \ $(call ptx/ifdef, PTXCONF_CHRONY_PPS_REFCLK,,--disable-pps) \ $(call ptx/ifdef, PTXCONF_GLOBAL_IPV6,,--disable-ipv6) \ - --with-user=chrony \ + --with-user=$(call ptx/ifdef, PTXCONF_INITMETHOD_SYSTEMD,chrony,root) \ $(call ptx/ifdef, PTXCONF_CHRONY_SECCOMP,--enable-scfilter,) \ $(call ptx/ifdef, PTXCONF_CHRONY_SECCOMP,,--without-seccomp) base-commit: e1f0f2abd3116fdcb5e3e3211321aef801e959ff -- 2.31.1 _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de