Commit 992a0ec2 authored by Evangelos Ribeiro Tzaras's avatar Evangelos Ribeiro Tzaras
Browse files

secret-store: Use protocol attribute for lookup

Without being able to rely on the schema name for the lookup,
we need a different attribute.

This is a hack we can use as long as there is only one protocol (or we would
need to call this multiple times for each protocol, which would also be doable).

With the last commit and without this one we get warnings from chatty:

`WARNING: secret_service_search: must specify at least one attribute to match`
parent 8fb3173c
Pipeline #69594 passed with stages
in 9 minutes and 36 seconds
......@@ -160,7 +160,13 @@ chatty_secret_load_async (GCancellable *cancellable,
schema = secret_store_get_schema ();
task = g_task_new (NULL, cancellable, callback, user_data);
attr = secret_attributes_build (schema, NULL);
/** With using SECRET_SCHEMA_DONT_MATCH_NAME we need some other attribute
* (apart from the schema name itself) to use for the lookup.
* The protocol attribute seems like a reasonable choice.
attr = secret_attributes_build (schema,
CHATTY_TRACE_MSG ("loading secret accounts");
secret_service_search (NULL, schema, attr,
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