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 4D40F166AC; Tue, 09 Dec 2025 11:09:21 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 5E4BD1669B; Tue, 09 Dec 2025 11:09:18 +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-a6-smtp.messagingengine.com (fout-a6-smtp.messagingengine.com [103.168.172.149]) by atuin.qyliss.net (Postfix) with ESMTPS id CB57216640 for ; Tue, 09 Dec 2025 11:09:17 +0000 (UTC) Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfout.phl.internal (Postfix) with ESMTP id B4D2BEC03F9; Tue, 9 Dec 2025 06:09:15 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-06.internal (MEProxy); Tue, 09 Dec 2025 06:09:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alyssa.is; h=cc :cc:content-type: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=1765278555; x=1765364955; bh=pSRaW37Llx IMyLoO3JS0rBhFRnAPuGKpMiLspSgOhCg=; b=DNLICXw3/TPVK5u4utqiixFvAn k6nilzTk2k9sZE7soj0NdnHMe9ePUUcbY1zlgsQoK9hOe3P6KB46V3xPft2LuvCR W8b5OfLLTL029VPTpetvO09b+3jSZTVr9kUY5q0kQQio691+fZMWn+fJTWGMPejj pAYoPp+a0E+oNn4tOzOVwT97SWSz3th08wrQkj8Tz8hHzZ28OY187FhPkfmPhc0u qKJU4PrtzNtRpyYJba8iveubdk4ZvIvpPnWkaM0eEdLoOyfQm2fXEP3CXxKj+Exh WHwY/5Vm5LCT8FHMKD1mvMHKZ9nzR7aUX7EpcFRpLrckBxCTv/bDtP4BP5QA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type: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= 1765278555; x=1765364955; bh=pSRaW37LlxIMyLoO3JS0rBhFRnAPuGKpMiL spSgOhCg=; b=EiByj5gGmsC8Fhw1eiZMmqW65HTHlHNnJZi+y8aadOXU6uFW6Q6 5Kw1ujCVmkn0wFOb5As5SMgfqAmzSHOzP3FTjsH8R7Etl1PzLXd+Q2NOwtM+egH5 pu4DmFYdbWftryiwBukRSGlV1HnJJsQK9cFrUKcsjAVW03KGlbHT3TC8Xjw7Cwc8 3g5nUcJrTkNVlAY44BtfoNWOfiAw6Y6K3Cnus6EIylw5mFsCfex39cWu0aQEGVyn ZVAFhCjphNwKMaGrlrPADvfZlBSSQUObscj+5fcy1jg5COvC/nG/pyJvkekv9JZw pnBQZHiIrXgqmOGbzNLMtd7NXdQkkIrb6tw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdduleegtdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefhvfevufgjfhffkfggtgesghdtreertddttdenucfhrhhomheptehlhihsshgrucft ohhsshcuoehhihesrghlhihsshgrrdhisheqnecuggftrfgrthhtvghrnhepieduffeuie elgfetgfdttddtkeekheekgfehkedufeevteegfeeiffetvdetueevnecuvehluhhsthgv rhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhephhhisegrlhihshhsrgdrih hspdhnsggprhgtphhtthhopedvpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegu vghmihhosggvnhhouhhrsehgmhgrihhlrdgtohhmpdhrtghpthhtohepuggvvhgvlhessh hpvggtthhruhhmqdhoshdrohhrgh X-ME-Proxy: Feedback-ID: i12284293:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 9 Dec 2025 06:09:15 -0500 (EST) Received: by fw12.qyliss.net (Postfix, from userid 1000) id 63B3F5FCEB7E; Tue, 09 Dec 2025 12:09:04 +0100 (CET) From: Alyssa Ross To: Demi Marie Obenour Subject: Re: [PATCH 5/5] host/rootfs: add wayland group In-Reply-To: References: <20251209085628.603316-1-hi@alyssa.is> <20251209085628.603316-5-hi@alyssa.is> <2c297bde-f30f-42aa-9f3e-e8948bb5b1ec@gmail.com> Date: Tue, 09 Dec 2025 12:09:03 +0100 Message-ID: <87ms3rkj3k.fsf@alyssa.is> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Message-ID-Hash: D26ZL5WSSTWLHUKHQSKMZRUZWKSY6RIV X-Message-ID-Hash: D26ZL5WSSTWLHUKHQSKMZRUZWKSY6RIV 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: devel@spectrum-os.org 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: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Demi Marie Obenour writes: > On 12/9/25 05:59, Alyssa Ross wrote: >> On Tue, Dec 09, 2025 at 05:55:22AM -0500, Demi Marie Obenour wrote: >>> On 12/9/25 03:56, Alyssa Ross wrote: >>>> This will allow clients running as unprivileged users to connect to >>>> the compositor. >>>> >>>> Signed-off-by: Alyssa Ross >>>> --- >>>> host/rootfs/image/etc/s6-linux-init/run-image/etc/group | 1 + >>>> host/rootfs/image/etc/s6-rc/weston/run | 5 +++++ >>>> 2 files changed, 6 insertions(+) >>>> >>>> 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 e3ade46..fe72eb7 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/run b/host/rootfs/imag= e/etc/s6-rc/weston/run >>>> index aa1e7b6..7cb182f 100644 >>>> --- a/host/rootfs/image/etc/s6-rc/weston/run >>>> +++ b/host/rootfs/image/etc/s6-rc/weston/run >>>> @@ -20,4 +20,9 @@ importas -i home HOME >>>> cd $home >>>> if { udevadm wait /dev/dri/card0 } >>>> unshare --cgroup --ipc --net --uts >>>> + >>>> +s6-envuidgid root >>>> +s6-envuidgid -g wayland >>>> +s6-applyuidgid -Uz >>>> +umask 002 >>>> weston -S $WAYLAND_DISPLAY >>> >>> Can the socket be chmod'd after Weston starts? Running with 002 >>> umask is not great. >>=20 >> If we use sd-notify-adapter, then I think so, but it wouldn't be very >> nice. > > Using sd-notify-adapter is probably a good idea anyway, so that nothing > tries to connect to the socket before it is there to connect to. Oh, right, we actually already have readiness notification via /etc/xdg/weston/autolaunch. It won't run as root soon, but we could wait for that in the run script and do the chmod there. >> What's the problem with umask 002? > > It means that any files created by the service are group-writable and > world-readable, which is almost never what one wants. It means that > the service can't even trust a file it itself created. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQQGoGac7QfI+H5ZtFCZddwkt31pFQUCaTgDTwAKCRCZddwkt31p FST+AP4mN5e5yicaAlrO/ZoLVpqjWnNXq2/4fPHLwnZULtrvEwD9FjY83F5B9GV2 +t2F1q11dvESozk9pyvAziNC5d8PFww= =/JnO -----END PGP SIGNATURE----- --=-=-=--