flatpak / flatpak-xdg-utils

Simple portal-based commandline tools for use inside flatpak sandboxes
GNU Lesser General Public License v2.1
34 stars 14 forks source link

xdg-open: Avoid the use of O_PATH fds #36

Closed refi64 closed 4 years ago

refi64 commented 4 years ago

As of xdg-desktop-portal 1.8.0, the writable checks become far more strict, meaning that passing an O_PATH fd that the current application has write access to without declaring that it should be writable will result in the open failing. This drops O_PATH in favor of the new standard fd support, and opens the descriptor as read-only to match the GLib behavior.

Fixes flatpak/flatpak#3879.

A6GibKm commented 4 years ago

The files listed at https://github.com/flatpak/flatpak-xdg-utils/search?q=O_PATH might also benefit from this.