Commit 889efda7 authored by Guido Gunther's avatar Guido Gunther
Browse files

Merge tag 'debian/2.5.7-3' into pureos/byzantium

geoclue-2.0 Debian release 2.5.7-3
parents 4aea6aa3 aef2748b
geoclue-2.0 (2.5.7-3) unstable; urgency=medium
* Properly detect that applications are running in flatpak when using cgroup
v2. Thanks to Guido Günther <agx@sigxcpu.org> (Closes: #985345)
-- Laurent Bigonville <bigon@debian.org> Wed, 17 Mar 2021 15:53:13 +0100
geoclue-2.0 (2.5.7-2pureos3) byzantium; urgency=medium
[ Sebastian Spaeth ]
......
......@@ -10,19 +10,16 @@ Support this too to not misdetect flatpaks as system apps.
1) See https://www.kernel.org/doc/html/v4.18/admin-guide/cgroup-v2.html#processes
Upstream-Reference: https://gitlab.freedesktop.org/geoclue/geoclue/-/merge_requests/81
Debian-Bug: #985345
Signed-off-by: Guido Günther <agx@sigxcpu.org>
---
src/gclue-client-info.c | 43 ++++++++++++++++++++++++++++++++++++++++---
1 file changed, 40 insertions(+), 3 deletions(-)
src/gclue-client-info.c | 44 +++++++++++++++++++++++++++++++++++++++++---
1 file changed, 41 insertions(+), 3 deletions(-)
diff --git a/src/gclue-client-info.c b/src/gclue-client-info.c
index d609b34..ae7bf95 100644
index d609b34..dd403a6 100644
--- a/src/gclue-client-info.c
+++ b/src/gclue-client-info.c
@@ -181,6 +181,41 @@ on_name_vanished (GDBusConnection *connection,
@@ -181,6 +181,42 @@ on_name_vanished (GDBusConnection *connection,
0);
}
......@@ -57,6 +54,7 @@ index d609b34..ae7bf95 100644
+
+ xdg_id = g_strdup (name);
+ g_debug ("Found xdg_id %s", xdg_id);
+
+ return xdg_id;
+}
+
......@@ -64,7 +62,7 @@ index d609b34..ae7bf95 100644
/* Based on got_credentials_cb() from xdg-app source code */
static char *
get_xdg_id (guint32 pid)
@@ -188,7 +223,7 @@ get_xdg_id (guint32 pid)
@@ -188,7 +224,7 @@ get_xdg_id (guint32 pid)
char *xdg_id = NULL;
g_autofree char *path = NULL;
g_autofree char *content = NULL;
......@@ -73,18 +71,18 @@ index d609b34..ae7bf95 100644
int i;
path = g_strdup_printf ("/proc/%u/cgroup", pid);
@@ -197,6 +232,10 @@ get_xdg_id (guint32 pid)
@@ -197,6 +233,10 @@ get_xdg_id (guint32 pid)
return NULL;
lines = g_strsplit (content, "\n", -1);
+ xdg_id = parse_cgroup_v2 (lines);
+ if (xdg_id)
+ if (xdg_id != NULL)
+ return xdg_id;
+
for (i = 0; lines[i] != NULL; i++) {
const char *unit = lines[i] + strlen ("1:name=systemd:");
g_autofree char *scope = NULL;
@@ -224,8 +263,6 @@ get_xdg_id (guint32 pid)
@@ -224,8 +264,6 @@ get_xdg_id (guint32 pid)
xdg_id = g_strdup (name);
}
......
......@@ -2,8 +2,8 @@
0003-service-Sync-in_use-property-when-apps-get-connected.patch
0003-Revert-Fixed-hang-on-startup-when-client-app-is-a-sy.patch
0004-service-Stop-the-client-for-system-applications-when.patch
fix-nowifi-query.patch
0006-client-info-Support-cgroup-v2.patch
0005-Bump-mm-glib-dep-to-1.10.patch
0006-Use-tracking-area-code-TAC-as-the-LAC-when-in-LTE-mo.patch
fix-nowifi-query.patch
geoclue.conf-Add-phosh.patch
client-info-Support-cgroup-v2.patch
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment