Commit 78c389f3 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 4cf4e130
Pipeline #69593 canceled with stages
in 4 minutes and 52 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_PROTOCOL_ATTRIBUTE, PROTOCOL_MATRIX_STR,
NULL);
CHATTY_TRACE_MSG ("loading secret accounts");
secret_service_search (NULL, schema, attr,
......
Markdown is supported
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