summaryrefslogtreecommitdiff
path: root/libsecret
Commit message (Collapse)AuthorAgeFilesLines
* file-backend: avoid critical when cancellable is unsetMichael Catanzaro2023-05-161-1/+2
| | | | | In 0e205fce5fbfa8f2c6f6ac0acc890311ff333d04 I improperly assumed that the cancellable would always be valid. Avoid criticals when it is NULL.
* file-backend: avoid deadlock when portal op is canceledmcatanzaro/cancellable-deadlockMichael Catanzaro2023-04-271-3/+10
| | | | | | | | | Calling g_cancellable_disconnect() inside a cancelled handler is a guaranteed deadlock. Cancellables should only be canceled once, so we don't need to worry about a second cancellation occurring. I think it's sufficent to disconnect when the InitClosure is freed. Fixes #86
* Stop using GSliceNiels De Graef2023-01-1611-58/+58
| | | | | | | | | | | | GLib is discussing deprecating/removing it upstream [1] since it has only limited uses. Next to that, it seems to bork stack traces here when using ASAN (for which you also have to specify `G_SLICE=always-malloc` and some other envvars too). In other words, let's just get rid of using `GSlice` and call the allocation APIs directly. [1]: https://gitlab.gnome.org/GNOME/glib/-/issues/1079
* file-backend: Extract TPM code into separate functionNiels De Graef2023-01-151-79/+78
| | | | | | | | That way, we have a function we can also call in case we want to provide a synchronous constructor. This also fixes some cases where the `EggTpm2Context` was not properly cleaned up in case of some error paths.
* file-backend: Extract function to return GFileNiels De Graef2023-01-151-38/+50
| | | | A small cleanup
* Fix finish function for searchvJens Georg2022-11-221-0/+1
|
* secret-paths: Fix a little memory leakNiels De Graef2022-10-251-0/+1
|
* Fix nullable in secret_collection_for_alias_*Julian Schmidhuber2022-09-191-2/+2
|
* Properly chain-up GTasks around GDBusProxy::init_asyncDaiki Ueno2022-05-093-12/+85
| | | | | | | | | | | | | | | | | Our GAsyncInitable implementations in SecretService, SecretCollection, and SecretItem internally wrap GDBusProxy::init_async and perform additional error processing. To chain up we used to pass around a single GTask, which caused an issue in the (additional) error path: GDBusProxy::init_async may have already called g_task_return_boolean(task, TRUE) and in that case GLib produces the following warning: g_task_return_error: assertion '!task->ever_returned' failed This fixes the issue by creating a temporary GTask around GDBusProxy::init_async call. Signed-off-by: Daiki Ueno <dueno@src.gnome.org>
* secrets_for_dbus_paths: Improve return docMaximiliano Sandoval R2022-02-071-1/+1
|
* Fix typos on linksMaximiliano Sandoval R2022-02-071-3/+3
|
* docs: Merge unused docs for backend & retrievableMaximiliano Sandoval R2022-02-072-18/+3
| | | | Only one doc will appear in gir and gi-docgen docs.
* docs: Remove large indentationsMaximiliano Sandoval R2022-02-077-52/+52
| | | | | Indentations by more than four spaces make gi-docgen read them as a quote block.
* docs: Document errorsMaximiliano Sandoval R2022-02-072-25/+19
|
* CHECK_VERSION: Document macroMaximiliano Sandoval R2022-02-071-2/+2
| | | | Macros do not use Returns annotation.
* docs: All docs should have a header lineMaximiliano Sandoval R2022-02-0710-90/+160
| | | | This line should have a single sentence.
* secret_value_unref_to_password: Annotate out paramMaximiliano Sandoval R2022-02-071-1/+1
|
* docs: Document BACKEND_EXTENSION_POINT_NAMEMaximiliano Sandoval R2022-02-071-0/+6
|
* secret-schema: Add missind docsMaximiliano Sandoval R2022-02-071-0/+63
|
* Port documentation to gi-docgenMaximiliano2022-02-0216-619/+471
|
* Fix deprecated-declarations warningsDhanuka Warusadura2021-11-213-67/+49
| | | | | | | These changes fix the existing deprecated-declarations warnings found during the build process. Related to: https://gitlab.gnome.org/GNOME/libsecret/-/merge_requests/43
* Create default collection after DBus.Error.UnknownObjectSlava Aseev2021-08-161-1/+2
| | | | | | | Some Secret Service API backend implementations (like keepassxc) throws UnknownObject (instead of UnknownMethod as gnome-keyring do) after creating an item in the non-existent /org/freedesktop/secrets/aliases/default.
* Add TPM2 integration to secret file backendDhanuka Warusadura2021-08-121-0/+101
| | | | | These changes add TPM2 derived encryption key to secret file backend.
* docs: Fix typosEvangelos Ribeiro Tzaras2021-07-093-10/+10
|
* secret-file-backend: Avoid closing the same file descriptor twiceCorentin Noël2021-06-161-1/+0
| | | | It is already closed a few lines above
* Remove unnecessary "volatile"Daiki Ueno2021-06-121-1/+1
| | | | | | | The documentation of g_dbus_error_register_error_domain suggests that the argument passed to it should not be volatile. Signed-off-by: Daiki Ueno <dueno@src.gnome.org>
* Fix issues flagged by static analyzersDhanuka Warusadura2021-03-313-8/+5
| | | | | These changes specifically fix the issues flagged by clang-analyzer. Fixes: #59
* secret-enum-types.c/h.template: Fix reproducibility issueRichard Purdie2021-03-312-3/+3
| | | | | | | When full filenames are used in generated sources it makes the resulting debug packages non-reproducible. Best practise is to use basename instead. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* methods: Port to GTaskNiels De Graef2021-02-211-283/+267
| | | | `GSimpleAsyncResult` is deprecated in favor of `GTask`.
* collection: Port to GTaskNiels De Graef2021-02-211-245/+222
| | | | `GSimpleAsyncResult` is deprecated in favor of `GTask`.
* Handle snaps the same way as flatpaksSebastien Bacher2021-02-192-2/+2
|
* Mark NULL with appropriate gtk-doc prefixNiels De Graef2021-02-063-22/+22
| | | | This looks cleaner for the docs generated by the several bindings.
* Mark optional GCancellables as (nullable)Niels De Graef2021-02-068-96/+96
|
* Get rid of (allow-none) annotationsNiels De Graef2021-02-068-102/+113
| | | | | The `(allow-none)` annotation was deprecated for `(nullable)` and `(optional)` to solve some ambiguous uses of the tag.
* Use G_GNUC_NULL_TERMINATED where appropriatewip/nielsdg/null-terminated-annotationsNiels De Graef2021-02-062-18/+18
| | | | | Give our API consumers an extra hint if they're using varargs without an appropriate `NULL`-sentinel.
* meson: build test-vala-unstable with -DSECRET_WITH_UNSTABLEMatt Turner2020-12-191-9/+16
| | | | Fixes: https://gitlab.gnome.org/GNOME/libsecret/-/issues/54
* secret-paths.c: Add annotations for `paths` variablewip/cdavis/fix-annotationsChristopher Davis2020-12-101-4/+6
| | | | | Fixes an issue with annotations that would cause Rust bindings to generate incorrectly.
* ci: Fix the coverage buildNiels De Graef2020-11-151-1/+3
|
* Drop autotools-based buildNiels De Graef2020-11-153-429/+0
| | | | | | | | | Our official instructions only tell how to build with Meson, our CI is only done with Meson and I wouldn't be surprised if most developers only used Meson as well. In other words, the autotools build is outdated. Let's say our goodbye and drop it in the next stable release.
* secret-file-collection: Make MAC comparison constant timeDaiki Ueno2020-10-041-19/+24
|
* Initialize libgcrypt for SecretFileCollectionMikhail Zabaluev2020-06-181-0/+3
| | | | | Make sure libgcrypt is initialized before any SecretFileCollection instance uses it.
* meson: Add tests for GIR-based languagesNiels De Graef2020-06-171-2/+112
| | | | Also add a test suite argument to more easily distinguish them.
* meson: Fix indentationNiels De Graef2020-06-011-9/+11
|
* meson: Clean up unused variablesNiels De Graef2020-06-011-14/+14
|
* meson: add option introspectionKai Kang2020-05-211-42/+44
| | | | | | | Add an option 'introspection' for meson which could control whether build GIR files or not. Signed-off-by: Kai Kang <kai.kang@windriver.com>
* secret-file-backend: Fix use-after-free in flatpakwip/mcrha/flatpak-use-after-free-fixMilan Crha2020-03-191-0/+6
| | | | | | | The on_portal_retrieve_secret() can connect a GCancellable, but it doesn't disconnect from it (only when the cancellable is cancelled), which means when the cancellable is cancelled later, when the GTask is gone, the callback is called with already freed data.
* Prefer g_info() over g_message()Niels De Graef2020-03-113-12/+9
| | | | | | | Libraries shouldn't really use `g_message()` as it will show up in consumer application outputs. Let's use `g_info()` instead. Fixes https://gitlab.gnome.org/GNOME/libsecret/issues/40
* meson: Don't specify shared_library()Niels De Graef2020-03-101-1/+1
| | | | | Some people might want to statically link to libsecret, so use the more general `library()` target to build libsecret.
* secret-file-collection: force little-endian in GVariantDaiki Ueno2020-03-101-6/+15
| | | | | | As the GVariant serialization format does not record the original endianness of integer values, we need to ensure that it doesn't change between write and load.
* build: Suppress compiler warning if compiled with G_DISABLE_ASSERTDaiki Ueno2020-01-141-0/+4
| | | | | | | This is similar to 0be63575ff47f19cff3688985c7f00e92bc25541 but for test-file-collection.c. Fixes #36.