Accepting request 36205 from home:vuntz:branches:GNOME:Factory

Copy from home:vuntz:branches:GNOME:Factory/libgnome-keyring via accept of submit request 36205 revision 3.
Request was accepted with message:
ok

OBS-URL: https://build.opensuse.org/request/show/36205
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/libgnome-keyring?expand=0&rev=7
This commit is contained in:
Vincent Untz 2010-03-31 00:06:12 +00:00 committed by Git OBS Bridge
parent 9935c0a501
commit 72015e7a8f
5 changed files with 35 additions and 98 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6f15c1839a95628ee85293b5ae0873a8a71204d570dc15d84dd59adff928b82a
size 775939

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:11e64445537a8fab367875d1ae4aa00db9227c4db384c5d019cfa85c977b40ec
size 779068

View File

@ -1,89 +0,0 @@
commit cf04a806f7cbd12bfb664a481b7a551650cb85b2
Author: Stef Walter <stef@memberwebs.com>
Date: Sun Feb 14 04:23:58 2010 +0000
No assertion when password is not found.
Would crash when gnome_keyring_find_password_xx() was called and
no password was found.
Fixes bug #608709
diff --git a/library/gnome-keyring.c b/library/gnome-keyring.c
index c867787..8931fe5 100644
--- a/library/gnome-keyring.c
+++ b/library/gnome-keyring.c
@@ -4374,10 +4374,19 @@ find_password_2_reply (GkrOperation *op, GkrSession *session, gpointer user_data
static void
find_password_1_reply (GkrOperation *op, const char *path, gpointer user_data)
{
+ GkrCallback *cb;
+
+ /* All done, complete the operation here */
+ if (path == NULL) {
+ cb = gkr_operation_pop (op);
+ gkr_callback_invoke_res (cb, GNOME_KEYRING_RESULT_NO_MATCH);
+
/* We need a session to get the secret for this item */
- gkr_operation_push (op, find_password_2_reply, GKR_CALLBACK_OP_SESSION,
- g_strdup (path), g_free);
- gkr_session_negotiate (op);
+ } else {
+ gkr_operation_push (op, find_password_2_reply, GKR_CALLBACK_OP_SESSION,
+ g_strdup (path), g_free);
+ gkr_session_negotiate (op);
+ }
}
static GkrOperation*
diff --git a/library/tests/test-keyrings.c b/library/tests/test-keyrings.c
index 7f7f1fa..aeba0ff 100644
--- a/library/tests/test-keyrings.c
+++ b/library/tests/test-keyrings.c
@@ -480,6 +480,46 @@ DEFINE_TEST(find_password)
g_assert_cmpint (GNOME_KEYRING_RESULT_OK, ==, find_password_result);
}
+static GnomeKeyringResult find_no_password_result;
+
+static void
+done_find_no_password (GnomeKeyringResult res, const gchar* password, gpointer unused)
+{
+ find_no_password_result = res;
+ if(res == GNOME_KEYRING_RESULT_OK)
+ g_assert (password == NULL);
+ test_mainloop_quit ();
+}
+
+DEFINE_TEST(find_no_password)
+{
+ GnomeKeyringResult res;
+ gchar *password;
+ gpointer op;
+
+ /* Synchronous, valid*/
+ res = gnome_keyring_find_password_sync (&our_schema, &password,
+ "dog", "grunt",
+ "legs", 1000,
+ NULL);
+ g_assert_cmpint (GNOME_KEYRING_RESULT_OK, ==, res);
+ g_assert (password == NULL);
+
+ /* Asynchronous, less arguments */
+ find_no_password_result = GNOME_KEYRING_RESULT_CANCELLED;
+ op = gnome_keyring_find_password (&our_schema,
+ done_find_no_password, NULL, NULL,
+ "dog", "grunt",
+ "legs", 1000,
+ NULL);
+ g_assert (op != NULL);
+ g_assert (find_no_password_result == GNOME_KEYRING_RESULT_CANCELLED);
+
+ test_mainloop_run (2000);
+
+ g_assert_cmpint (GNOME_KEYRING_RESULT_OK, ==, find_no_password_result);
+}
+
static void
done_delete_password (GnomeKeyringResult res, gpointer data)
{

View File

@ -1,3 +1,25 @@
-------------------------------------------------------------------
Wed Mar 31 01:30:09 CEST 2010 - vuntz@opensuse.org
- Update to version 2.30.0:
+ Fix assertion calling deprecated acl function.
+ Clear the client's session when the service disconnects.
+ Implement setting of Type property in
gnome_keyring_item_set_info().
+ Allow predictable testing by setting up a test path and
service.
+ Fix assertion when password is not found.
+ Prompt to create a new default keyring when creating an item
while no default keyring exists.
+ Try to return GNOME_KEYRING_ALREADY_EXISTS where possible.
+ Hold reference to operation while waiting for prompt result.
+ Don't assert on va_list, which isn't necessarily a pointer.
+ Return GNOME_KEYRING_RESULT_NO_MATCH when no secret is found.
+ Fix up some documentation errors.
+ Updated translations.
- Drop libgnome-keyring-no-match.patch: fixed upstream.
- Create lang package.
-------------------------------------------------------------------
Tue Feb 16 12:11:38 CET 2010 - vuntz@opensuse.org

View File

@ -1,5 +1,5 @@
#
# spec file for package libgnome-keyring (Version 2.29.4)
# spec file for package libgnome-keyring (Version 2.30.0)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@ -18,21 +18,20 @@
Name: libgnome-keyring
Version: 2.29.4
Release: 2
Version: 2.30.0
Release: 1
Url: http://www.gnome.org/
Group: Development/Libraries/GNOME
License: GPLv2+ ; LGPLv2.1+
Summary: Library to integrate with the GNOME Keyring
Source: ftp://ftp.gnome.org/pub/GNOME/sources/%{name}/2.29/%{name}-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM libgnome-keyring-no-match.patch vuntz@opensuse.org -- Taken partly from upstream, to make gnome-keyring work
Patch0: libgnome-keyring-no-match.patch
BuildRequires: dbus-1-devel
BuildRequires: eggdbus-devel
BuildRequires: fdupes
BuildRequires: intltool
BuildRequires: glib2-devel
BuildRequires: libgcrypt-devel
Requires: %{name}-lang = %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@ -44,7 +43,10 @@ integrate with the GNOME Keyring system.
License: GPLv2+ ; LGPLv2.1+
Group: Development/Libraries/GNOME
Summary: Library to integrate with the GNOME Keyring
Requires: %{name}-lang = %{version}
Recommends: gnome-keyring
# To make the lang package happy
Provides: %{name} = %{version}
%description -n libgnome-keyring0
The GNOME Keyring is a program that keep password and other secrets
@ -70,7 +72,6 @@ integrate with the GNOME Keyring system.
%lang_package
%prep
%setup -q
%patch0 -p1
%build
%configure \
@ -79,6 +80,7 @@ make %{?jobs:-j%jobs}
%install
%makeinstall
%find_lang %{name}
find %{buildroot} -type f -name "*.la" -delete -print
%fdupes %{buildroot}
@ -103,4 +105,6 @@ rm -rf %{buildroot}
%dir %{_datadir}/gtk-doc/html
%{_datadir}/gtk-doc/html/gnome-keyring
%files lang -f %{name}.lang
%changelog