diff options
author | Umang Jain <umang@endlessm.com> | 2019-02-22 15:56:20 +0530 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2019-04-09 09:18:15 +0000 |
commit | 0c80b4b12aa47994b8deb0a51384a1fa5156e6e7 (patch) | |
tree | d4b9d245030b70827039707fad82b0a4106e7684 /common | |
parent | e544c40f5b4b90def2a85bb260dbc3f51becfdfd (diff) | |
download | flatpak-0c80b4b12aa47994b8deb0a51384a1fa5156e6e7.tar.gz |
common/flatpak-dir: Allow helper function to pass out_fd_list
Closes: #2657
Approved by: alexlarsson
Diffstat (limited to 'common')
-rw-r--r-- | common/flatpak-dir.c | 51 |
1 files changed, 27 insertions, 24 deletions
diff --git a/common/flatpak-dir.c b/common/flatpak-dir.c index 036c8d31..4dee35ae 100644 --- a/common/flatpak-dir.c +++ b/common/flatpak-dir.c @@ -1177,6 +1177,7 @@ flatpak_dir_system_helper_call (FlatpakDir *self, const gchar *method_name, GVariant *parameters, const GVariantType *reply_type, + GUnixFDList **out_fd_list, GCancellable *cancellable, GError **error) { @@ -1202,17 +1203,19 @@ flatpak_dir_system_helper_call (FlatpakDir *self, } g_debug ("Calling system helper: %s", method_name); - res = g_dbus_connection_call_sync (self->system_helper_bus, - "org.freedesktop.Flatpak.SystemHelper", - "/org/freedesktop/Flatpak/SystemHelper", - "org.freedesktop.Flatpak.SystemHelper", - method_name, - parameters, - reply_type, - G_DBUS_CALL_FLAGS_NONE, G_MAXINT, - cancellable, - error); - if (res == NULL && error) + res = g_dbus_connection_call_with_unix_fd_list_sync (self->system_helper_bus, + "org.freedesktop.Flatpak.SystemHelper", + "/org/freedesktop/Flatpak/SystemHelper", + "org.freedesktop.Flatpak.SystemHelper", + method_name, + parameters, + reply_type, + G_DBUS_CALL_FLAGS_NONE, G_MAXINT, + NULL, out_fd_list, + cancellable, + error); + + if (res == NULL && error) g_dbus_error_strip_remote_error (*error); return res; @@ -1241,7 +1244,7 @@ flatpak_dir_system_helper_call_deploy (FlatpakDir *self, arg_origin, arg_subpaths, arg_installation), - G_VARIANT_TYPE ("()"), + G_VARIANT_TYPE ("()"), NULL, cancellable, error); return ret != NULL; } @@ -1267,7 +1270,7 @@ flatpak_dir_system_helper_call_deploy_appstream (FlatpakDir *self, arg_origin, arg_arch, arg_installation), - G_VARIANT_TYPE ("()"), + G_VARIANT_TYPE ("()"), NULL, cancellable, error); return ret != NULL; } @@ -1289,7 +1292,7 @@ flatpak_dir_system_helper_call_uninstall (FlatpakDir *self, arg_flags, arg_ref, arg_installation), - G_VARIANT_TYPE ("()"), + G_VARIANT_TYPE ("()"), NULL, cancellable, error); return ret != NULL; } @@ -1314,7 +1317,7 @@ flatpak_dir_system_helper_call_install_bundle (FlatpakDir *self, arg_flags, arg_remote, arg_installation), - G_VARIANT_TYPE ("(s)"), + G_VARIANT_TYPE ("(s)"), NULL, cancellable, error); if (ret == NULL) return FALSE; @@ -1344,7 +1347,7 @@ flatpak_dir_system_helper_call_configure_remote (FlatpakDir *self, arg_config, arg_gpg_key, arg_installation), - G_VARIANT_TYPE ("()"), + G_VARIANT_TYPE ("()"), NULL, cancellable, error); return ret != NULL; @@ -1369,7 +1372,7 @@ flatpak_dir_system_helper_call_configure (FlatpakDir *self, arg_key, arg_value, arg_installation), - G_VARIANT_TYPE ("()"), + G_VARIANT_TYPE ("()"), NULL, cancellable, error); return ret != NULL; } @@ -1395,7 +1398,7 @@ flatpak_dir_system_helper_call_update_remote (FlatpakDir *self, arg_installation, arg_summary_path, arg_summary_sig_path), - G_VARIANT_TYPE ("()"), + G_VARIANT_TYPE ("()"), NULL, cancellable, error); return ret != NULL; } @@ -1419,7 +1422,7 @@ flatpak_dir_system_helper_call_remove_local_ref (FlatpakDir *self, arg_remote, arg_ref, arg_installation), - G_VARIANT_TYPE ("()"), + G_VARIANT_TYPE ("()"), NULL, cancellable, error); return ret != NULL; } @@ -1439,7 +1442,7 @@ flatpak_dir_system_helper_call_prune_local_repo (FlatpakDir *self, g_variant_new ("(us)", arg_flags, arg_installation), - G_VARIANT_TYPE ("()"), + G_VARIANT_TYPE ("()"), NULL, cancellable, error); return ret != NULL; } @@ -1459,7 +1462,7 @@ flatpak_dir_system_helper_call_run_triggers (FlatpakDir *self, g_variant_new ("(us)", arg_flags, arg_installation), - G_VARIANT_TYPE ("()"), + G_VARIANT_TYPE ("()"), NULL, cancellable, error); return ret != NULL; } @@ -1479,7 +1482,7 @@ flatpak_dir_system_helper_call_ensure_repo (FlatpakDir *self, g_variant_new ("(us)", arg_flags, arg_installation), - G_VARIANT_TYPE ("()"), + G_VARIANT_TYPE ("()"), NULL, cancellable, error); return ret != NULL; } @@ -1499,7 +1502,7 @@ flatpak_dir_system_helper_call_update_summary (FlatpakDir *self, g_variant_new ("(us)", arg_flags, arg_installation), - G_VARIANT_TYPE ("()"), + G_VARIANT_TYPE ("()"), NULL, cancellable, error); return ret != NULL; } @@ -1521,7 +1524,7 @@ flatpak_dir_system_helper_call_generate_oci_summary (FlatpakDir *self, arg_flags, arg_origin, arg_installation), - G_VARIANT_TYPE ("()"), + G_VARIANT_TYPE ("()"), NULL, cancellable, error); return ret != NULL; } |