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 74EAD6DA3; Wed, 22 Jul 2026 08:17:41 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 53C226D4B; Wed, 22 Jul 2026 08:17:39 +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.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DMARC_MISSING,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=4.0.1 Received: from fout-b3-smtp.messagingengine.com (fout-b3-smtp.messagingengine.com [202.12.124.146]) by atuin.qyliss.net (Postfix) with ESMTPS id E9E726D47 for ; Wed, 22 Jul 2026 08:17:34 +0000 (UTC) Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfout.stl.internal (Postfix) with ESMTP id 42A931D000F8; Wed, 22 Jul 2026 04:17:32 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Wed, 22 Jul 2026 04:17:32 -0400 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=fm1; t=1784708252; x=1784794652; bh=b53WeEGnKk 8Qz4PfZ10CgwTXiJ9Tn3bMT2hSy5DQONw=; b=UkHRCzyeuUnY4JGHpV4lGroklQ Y5+1noSQ/FeJ3/gbA7eGipx0RLiTW1tVa93LipucgIy06GPN8qqgIjCJJtBf5JTJ XXt2u7eVWh/zn/67cAyChigX99aP2wqWBlkwLHXmI5+0FsfB/E5hL3rPUFa5GZ/A aXH6dgz81nBENCkm7pwt+WwnIhgeBDoaXTLUbP29MJCLGIipUyNRmbdq0NZuYPHZ FcVFWUQPsF3TdqQXR3gROmz0fRa9gN3oMbBsumaenOCJ1mgH5Pp/kwJ+YRwzRDsU 9j63JtrzjhRbGl2b5j/iyo2dOC8Wq3yPhaJod1+mM8TBehSa3e9I814Bn5jg== 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=fm2; t= 1784708252; x=1784794652; bh=b53WeEGnKk8Qz4PfZ10CgwTXiJ9Tn3bMT2h Sy5DQONw=; b=oqhcm4p+hv9hVGsVlj955yCj9IYyzIEj9PLOZqEWpnw8hmCAPLB owyBbptvUpRV5XZw1Gq/93fdFtHZ2iWDppmlBe0opgbzLbF4IqU4C4MjN3LuNLn7 a743ajh+xBvFHpUmPw39T9nOdCXGIgJSFkSdvJIoIWHLEJ4g4788smEBi4SrI1vR EQYkAJasKg3264Oz5051UBmeESQh1Pfn8skBhOuH+iW5zki+Hrv2JgJOXtoDUcW/ UCpIOtnI9Mw2aPKB9SGCM4fBiXyDQT+8BHtz9iauuxwoKXPkxDsoYPzNjTM6L96e tVES8vxHvX6uks3Yp1glkLB3RBab6vaVZ0g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTFO1sIDM+1IX9dPZ19rM1RdqNmHDa9RvHZlM8FxgvdPfYuAiEA5JG3WfmkdV+3WYq wkUxJdjGnSeVHcdGz4BHEjGA6Hmt1mxw9EUnrYp8AhONYb0prH3Mrp1v3aTqj0FACNALBd Fhe73oQlvdSCVCqvyiMRPr9cNyb320rmIef1UTFIJhnwTALOp75kX8A5YllkEYIkzvkA42 H+BVcLtdlLGeDFoIY1lA2YLKFcbDnQrn9AfZz2Q+59kA+MC0vP78ahFL8sJjpYAm3QaVfc NCIqqwo6ijh0ynOJcoWx8UzPkh0R8HcSOpPW89bUBpfOrss7TckrJir9fwqcLDLkcJGtBg ikcZSTVnup9UyfsiHVN41osBiAs9WZtp0u0FAZxGLeW/WQnhp1JHbKK5AnpsGSfSu5sUJ9 fUyOSXYqA78fjcO8meC8+9p2fAFeXHzmV0jH0q6drwFf+MjT2YRwLCEj3uUx0QvhWu0amF 9JaatT0JKud6W7ecepBV5lTMMmbf1lQma81+Q0auPv/Sa46MIsS8kSUi2It77ftUduSU/o ZhPhPTIA3jMJkZRs+j04RFQlzATIbpPCtRLGqZ+oS3n3oRfu+rFSbWhpnTK/KGfQz9VF4H Mzl2i+3aZjLyhhnRcEcckyXy2uOZZUWnMCfoPxzc0DiFPpALJDFwpl/WqtmA X-ME-Proxy: Feedback-ID: i12284293:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 22 Jul 2026 04:17:31 -0400 (EDT) Received: by mbp.qyliss.net (Postfix, from userid 1000) id 8CC3C896808B; Wed, 22 Jul 2026 10:17:30 +0200 (CEST) From: Alyssa Ross To: Demi Marie Obenour Subject: Re: Potential improvements to mount-flatpak In-Reply-To: <1bebc170-25cc-4c25-8b93-eef50e0e2685@gmail.com> References: <1bebc170-25cc-4c25-8b93-eef50e0e2685@gmail.com> Date: Wed, 22 Jul 2026 10:17:29 +0200 Message-ID: <87zezjtp46.fsf@alyssa.is> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Message-ID-Hash: KTBYVK4ITLIJXF5QYJQG5V4JTUINIGCW X-Message-ID-Hash: KTBYVK4ITLIJXF5QYJQG5V4JTUINIGCW X-MailFrom: hi@alyssa.is X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; 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; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Spectrum OS Development X-Mailman-Version: 3.3.10 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 Demi Marie Obenour writes: > I looked at the mount-flatpak codebase and noticed some potential > improvements for the future: > > - The code uses std::fs::write to write to files in the target > directory. This is safe because the VM isn't running, but it might > be better to use libpathrs. I think it's fine. > - The code doesn't validate the user-provided app ID, resulting in > worse error messages than otherwise possible. App IDs are always > D-Bus well-known names, so there is no risk of the rules changing > in future versions of Flatpak. Even though Flatpak 2 won't use D-Bus? > - Passing something that isn't a flatpak repository as a parameter > will result in a confusing "no such file or directory" error. Could check that if it's cheap, since this is user-facing. I would not spend much time on it though, since ultimately this should not be the interface people use. > - Various checks for corrupt repositories could be added, such as: > - Wrong number of slashes in "current" symlink. > - Wrong number of slashes in runtime path. > - Bad "active" symlink. I'm not sure I see the value? Does normal Flatpak do these checks? I don't think we need to check everything that could possibly go wrong if it wouldn't be a security concern. > - The code that resolves the "active" symlink is duplicated. I think there's already a patch sitting at the bottom of my inbox for you from this. > - The target mount point is not made "noexec". Sounds like a good improvement. > - mount_setattr() is called on a directory FD. I suspect this > changes parameters of the source mount. It might be better to use > open_tree_attr() with OPEN_TREE_CLONE instead. Well, does it change the source mount or doesn't it? If there's a bug, fix it; if there isn't, don't. (I do think you are probably right though.) --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRV/neXydHjZma5XLJbRZGEIw/wogUCamB8mQAKCRBbRZGEIw/w or8GAQD/lZc5sQD/WmNMsI15zAyIN2xdTSk1R39p/qfzqHLDSwD/VV5qAS6HrPNE Y1yTV460OFqRgSV89ScknFFOoLPjKg0= =su8E -----END PGP SIGNATURE----- --=-=-=--