Skip to content

portal: Read /.flatpak-info in thread-safe fashion

There is no guarantee that this function would not be called concurrently. Particularly since flatpak_info_read was set to TRUE before /.flatpak-info is actually read from disk, there is a potential race where a second thread would return default values for the various flags set from that file.

WIP because I have compiled this code and run ninja test but I have not tested it in any other way. I have also not seen any evidence that the bug this fixes occurs in the wild: I just happened to be reading the code. I will not be able to work on this any further. The patch looks right though… :-)

Fixes #2159 (closed)

Edited by Philip Withnall

Merge request reports