summaryrefslogtreecommitdiff
path: root/src/libedataserver/e-secret-store.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2018-12-03 11:03:54 +0100
committerMilan Crha <mcrha@redhat.com>2018-12-03 11:03:54 +0100
commit50a15363b1aa816619f4d6cca74e653279fa33e9 (patch)
tree262cf13ba0b39f5fdf23316ec38e54c1880fb37f /src/libedataserver/e-secret-store.c
parent2aad02605913fc6c8e4ba7d0bf58497a57a9044c (diff)
downloadevolution-data-server-50a15363b1aa816619f4d6cca74e653279fa33e9.tar.gz
[Flatpak] Save passwords in libsecret with the same prefix as used by D-Bus services
As the passwords are saved in the host system, the eds-origin key cannot use the same value as the host system, because otherwise the secret-monitor module of evolution-source-registry would delete the password, because the ESource is unknown to it. Similarly the other way around, the inner (in Flatpak) source registry would delete system passwords, because those ESource-s are unknown to it.
Diffstat (limited to 'src/libedataserver/e-secret-store.c')
-rw-r--r--src/libedataserver/e-secret-store.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libedataserver/e-secret-store.c b/src/libedataserver/e-secret-store.c
index 96c8dbf24..e15148227 100644
--- a/src/libedataserver/e-secret-store.c
+++ b/src/libedataserver/e-secret-store.c
@@ -254,6 +254,12 @@ e_win32_secret_delete_secret_sync (const gchar *uid,
#define KEYRING_ITEM_ATTRIBUTE_UID "e-source-uid"
#define KEYRING_ITEM_ATTRIBUTE_ORIGIN "eds-origin"
+#ifdef DBUS_SERVICES_PREFIX
+#define ORIGIN_KEY DBUS_SERVICES_PREFIX "." PACKAGE
+#else
+#define ORIGIN_KEY PACKAGE
+#endif
+
static SecretSchema password_schema = {
"org.gnome.Evolution.Data.Source",
SECRET_SCHEMA_DONT_MATCH_NAME,
@@ -316,7 +322,7 @@ e_secret_store_store_sync (const gchar *uid,
collection, label, secret,
cancellable, error,
KEYRING_ITEM_ATTRIBUTE_UID, uid,
- KEYRING_ITEM_ATTRIBUTE_ORIGIN, PACKAGE,
+ KEYRING_ITEM_ATTRIBUTE_ORIGIN, ORIGIN_KEY,
NULL);
#endif