From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from atuin.qyliss.net (localhost [IPv6:::1]) by atuin.qyliss.net (Postfix) with ESMTP id DF2F817142; Tue, 09 Dec 2025 12:56:23 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 753DE17132; Tue, 09 Dec 2025 12:56:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on atuin.qyliss.net X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DMARC_MISSING,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=4.0.1 Received: from fhigh-b7-smtp.messagingengine.com (fhigh-b7-smtp.messagingengine.com [202.12.124.158]) by atuin.qyliss.net (Postfix) with ESMTPS id 9D36C17130 for ; Tue, 09 Dec 2025 12:56:19 +0000 (UTC) Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.stl.internal (Postfix) with ESMTP id 2D1B77A0062; Tue, 9 Dec 2025 07:56:17 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Tue, 09 Dec 2025 07:56:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alyssa.is; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm3; t=1765284977; x= 1765371377; bh=M288itxoFfF8BwU7HziyzlQCNS7W/qv8gD16GvPOHas=; b=L mCazMo1Efrnk/eHBXMZI1PcqOC+TVw6ef4SaFOvj2SP5hCj75ALOfx/A2mbe6A84 gF4vpuj40UwzHXfH310lvKzVCUBAv8U4ihRwE2bp/nqPVP0hL3uGbm68MyFgggda Pgr+ELholCvL4QcArY2Zy5lvIeK+iTAkMLVPnBH8YrZti4adMwrZa2HkkdHYupV2 QI63d2mlxfDmVAvPqkMOeRaj92cu5MEL+LiEMoPT+BkXtxWpelqTN4SiQxN/6Z+9 Wf4Zsfc8PTCA7JC/kOhzfWO9AoLY7lwUl6J/hAg8TLRixZ1vX953Jzgnd+qMxUEy eRO3uAH4Ou4bGBrAk4Jyg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1765284977; x=1765371377; bh=M 288itxoFfF8BwU7HziyzlQCNS7W/qv8gD16GvPOHas=; b=ZUTOrXgd2gwPjrszl Ojf0igCOub0tkXE2+t0pE5XuieNf6nOszCP+gDEvK3wiUn6WrWCjjJ9OdOKanLzN s5GjXLbOXdFWu4jTYR+TctpOd9kpYZuotYry5rFHMMrsQyrNl4xpChYEi2OTurYx W2KLGkwvFCqVHd5zygrEaT3UITxBK63QDu1e2wmMyN6zIrKqt+GVulI8YKJp8C4n 5w8iMCj9YRp01sjVSKcVPxuQC0xN+vZJTK132NWlwJ+2kaqlC/TJqyYjsZcnb8Es cR+5q/OW8n4rtC6RuAaC8Gh/O7eckXXhMs6XtZ9qZSILnoGud7ip+wSgPUwbZ2+9 ScByQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdduleeivdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeetlhihshhsrgcu tfhoshhsuceohhhisegrlhihshhsrgdrihhsqeenucggtffrrghtthgvrhhnpeegueeiud eukeekiedvteffgeekudfhudevvdelvdekhfefieetkeduudejffefgeenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehhihesrghlhihsshgrrd hishdpnhgspghrtghpthhtohepfedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohep hihurhgvkhgrsegthigsvghrtghhrghoshdruggvvhdprhgtphhtthhopeguvghmihhosg gvnhhouhhrsehgmhgrihhlrdgtohhmpdhrtghpthhtohepuggvvhgvlhesshhpvggtthhr uhhmqdhoshdrohhrgh X-ME-Proxy: Feedback-ID: i12284293:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 9 Dec 2025 07:56:16 -0500 (EST) Received: by fw12.qyliss.net (Postfix, from userid 1000) id C6998604EA02; Tue, 09 Dec 2025 13:56:10 +0100 (CET) From: Alyssa Ross To: devel@spectrum-os.org Subject: [PATCH v3 3/3] host/rootfs: run router as non-root Date: Tue, 9 Dec 2025 13:54:45 +0100 Message-ID: <20251209125442.719952-6-hi@alyssa.is> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251209125442.719952-2-hi@alyssa.is> References: <20251209125442.719952-2-hi@alyssa.is> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: 3LXJABKHBHHNHMJGUWEX7RG2JOMRIV2P X-Message-ID-Hash: 3LXJABKHBHHNHMJGUWEX7RG2JOMRIV2P X-MailFrom: hi@alyssa.is X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-devel.spectrum-os.org-0; header-match-devel.spectrum-os.org-1; header-match-devel.spectrum-os.org-2; header-match-devel.spectrum-os.org-3; header-match-devel.spectrum-os.org-4; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Yureka Lilian , Demi Marie Obenour X-Mailman-Version: 3.3.9 Precedence: list List-Id: Patches and low-level development discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Signed-off-by: Alyssa Ross --- v3: no change host/rootfs/image/etc/group | 1 + host/rootfs/image/etc/passwd | 1 + .../vm-services/template/data/service/spectrum-router/run | 4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/host/rootfs/image/etc/group b/host/rootfs/image/etc/group index e3ade468..299ea68a 100644 --- a/host/rootfs/image/etc/group +++ b/host/rootfs/image/etc/group @@ -13,3 +13,4 @@ disk:x:11: cdrom:x:12: tape:x:13: kvm:x:14: +router:x:15:router diff --git a/host/rootfs/image/etc/passwd b/host/rootfs/image/etc/passwd index 29f3b252..8c579ce8 100644 --- a/host/rootfs/image/etc/passwd +++ b/host/rootfs/image/etc/passwd @@ -1 +1,2 @@ root:x:0:0:System administrator:/:/bin/sh +router:x:15:15::/:/bin/nologin diff --git a/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/spectrum-router/run b/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/spectrum-router/run index ec26b76f..2c6626e3 100755 --- a/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/spectrum-router/run +++ b/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/spectrum-router/run @@ -11,13 +11,15 @@ fdmove -c 3 0 s6-ipcserver-socketbinder -a 0770 /run/router/${VM} fdmove -c 4 0 +redirfd -r 0 /dev/null + # Notify readiness. if { fdmove -c 5 1 echo } -redirfd -r 0 /dev/null +s6-setuidgid router bwrap --unshare-all -- 2.51.0