[gnome-software/wip/ubuntu-3-24] Mark snaps as sandboxed
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/ubuntu-3-24] Mark snaps as sandboxed
- Date: Thu, 25 May 2017 04:18:02 +0000 (UTC)
commit 4b01fab53310fcee1f0af87f4b56eb16e36aa3b3
Author: Robert Ancell <robert ancell canonical com>
Date: Thu May 25 16:17:41 2017 +1200
Mark snaps as sandboxed
plugins/snap/gs-plugin-snap.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/plugins/snap/gs-plugin-snap.c b/plugins/snap/gs-plugin-snap.c
index 13cf01b..200c724 100644
--- a/plugins/snap/gs-plugin-snap.c
+++ b/plugins/snap/gs-plugin-snap.c
@@ -104,7 +104,7 @@ refine_app (GsPlugin *plugin, GsApp *app, JsonObject *package, gboolean from_sea
{
g_autofree gchar *macaroon = NULL;
g_auto(GStrv) discharges = NULL;
- const gchar *status, *icon_url, *launch_name = NULL;
+ const gchar *status, *confinement, *icon_url, *launch_name = NULL;
g_autoptr(GdkPixbuf) icon_pixbuf = NULL;
gint64 size = -1;
@@ -146,6 +146,11 @@ refine_app (GsPlugin *plugin, GsApp *app, JsonObject *package, gboolean from_sea
}
if (gs_plugin_check_distro_id (plugin, "ubuntu"))
gs_app_add_quirk (app, AS_APP_QUIRK_PROVENANCE);
+
+ confinement = json_object_get_string_member (package, "confinement");
+ if (g_strcmp0 (confinement, "strict") == 0)
+ gs_app_add_kudo (app, GS_APP_KUDO_SANDBOXED);
+
icon_url = json_object_get_string_member (package, "icon");
if (g_str_has_prefix (icon_url, "/")) {
g_autofree gchar *icon_data = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]