summaryrefslogtreecommitdiff
path: root/contrib/credential/gnome-keyring
AgeCommit message (Collapse)Author
2017-11-09Replace Free Software Foundation address in license noticesTodd Zullinger
The mailing address for the FSF has changed over the years. Rather than updating the address across all files, refer readers to gnu.org, as the GNU GPL documentation now suggests for license notices. The mailing address is retained in the full license files (COPYING and LGPL-2.1). The old address is still present in t/diff-lib/COPYING. This is intentional, as the file is used in tests and the contents are not expected to change. Signed-off-by: Todd Zullinger <tmz@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-06-14gnome-keyring: Don't hard-code pkg-config executableHeiko Becker
Helpful if your pkg-config executable has a prefix based on the architecture, for example. Signed-off-by: Heiko Becker <heirecka@exherbo.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-16contrib/git-credential-gnome-keyring.c: small stylistic cleanupsJohn Szakmeister
Signed-off-by: John Szakmeister <john@szakmeister.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> Reviewed-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-10-16contrib/git-credential-gnome-keyring.c: support really ancient gnome-keyringBrandon Casey
The gnome-keyring lib (0.4) distributed with RHEL 4.X is really ancient and does not provide most of the synchronous functions that even ancient releases do. Thankfully, we're only using one function that is missing. Let's emulate gnome_keyring_item_delete_sync() by calling the asynchronous function and then triggering the event loop processing until our callback is called. Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-16contrib/git-credential-gnome-keyring.c: support ancient gnome-keyringBrandon Casey
The gnome-keyring lib distributed with RHEL 5.X is ancient and does not provide a few of the functions/defines that more recent versions do, but mostly the API is the same. Let's provide the missing bits via macro definitions and function implementation. Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-16contrib/git-credential-gnome-keyring.c: report failure to store passwordBrandon Casey
Produce an error message when we fail to store a password to the keyring. Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-16contrib/git-credential-gnome-keyring.c: use glib messaging functionsBrandon Casey
Rather than roll our own, let's use the messaging functions provided by glib. Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-16contrib/git-credential-gnome-keyring.c: use glib memory allocation functionsBrandon Casey
Rather than roll our own, let's use the memory allocation/free routines provided by glib. Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-16contrib/git-credential-gnome-keyring.c: use secure memory for reading passwordsBrandon Casey
gnome-keyring provides functions to allocate non-pageable memory (if possible). Let's use them to allocate memory that may be used to hold secure data read from the keyring. Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-16contrib/git-credential-gnome-keyring.c: use secure memory functions for passwdsBrandon Casey
gnome-keyring provides functions for allocating non-pageable memory (if possible) intended to be used for storing passwords. Let's use them. Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-16contrib/git-credential-gnome-keyring.c: use gnome helpers in keyring_object()Brandon Casey
Rather than carefully allocating memory for sprintf() to write into, let's make use of the glib helper function g_strdup_printf(), which makes things a lot easier and less error-prone. Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-16contrib/git-credential-gnome-keyring.c: set Gnome application nameBrandon Casey
Since this is a Gnome application, let's set the application name to something reasonable. This will be displayed in Gnome dialog boxes e.g. the one that prompts for the user's keyring password. We add an include statement for glib.h and add the glib-2.0 cflags and libs to the compilation arguments, but both of these are really noops since glib is already a dependency of gnome-keyring. Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-16contrib/git-credential-gnome-keyring.c: ensure buffer is non-empty before ↵Brandon Casey
accessing Ensure buffer length is non-zero before attempting to access the last element. Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-16contrib/git-credential-gnome-keyring.c: strlen() returns size_t, not ssize_tBrandon Casey
Also, initialization is not necessary since it is assigned before it is used. Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-16contrib/git-credential-gnome-keyring.c: exit non-zero when called incorrectlyBrandon Casey
If the correct arguments were not specified, this program should exit non-zero. Let's do so. Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-16contrib/git-credential-gnome-keyring.c: add static where applicableBrandon Casey
Mark global variable and functions as static. Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-16contrib/git-credential-gnome-keyring.c: *style* use "if ()" not "if()" etc.Brandon Casey
Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-23contrib/git-credential-gnome-keyring.c: remove unused die() functionBrandon Casey
Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-09-23contrib/git-credential-gnome-keyring.c: remove unnecessary pre-declarationsBrandon Casey
These are all defined before they are used, so it is not necessary to pre-declare them. Remove the pre-declarations. Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-02-24contrib/credential: use a lowercase "usage:" stringDavid Aguilar
Make the usage string consistent with Git. Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-08-24contrib: add credential helper for GnomeKeyringPhilipp A. Hartmann
With this installed in your $PATH, you can store git-over-http passwords in your keyring by doing: git config credential.helper gnome-keyring The code is based in large part on the work of John Szakmeister who wrote the helper originally for the initial, unpublished version of the credential helper protocol. This version will pass t0303 if you do: GIT_TEST_CREDENTIAL_HELPER=gnome-keyring \ ./t0303-credential-external.sh Signed-off-by: Philipp A. Hartmann <pah@qo.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>