libsecret/libsecret
panoplie 7387774263 sync-search: unlock keyring before getting secret attributes
In gnome-keyring, the secret items attributes are not visible until the keyring
is unlocked. But in libsecret, the synchronous secret search function unlocks
the keyring after and not before the attributes dbus pull.

So when the keyring is locked and you run secret_service_search_sync(), you get
hashed or empty attributes because the keyring was locked at the time these
attributes were pulled. If you run this function when the keyring is already
unlocked, there is no problem.

This commit moves the unlock routine before the attributes pull to make the
synchronous search function working correctly when the keyring is locked
initially.

Issues #6 gnome-shell#4780
2023-05-24 07:04:14 +00:00
..
fixtures secret-file-backend: New backend for storing secrets in file 2019-10-13 06:21:38 +00:00
mock mock: Pad the common secret with zero bytes to make it exactly 128 bytes long 2017-11-07 15:22:40 +01:00
meson.build docs: Document errors 2022-02-07 13:02:10 +01:00
mock-service-delete.py Makefile.am: Use a single Makefile.am and parallel tests 2014-03-04 12:57:19 +01:00
mock-service-empty.py Makefile.am: Use a single Makefile.am and parallel tests 2014-03-04 12:57:19 +01:00
mock-service-lock.py Makefile.am: Use a single Makefile.am and parallel tests 2014-03-04 12:57:19 +01:00
mock-service-normal.py Makefile.am: Use a single Makefile.am and parallel tests 2014-03-04 12:57:19 +01:00
mock-service-only-plain.py Makefile.am: Use a single Makefile.am and parallel tests 2014-03-04 12:57:19 +01:00
mock-service-prompt.py Makefile.am: Use a single Makefile.am and parallel tests 2014-03-04 12:57:19 +01:00
mock-service.c mock: Port to Python 3 2016-02-14 17:55:09 +01:00
mock-service.h libsecret: Fix up the tests for recent regressions 2015-04-14 10:48:19 +02:00
org.freedesktop.Secrets.xml Rename the library subdirectory to libsecret 2012-07-13 10:40:25 +02:00
Secret-1.metadata Fix finish function for searchv 2022-11-22 00:03:53 +01:00
secret-attributes.c Port documentation to gi-docgen 2022-02-02 12:19:14 +00:00
secret-attributes.h Use G_GNUC_NULL_TERMINATED where appropriate 2021-02-06 11:47:11 +01:00
secret-backend.c docs: Merge unused docs for backend & retrievable 2022-02-07 13:02:10 +01:00
secret-backend.h secret-backend: Add a way to uncache singleton instance 2019-10-08 07:55:55 +00:00
secret-collection.c Stop using GSlice 2023-01-16 19:17:59 +01:00
secret-collection.h Use proper prefix for SecretCollection flags 2019-05-11 00:15:04 +01:00
secret-enum-types.c.template secret-enum-types.c/h.template: Fix reproducibility issue 2021-03-31 09:38:47 +00:00
secret-enum-types.h.template secret-enum-types.c/h.template: Fix reproducibility issue 2021-03-31 09:38:47 +00:00
secret-file-backend.c file-backend: avoid critical when cancellable is unset 2023-05-16 08:14:39 -05:00
secret-file-backend.h secret-backend: Check if portal is available 2019-10-13 06:21:38 +00:00
secret-file-collection.c secret-file-collection: Make MAC comparison constant time 2020-10-04 17:27:40 +02:00
secret-file-collection.h secret-file-backend: New backend for storing secrets in file 2019-10-13 06:21:38 +00:00
secret-file-item.c secret-file-backend: New backend for storing secrets in file 2019-10-13 06:21:38 +00:00
secret-file-item.h secret-file-backend: New backend for storing secrets in file 2019-10-13 06:21:38 +00:00
secret-item.c Stop using GSlice 2023-01-16 19:17:59 +01:00
secret-item.h Don't end G_DEFINE_AUTOPTR_CLEANUP_FUNC with a ; 2019-01-19 23:59:02 +01:00
secret-methods.c sync-search: unlock keyring before getting secret attributes 2023-05-24 07:04:14 +00:00
secret-password.c Stop using GSlice 2023-01-16 19:17:59 +01:00
secret-password.h Use G_GNUC_NULL_TERMINATED where appropriate 2021-02-06 11:47:11 +01:00
secret-paths.c Stop using GSlice 2023-01-16 19:17:59 +01:00
secret-paths.h libsecret: Add secret_service_encode_dbus_secret() and opposite 2014-03-04 14:15:27 +01:00
secret-private.h Fix deprecated-declarations warnings 2021-11-21 08:51:32 +05:30
secret-prompt.c Stop using GSlice 2023-01-16 19:17:59 +01:00
secret-prompt.h Don't end G_DEFINE_AUTOPTR_CLEANUP_FUNC with a ; 2019-01-19 23:59:02 +01:00
secret-retrievable.c docs: Merge unused docs for backend & retrievable 2022-02-07 13:02:10 +01:00
secret-retrievable.h secret-retrievable: New interface to represent read-only item 2019-07-18 13:54:12 +00:00
secret-schema.c Stop using GSlice 2023-01-16 19:17:59 +01:00
secret-schema.h Don't end G_DEFINE_AUTOPTR_CLEANUP_FUNC with a ; 2019-01-19 23:59:02 +01:00
secret-schemas.c Port documentation to gi-docgen 2022-02-02 12:19:14 +00:00
secret-schemas.h Port documentation to gi-docgen 2022-02-02 12:19:14 +00:00
secret-service.c Stop using GSlice 2023-01-16 19:17:59 +01:00
secret-service.h secret-password: Add search functions 2019-07-18 13:54:12 +00:00
secret-session.c Prefer g_info() over g_message() 2020-03-11 05:35:33 +00:00
secret-types.h secret-file-backend: New backend for storing secrets in file 2019-10-13 06:21:38 +00:00
secret-util.c Stop using GSlice 2023-01-16 19:17:59 +01:00
secret-value.c Stop using GSlice 2023-01-16 19:17:59 +01:00
secret-value.h secret-value: Add secret_value_unref_to_password 2019-07-18 13:54:12 +00:00
secret-version.h.in CHECK_VERSION: Document macro 2022-02-07 13:02:10 +01:00
secret.h secret-retrievable: New interface to represent read-only item 2019-07-18 13:54:12 +00:00
test-attributes.c tests: undef G_DISABLE_ASSERT 2019-06-29 06:54:37 +02:00
test-collection.c tests: undef G_DISABLE_ASSERT 2019-06-29 06:54:37 +02:00
test-file-collection.c build: Suppress compiler warning if compiled with G_DISABLE_ASSERT 2020-01-14 10:13:16 +01:00
test-item.c tests: undef G_DISABLE_ASSERT 2019-06-29 06:54:37 +02:00
test-js-clear.js Makefile.am: Use a single Makefile.am and parallel tests 2014-03-04 12:57:19 +01:00
test-js-lookup.js Makefile.am: Use a single Makefile.am and parallel tests 2014-03-04 12:57:19 +01:00
test-js-store.js Makefile.am: Use a single Makefile.am and parallel tests 2014-03-04 12:57:19 +01:00
test-methods.c Fix issues flagged by static analyzers 2021-03-31 10:59:04 +00:00
test-password.c tests: Add tests for binary variant of secret_{lookup,store} 2019-07-18 13:54:12 +00:00
test-paths.c tests: undef G_DISABLE_ASSERT 2019-06-29 06:54:37 +02:00
test-prompt.c tests: undef G_DISABLE_ASSERT 2019-06-29 06:54:37 +02:00
test-py-clear.py libsecret: Get rid of PyGI warnings about unspecified versions 2016-04-07 10:08:54 +02:00
test-py-lookup.py libsecret: Get rid of PyGI warnings about unspecified versions 2016-04-07 10:08:54 +02:00
test-py-store.py libsecret: Get rid of PyGI warnings about unspecified versions 2016-04-07 10:08:54 +02:00
test-service.c tests: undef G_DISABLE_ASSERT 2019-06-29 06:54:37 +02:00
test-session.c tests: undef G_DISABLE_ASSERT 2019-06-29 06:54:37 +02:00
test-vala-lang.vala Makefile.am: Use a single Makefile.am and parallel tests 2014-03-04 12:57:19 +01:00
test-vala-unstable.vala Makefile.am: Use a single Makefile.am and parallel tests 2014-03-04 12:57:19 +01:00
test-value.c tests: undef G_DISABLE_ASSERT 2019-06-29 06:54:37 +02:00