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 3E13713222; Tue, 09 Dec 2025 00:38:46 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 8803213192; Tue, 09 Dec 2025 00:38:43 +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 fout-b7-smtp.messagingengine.com (fout-b7-smtp.messagingengine.com [202.12.124.150]) by atuin.qyliss.net (Postfix) with ESMTPS id 30A5C13188 for ; Tue, 09 Dec 2025 00:38:39 +0000 (UTC) Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfout.stl.internal (Postfix) with ESMTP id 13FA71D000B7; Mon, 8 Dec 2025 19:38:36 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Mon, 08 Dec 2025 19:38:36 -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=1765240715; x= 1765327115; bh=eYfVlJqZuvkfIGei8uqehkb2f6xDXefp9yypN77uYGI=; b=f 2c4lkvubTj5tsTNLX4EjRwf4kG8pgNn9pEucB4q3lxpgnJOYgpalxynnE611RQv6 NsJpDxqlJuTNRfcEkvmfdSXuVEiwAIOEuFZlMd2dz0omRXf0U8Lopfiz5DVpbFff rxOEhbggoXgdaMqR7du6EzUPwz6hpn5pd/gnTmUgcbDZBXXronR0ZKu0zl47NHvm 7Xt27UOyJUioQBJp/naFVfTVxq/u1B0LqxhfRyR57jyX3GkXg2Gw2OBDtGRhlbgS TBlGeQLyGxINOx9658YAMqr/aFSt92PapdtO/4V1pvyRaJD3GtxGo2VEBcllHGqs Elu5m3xIgc0eHGQJFrUJw== 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=1765240715; x=1765327115; bh=e YfVlJqZuvkfIGei8uqehkb2f6xDXefp9yypN77uYGI=; b=vIWsuFidQIrh05sav uqV9EyrP51oLiQIg1kyuFICC9y3Lipf8TWzkIYfAF7pLwa/FjhbO1gYQCq2ylpP7 Uz2jfjHp2yhscTBalFiOE04CbSTuNZVTmUPjC4dgbITYZM+ZmpJOQ3VplVjsOqZ9 kjaqgmLXz8txdgjP+/PlcILszYicQ63D1PN8ebqcN7MtgE3X8uVP63CNdiSgiIaw W5I2vzB9r410Y7KThNFt790xpnpV/NTk1iYIk72CYAydmIMP591NhrTSfJanpzZT SW9k+aXxBuel5tBcwSWUmML6t78etRfQmHeC3weXsbv0MH4V+RiR2KhHm3fPK1tb 5g1mg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddukedugecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeetlhihshhsrgcu tfhoshhsuceohhhisegrlhihshhsrgdrihhsqeenucggtffrrghtthgvrhhnpeegueeiud eukeekiedvteffgeekudfhudevvdelvdekhfefieetkeduudejffefgeenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehhihesrghlhihsshgrrd hishdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohep hihurhgvkhgrsegthigsvghrtghhrghoshdruggvvhdprhgtphhtthhopeguvghvvghlse hsphgvtghtrhhumhdqohhsrdhorhhg X-ME-Proxy: Feedback-ID: i12284293:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 8 Dec 2025 19:38:35 -0500 (EST) Received: by fw12.qyliss.net (Postfix, from userid 1000) id 97B5E5E7A297; Tue, 09 Dec 2025 01:38:23 +0100 (CET) From: Alyssa Ross To: devel@spectrum-os.org Subject: [PATCH 3/3] host/rootfs: run router as non-root Date: Tue, 9 Dec 2025 01:38:13 +0100 Message-ID: <20251209003813.553461-3-hi@alyssa.is> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251209003813.553461-1-hi@alyssa.is> References: <20251209003813.553461-1-hi@alyssa.is> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: J4MOBDFYMZTA2NVR3EJMTPYE2XTTGGUL X-Message-ID-Hash: J4MOBDFYMZTA2NVR3EJMTPYE2XTTGGUL 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 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 --- 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 e3ade46..299ea68 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 29f3b25..8c579ce 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 c79747c..f160816 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