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 194A716CED; Tue, 09 Dec 2025 12:12:27 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 822E316CD2; Tue, 09 Dec 2025 12:12:24 +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-b6-smtp.messagingengine.com (fhigh-b6-smtp.messagingengine.com [202.12.124.157]) by atuin.qyliss.net (Postfix) with ESMTPS id 7B0E516CCC for ; Tue, 09 Dec 2025 12:12:23 +0000 (UTC) Received: from phl-compute-07.internal (phl-compute-07.internal [10.202.2.47]) by mailfhigh.stl.internal (Postfix) with ESMTP id 16E857A00A9; Tue, 9 Dec 2025 07:12:21 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-07.internal (MEProxy); Tue, 09 Dec 2025 07:12:21 -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=1765282340; x= 1765368740; bh=A4INNJfc/YSAPNasz6N1Yw6Utc5anQkkYV+M0myJmws=; b=J TipWrhG24D3BDhiVOts4qsMbSUhbE5fiPZ0MB8p7qcEKNL+DE6kckv5ev85o6qon Xj9KlnGf7HEZsn5N49An1aPq9xfr+LcY2uS7+neXjyhWWceXAapHNZJyXdjxw08/ ylTnxeYHYD3VO3OuII6Hus1kKG592hVREwc+WXfhoff3H/FGK81+Ui9nSsUC5G7O YM+mc8ZGd1eotn8KLxbGFNTQW8zCADOWL4TG/U/7QW1/Ve5TYYfemwUt0No8lePO bJQO8ykDNF21D7NQQusZ6eOESMm7fGepVyAzRffuZSuIdWEs9OSZABx2NXWua6v/ Hrq6hU4S7PlQVD1vqQa2Q== 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=1765282340; x=1765368740; bh=A 4INNJfc/YSAPNasz6N1Yw6Utc5anQkkYV+M0myJmws=; b=n2+4XHq+vajtNLmPQ 5WjgYkgl7IAKvoOcU/QnFDKpMF0XuAE1HZ/klT5iWgvEkBq+fK8atnXHHBAPoeBM vhE/Frcv8cZxWQ9z7hus8DeeEi7bDWF+1ubWD3J1jyCoJwoKYbvZc91klJ6jz6BD oueOY6uLtkpCds7+UfQWJxojH0EAgOAc/j1ucexflxnEziY+WRnINocGhgBd1K5P 3qIT4IDd60DnFEZ7Hr0Icwua+2Q2rasXd5JNsmh4WhLYu8Jz57bBP6bQVW/Xkjn3 Dt3yK+rt5gTXL6rUAm8lycYq5vlCA1pOur+m9Yn3E9PhzOnwfeejn4bKg0oqho+h fCGOA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdduleehfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeetlhihshhsrgcu tfhoshhsuceohhhisegrlhihshhsrgdrihhsqeenucggtffrrghtthgvrhhnpedvkeeltd evteehtedtleeikeejudegtdfhkedtgfegheevhfelgefhueevkeelgfenucffohhmrghi nhepshhpvggtthhruhhmqdhoshdrohhrghdpfhhrvggvuggvshhkthhophdrohhrghenuc evlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehhihesrghl hihsshgrrdhishdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtg hpthhtohepuggvmhhiohgsvghnohhurhesghhmrghilhdrtghomhdprhgtphhtthhopegu vghvvghlsehsphgvtghtrhhumhdqohhsrdhorhhg X-ME-Proxy: Feedback-ID: i12284293:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 9 Dec 2025 07:12:20 -0500 (EST) Received: by fw12.qyliss.net (Postfix, from userid 1000) id BECB4604E05A; Tue, 09 Dec 2025 13:12:09 +0100 (CET) From: Alyssa Ross To: devel@spectrum-os.org Subject: [PATCH v2 5/6] host/rootfs: add wayland group Date: Tue, 9 Dec 2025 13:10:27 +0100 Message-ID: <20251209121023.705026-10-hi@alyssa.is> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251209121023.705026-2-hi@alyssa.is> References: <20251209121023.705026-2-hi@alyssa.is> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: QZEHCMGGCF6BMCMGIDOCDQTTIJTJY4ZN X-Message-ID-Hash: QZEHCMGGCF6BMCMGIDOCDQTTIJTJY4ZN 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: 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: This will allow clients running as unprivileged users to connect to the compositor. Signed-off-by: Alyssa Ross Message-ID: <20251209085628.603316-5-hi@alyssa.is> --- v2: avoid widening umask for weston v1: https://spectrum-os.org/lists/archives/spectrum-devel/20251209085628.603316-5-hi@alyssa.is/ .../etc/s6-linux-init/run-image/etc/group | 1 + .../image/etc/s6-rc/weston/notification-fd | 2 +- .../etc/s6-rc/weston/notification-fd.license | 2 +- host/rootfs/image/etc/s6-rc/weston/run | 21 +++++++++++++++++++ 4 files changed, 24 insertions(+), 2 deletions(-) diff --git a/host/rootfs/image/etc/s6-linux-init/run-image/etc/group b/host/rootfs/image/etc/s6-linux-init/run-image/etc/group index e3ade468..fe72eb76 100644 --- a/host/rootfs/image/etc/s6-linux-init/run-image/etc/group +++ b/host/rootfs/image/etc/s6-linux-init/run-image/etc/group @@ -13,3 +13,4 @@ disk:x:11: cdrom:x:12: tape:x:13: kvm:x:14: +wayland:x:15: diff --git a/host/rootfs/image/etc/s6-rc/weston/notification-fd b/host/rootfs/image/etc/s6-rc/weston/notification-fd index 00750edc..7ed6ff82 100644 --- a/host/rootfs/image/etc/s6-rc/weston/notification-fd +++ b/host/rootfs/image/etc/s6-rc/weston/notification-fd @@ -1 +1 @@ -3 +5 diff --git a/host/rootfs/image/etc/s6-rc/weston/notification-fd.license b/host/rootfs/image/etc/s6-rc/weston/notification-fd.license index c49c11b6..0d3d47ca 100644 --- a/host/rootfs/image/etc/s6-rc/weston/notification-fd.license +++ b/host/rootfs/image/etc/s6-rc/weston/notification-fd.license @@ -1,2 +1,2 @@ SPDX-License-Identifier: CC0-1.0 -SPDX-FileCopyrightText: 2021 Alyssa Ross +SPDX-FileCopyrightText: 2025 Alyssa Ross diff --git a/host/rootfs/image/etc/s6-rc/weston/run b/host/rootfs/image/etc/s6-rc/weston/run index aa1e7b61..167675de 100644 --- a/host/rootfs/image/etc/s6-rc/weston/run +++ b/host/rootfs/image/etc/s6-rc/weston/run @@ -4,6 +4,26 @@ importas -Siu WAYLAND_DISPLAY +piperw 4 3 +background { + fdclose 3 + + if { + fdmove -c 0 4 + redirfd -w 1 /dev/null + head -c 1 + } + fdclose 4 + + if { chmod -- 0770 $WAYLAND_DISPLAY } + if { chgrp -- wayland $WAYLAND_DISPLAY } + + fdmove -c 1 5 + echo +} +fdclose 4 +fdclose 5 + # Workaround for # https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/1911 if { mkdir -p -m 0700 /run/user/0 } @@ -20,4 +40,5 @@ importas -i home HOME cd $home if { udevadm wait /dev/dri/card0 } unshare --cgroup --ipc --net --uts + weston -S $WAYLAND_DISPLAY -- 2.51.0