[gnome-builder/gnome-builder-41] flatpak: ignore system installation when installing



commit 437af80300ecc3302385995102943d330e40ba4a
Author: Christian Hergert <chergert redhat com>
Date:   Mon Sep 27 20:08:29 2021 -0700

    flatpak: ignore system installation when installing
    
    We can't write to the system installation using libflatpak, so we must
    fallback to either user or our private installation.

 src/plugins/flatpak/daemon/ipc-flatpak-service-impl.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/flatpak/daemon/ipc-flatpak-service-impl.c 
b/src/plugins/flatpak/daemon/ipc-flatpak-service-impl.c
index 67230fca3..9d3c80e7b 100644
--- a/src/plugins/flatpak/daemon/ipc-flatpak-service-impl.c
+++ b/src/plugins/flatpak/daemon/ipc-flatpak-service-impl.c
@@ -967,8 +967,12 @@ find_installations_for_refs (IpcFlatpakServiceImpl *self,
             }
         }
 
-      /* Now see if it is found in a configured remote */
-      if ((remote = find_remote_for_ref (self, ir->fref, &install)))
+      /* Now see if it is found in a configured remote. We must limit things
+       * to user installations because we cannot write to the host system
+       * from within the sandbox.
+       */
+      if ((remote = find_remote_for_ref (self, ir->fref, &install)) &&
+          flatpak_installation_get_is_user (install))
         {
           g_ptr_array_add (installations, g_steal_pointer (&install));
           goto next_ref;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]