Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Librem5
debs
Geoclue 2.0
Commits
430df506
Commit
430df506
authored
Dec 25, 2020
by
Laurent Bigonville
Browse files
Drop 0001-service-Check-the-maximum-allowed-accuracy-level-eve.patch, merged upstream
parent
bc2c8a49
Changes
2
Hide whitespace changes
Inline
Side-by-side
debian/patches/0001-service-Check-the-maximum-allowed-accuracy-level-eve.patch
deleted
100644 → 0
View file @
bc2c8a49
From: Laurent Bigonville <bigon@bigon.be>
Date: Fri, 23 Oct 2020 21:37:12 +0200
Subject: service: Check the maximum allowed accuracy level even for system
apps
We need to check the maximum allowed accuracy even for system apps
otherwise the user cannot disable the geolocalization for these
(max_accuracy
set to 0)
Fix: https://gitlab.freedesktop.org/geoclue/geoclue/-/issues/111
---
src/gclue-service-client.c | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/src/gclue-service-client.c b/src/gclue-service-client.c
index 247fdb6..62ea932 100644
--- a/src/gclue-service-client.c
+++ b/src/gclue-service-client.c
@@ -447,6 +447,7 @@
handle_post_agent_check_auth (StartData *data)
GClueConfig *config;
GClueAppPerm app_perm;
guint32 uid;
+ gboolean system_app;
uid = gclue_client_info_get_user_id (priv->client_info);
max_accuracy = gclue_agent_get_max_accuracy_level (priv->agent_proxy);
@@ -471,8 +472,11 @@
handle_post_agent_check_auth (StartData *data)
app_perm = gclue_config_get_app_perm (config,
data->desktop_id,
priv->client_info);
+ system_app = (gclue_client_info_get_xdg_id (priv->client_info) == NULL);
- if (app_perm == GCLUE_APP_PERM_ALLOWED) {
+ if (app_perm == GCLUE_APP_PERM_ALLOWED || system_app) {
+ /* Since we have no reliable way to identify system apps, no
+ * need for auth for them. */
complete_start (data);
return;
}
@@ -556,7 +560,6 @@
gclue_service_client_handle_start (GClueDBusClient *client,
const char *desktop_id;
GClueAppPerm app_perm;
guint32 uid;
- gboolean system_app = FALSE;
if (priv->locator != NULL) {
/* Already started */
@@ -569,7 +572,6 @@
gclue_service_client_handle_start (GClueDBusClient *client,
if (desktop_id == NULL) {
/* Non-xdg app */
desktop_id = gclue_dbus_client_get_desktop_id (client);
- system_app = TRUE;
}
if (desktop_id == NULL) {
@@ -605,14 +607,6 @@
gclue_service_client_handle_start (GClueDBusClient *client,
data->accuracy_level = ensure_valid_accuracy_level
(data->accuracy_level, GCLUE_ACCURACY_LEVEL_EXACT);
- if (system_app) {
- /* Since we have no reliable way to identify system apps, no
- * need for auth for them. */
- complete_start (data);
-
- return TRUE;
- }
-
/* No agent == No authorization */
if (priv->agent_proxy == NULL) {
/* Already a pending Start()? Denied! */
debian/patches/series
View file @
430df506
0001-service-Check-the-maximum-allowed-accuracy-level-eve.patch
0002-config-Make-the-Mozilla-API-key-configurable.patch
0003-service-Sync-in_use-property-when-apps-get-connected.patch
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment