Commit Graph

20 Commits

Author SHA1 Message Date
Niels De Graef
a1ceaeed2a secret-tool: Fix memory issues in lock command
There were several issues in `secret_tool_action_lock()`:

- `g_autolist (GList)` isn't a correct type, as the list elements are
  `SecretCollection`s, not `GList`s
- Separately from that, the list didn't take ownership of the elements
  either in all cases
- We were leaking the `locked` and `context` variables

This commits just does away with all the g_auto* usage as it's the only
place in the code we're using it anyway, and just does all the freeing
at the end of the function.

Fixes: 015ea119 ("secret-tool: Add locking capabilities to secret tool")
Fixes: https://gitlab.gnome.org/GNOME/libsecret/-/issues/89
2023-12-12 12:27:12 +01:00
Henry Rovner
b6716c4d30 secret-tool: Verify that the parsed stdin password is vaild UTF-8 2023-11-06 11:17:24 -08:00
Nick Montalbano
015ea1194b secret-tool: Add locking capabilities to secret tool
Context, secret tool currently does not have the capability to lock
keyring.

This capability was requested for specific use cases.

Updates have been made to the secret tool to lock keyrings.

Closes https://gitlab.gnome.org/GNOME/libsecret/-/issues/28
2021-06-23 21:27:32 -04:00
Daiki Ueno
9472b0ab39 secret-tool: Fix secret_password_clearv_sync return value check
This was a regression introduced in the rewrite using the simple
API (commit 6886aebb04).

Reported by Chih-Hsuan Yen in:
https://gitlab.gnome.org/GNOME/libsecret/-/issues/56

Signed-off-by: Daiki Ueno <dueno@src.gnome.org>
2021-04-03 07:23:51 +02:00
Dhanuka Warusadura
06931ac755 Fixes a typo
Argument to g_print should be part not path.
2021-03-31 10:59:04 +00:00
Daiki Ueno
4d39dd13e0 secret-tool: Fix memleak 2019-08-21 14:48:53 +02:00
Daiki Ueno
6886aebb04 secret-tool: Switch to using the simple API 2019-07-18 13:54:12 +00:00
Niels De Graef
cbea4ce739 Remove useless macro to check GLib version
We already require GLib to have version 2.38 or higher in
`configure.ac`, so no need to check in our code whether we have a
version higher than 2.35
2019-01-19 12:12:32 +01:00
Ville Skyttä
261c0cd969 tool: s/--details/--unlock/ in search usage message 2017-10-15 00:32:33 +03:00
Bastien Nocera
99a2e6ad3e tool: Fix typos in error messages
s/specfy/specify/

https://bugzilla.gnome.org/show_bug.cgi?id=782206
2017-05-08 13:05:57 +02:00
Stef Walter
b72048c920 Makefile.am: Use a single Makefile.am and parallel tests
Allow parallel building and testing by using a single Makefile.am

Implement parallel testing using TAP, with various drivers and
compilers living in the build/ directory.

Fix all sorts of issues that this caused, including builddir != srcdir,
leaks in tests and so on.

It would have been nice to break out all the above into separate
commits ... blush.
2014-03-04 12:57:19 +01:00
Stef Walter
3b84dce476 tool: Add a 'search' command for looking up items and details
The output format is meant to be parseable in the Desktop file format.
Update the documentation as well.

https://bugzilla.gnome.org/show_bug.cgi?id=693881
2013-02-18 15:21:17 +01:00
Stef Walter
24cc1e118f Fix for glib deprecations
* g_type_init() was deprecated in glib 2.35.0
2012-10-22 20:50:48 +02:00
Stef Walter
9544b683f1 secret-tool: Use the correct call to wipe password in memory
* Fixes crash
2012-07-30 11:44:15 +02:00
Stef Walter
54b73f5cb6 Initialize gettext in secret-tool
https://bugzilla.gnome.org/show_bug.cgi?id=680072
2012-07-18 07:40:01 +02:00
Stef Walter
e0ba10ee09 Rename secret_password_remove() to secret_password_clear()
* It's clearer what happens here: we try to remove as many matching
   passwords as possible.
 * Also rename secret_service_remove() to secret_service_clear()
 * Rename secret_password_clear() which used to wipe password memory
   to secret_password_wipe().
2012-07-14 08:20:32 +02:00
Stef Walter
89550876ff Remove varargs SecretService methods
* The SecretService methods aren't used as frequently as the
   password methods, and it's not really necessary to have a whole
   bunch of extra varargs functions.
 * Add varargs functions for building a GHashTable of attributes
2012-06-28 13:15:06 +02:00
Colin Walters
8e68f748c3 secret-tool: Don't read uninitialized variable on error path 2012-06-25 18:22:20 -04:00
Stef Walter
125289ae45 Fix license header issues
* Update to LGPL 2.1
 * Fix typos in license comments
 * Update FSF address

https://bugzilla.gnome.org/show_bug.cgi?id=673194
2012-03-31 15:33:25 +02:00
Stef Walter
3a8b4a36d8 Add secret-tool command
* See usage for details on how to use it
2012-03-25 12:25:22 +02:00