Hi,
I would like to request classic confinement for DawnlightSearch, which is a simple file search tool.
Source code: https://github.com/chg-hou/DawnlightSearch
Reasons for requiring classic confinement:
- it calls “lsblk” to acquire device uuids to store file information in the corresponding tables.
- it has to access the file system and use “lstat” to access the file attributes.
- its open-file and copy function also require direct access to the file system.
Thanks for your time.
Regards
ChG
We should update the hardware-observe interface to support “lsblk”. I’ve taken a todo for this.
As for lstat and open/copy functionality, is this meant to be used for all files on the system or just files in the user’s home? If the latter, you can ‘plugs: [ home, removable-media ]’ which should do what you need. If the former, does the application use portals? If so, you could instead ‘plugs: [ desktop ]’.
Thanks for your reply.
Following your suggestions, I tested under strict confinement with [desktop, hardware-observe, home …] plugs connected. It works fine except some KIO issues, failing to access “/usr” folder, and the “Allow Opening File” popup. So classic confinement is no longer vital. I should withdraw this request.
I also found:
- “lstat” shows different device IDs for root dir “/” and its subfolders.
- “lsblk” actually can fetch uuid using hardware-observe interface. However, none of “df”, '‘mount’, ''lsblk" cab get the mount points. Looking forward to the hardware-observe update.
Thanks again.
You’ll certainly need ‘mount-observe’ for the mountpoints. Do note that the strict mode snap has a different mount namespace than the the global one that is used with classic confinement, which probably explains the different IDs you’re seeing.