possibility of contributing to portal support (USB mass storage)

Winnie Poon winniepoon_home at hotmail.com
Thu Dec 5 19:29:37 UTC 2019


Hi all,

much appreciated if anyone who knows the details can answer some of the questions below.  Would love to help with the portal support if we can.

Thanks,
Winnie

________________________________
From: Winnie Poon <winniepoon_home at hotmail.com>
Sent: December 2, 2019 5:36 PM
To: Alexander Larsson <alexl at redhat.com>
Cc: Flatpak List <flatpak at lists.freedesktop.org>
Subject: possibility of contributing to portal support (USB mass storage)

Hi Alex,

Thanks for making things clear.

I would like to explore the possibility of contributing to the portal support for USB mass storage.   A few questions below to help myself and my teammates to get a better idea.


  *   i understand there's no general portal that works for all USB devices, may i know what USB device types we currently have portal support?
  *   from what you said below, it seems like making it work for USB mass storage would be difficult, but would it be possible to come up with a secured solution for that given we have the time and resources to put into it?
  *   if we would like to contribute to the portal support for USB mass storage, we definitely need help from the flatpak developers, what're the general steps/process?
  *   based on your experience from other portal support,  what would be the risks or you have a rough estimate how much time it may take to implement the portal support for USB mass storage?

Your inputs  (or from others who have the experience) would be greatly appreciated.

Best Regards,
Winnie

________________________________
From: Alexander Larsson <alexl at redhat.com>
Sent: November 28, 2019 7:41 AM
To: Winnie Poon <winniepoon_home at hotmail.com>
Cc: Patrik Nilsson <asavartzeth at gmail.com>; Jan Grulich <jgrulich at redhat.com>; Flatpak List <flatpak at lists.freedesktop.org>; Matthias Clasen <mclasen at redhat.com>; Jorge García <jgarciao at gmail.com>; Ryan <rymg19 at gmail.com>
Subject: Re: flatpak portal example on github

On Tue, Nov 26, 2019 at 8:29 PM Winnie Poon <winniepoon_home at hotmail.com<mailto:winniepoon_home at hotmail.com>> wrote:
Hi all,

that would be sad news 🙁  I remember a while ago when I asked in this mailing list about usb drive access, a few developers including Alex suggested the device portal, that's why I looked into that, but now it seems like --device=all is the ONLY option?

So really my approach of using file chooser to grant permission to the right file e.g. /dev/bus/usb/001/010 would not go anywhere?  like even after if i can somehow solve the root owner issue?

I'm really hoping to have a better solution than using --device=all. 🙁

Yeah, this is a bit unfortunate. However, /dev access is something that is set up at sandbox setup time (i.e. app startup) and thus it has to be static. I.e. we can't change these after the fact, and that would be needed for usb which is highly dynamic.

The file chooser portal works by using a fuse filesystem that protects access to the files, but we can't use fuse for something like a device node, so this can't be done.

We don't have any generic portal that works for all usb devices, we're instead trying to abstract thing out on a higher per-device-type level. I.e. webcams via pipewire, joysticks via wayland, etc.

However, for block devices we can't just pass things back as there are no way to do this safely, and in practice it will not work anyway because all block devices are typically only readable by root.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/flatpak/attachments/20191205/888246eb/attachment.html>


More information about the Flatpak mailing list