This commit is contained in:
Matthias Clasen 2007-10-15 17:28:20 +00:00
parent 5bca71ed63
commit e8823ccc7e
7 changed files with 12 additions and 240 deletions

View File

@ -1 +1 @@
gnome-keyring-2.20.tar.bz2
gnome-keyring-2.20.1.tar.bz2

View File

@ -1,14 +0,0 @@
Index: daemon/gkr-daemon-ops.c
===================================================================
--- daemon/gkr-daemon-ops.c (revision 838)
+++ daemon/gkr-daemon-ops.c (revision 839)
@@ -723,6 +723,9 @@
g_warning ("couldn't create default keyring");
ask->response = GKR_ASK_RESPONSE_FAILURE;
} else {
+ /* Add to our main list */
+ gkr_keyrings_add (keyring);
+
/* Set our newly created keyring as the default */
gkr_keyrings_set_default (keyring);
}

View File

@ -1,30 +0,0 @@
diff -up gnome-keyring-2.20/configure.in.link-against-pam gnome-keyring-2.20/configure.in
--- gnome-keyring-2.20/configure.in.link-against-pam 2007-10-09 12:14:32.000000000 -0400
+++ gnome-keyring-2.20/configure.in 2007-10-09 12:15:15.000000000 -0400
@@ -243,6 +243,13 @@ if test "$enable_pam" != "no"; then
AC_CHECK_HEADER(security/pam_modules.h, have_pam=yes, have_pam=no)
if test "$enable_pam" = "yes" -a "$have_pam" = "no"; then
AC_MSG_ERROR(The PAM headers are missing)
+ elif test "$have_pam" = "yes"; then
+ old_LIBS=$LIBS
+ AC_CHECK_LIB(pam, pam_start, have_pam=yes, have_pam=no)
+ if test "$enable_pam" = "yes" -a "$have_pam" = "no"; then
+ AC_MSG_ERROR(The PAM library is missing)
+ fi
+ LIBS=$old_LIBS
fi
fi
diff -up gnome-keyring-2.20/pam/Makefile.am.link-against-pam gnome-keyring-2.20/pam/Makefile.am
--- gnome-keyring-2.20/pam/Makefile.am.link-against-pam 2007-10-09 12:14:45.000000000 -0400
+++ gnome-keyring-2.20/pam/Makefile.am 2007-10-09 12:14:56.000000000 -0400
@@ -12,7 +12,8 @@ pam_gnome_keyring_la_SOURCES = \
gkr-pam-stubs.c
pam_gnome_keyring_la_LIBADD = \
- $(top_builddir)/common/libgkr-module-common.la
+ $(top_builddir)/common/libgkr-module-common.la \
+ -lpam
pam_gnome_keyring_la_LDFLAGS = \
-module -avoid-version \

View File

@ -1,91 +0,0 @@
diff -ur gnome-keyring-2.20.orig/daemon/gkr-daemon-ops.c gnome-keyring-2.20/daemon/gkr-daemon-ops.c
--- gnome-keyring-2.20.orig/daemon/gkr-daemon-ops.c 2007-10-03 15:01:34.000000000 +0200
+++ gnome-keyring-2.20/daemon/gkr-daemon-ops.c 2007-10-03 15:01:48.000000000 +0200
@@ -1136,7 +1136,7 @@
g_free (keyring_name);
if (res == GNOME_KEYRING_RESULT_OK)
- gkr_keyrings_remove (keyring);
+ gkr_keyrings_remove (keyring, TRUE);
return TRUE;
}
Only in gnome-keyring-2.20/daemon: gkr-daemon-ops.c.orig
diff -ur gnome-keyring-2.20.orig/keyrings/gkr-keyring.c gnome-keyring-2.20/keyrings/gkr-keyring.c
--- gnome-keyring-2.20.orig/keyrings/gkr-keyring.c 2007-10-03 15:01:34.000000000 +0200
+++ gnome-keyring-2.20/keyrings/gkr-keyring.c 2007-10-03 15:01:48.000000000 +0200
@@ -1211,7 +1211,7 @@
if (!gkr_keyring_update_from_disk (keyring, TRUE)) {
/* Failed to re-read, remove the keyring */
g_warning ("Couldn't re-read keyring %s\n", keyring->keyring_name);
- gkr_keyrings_remove (keyring);
+ gkr_keyrings_remove (keyring, TRUE);
}
return TRUE;
diff -ur gnome-keyring-2.20.orig/keyrings/gkr-keyrings.c gnome-keyring-2.20/keyrings/gkr-keyrings.c
--- gnome-keyring-2.20.orig/keyrings/gkr-keyrings.c 2007-10-03 15:01:34.000000000 +0200
+++ gnome-keyring-2.20/keyrings/gkr-keyrings.c 2007-10-03 15:01:48.000000000 +0200
@@ -235,7 +235,7 @@
/* Try and update/load it */
if (!gkr_keyring_update_from_disk (keyring, FALSE) ||
!keyring->keyring_name || !keyring->keyring_name[0]) {
- gkr_keyrings_remove (keyring);
+ gkr_keyrings_remove (keyring, TRUE);
}
}
@@ -257,7 +257,7 @@
keyring = GKR_KEYRING (keyrings->data);
if (keyring == session_keyring)
session_keyring = NULL;
- gkr_keyrings_remove (keyring);
+ gkr_keyrings_remove (keyring, FALSE);
}
g_free (default_keyring);
@@ -411,7 +411,7 @@
if (!keyring->location)
continue;
if (g_hash_table_lookup (checks, GUINT_TO_POINTER (keyring->location)))
- gkr_keyrings_remove (keyring);
+ gkr_keyrings_remove (keyring, TRUE);
}
g_hash_table_destroy (checks);
@@ -434,15 +434,19 @@
}
void
-gkr_keyrings_remove (GkrKeyring *keyring)
+gkr_keyrings_remove (GkrKeyring *keyring,
+ gboolean unset_if_default)
{
keyrings_init ();
-
+
g_assert (GKR_IS_KEYRING (keyring));
+
+
if (g_list_find (keyrings, keyring)) {
- if (default_keyring &&
+ if (unset_if_default &&
+ default_keyring &&
strcmp (keyring->keyring_name, default_keyring) == 0)
gkr_keyrings_set_default (NULL);
diff -ur gnome-keyring-2.20.orig/keyrings/gkr-keyrings.h gnome-keyring-2.20/keyrings/gkr-keyrings.h
--- gnome-keyring-2.20.orig/keyrings/gkr-keyrings.h 2007-10-03 15:01:34.000000000 +0200
+++ gnome-keyring-2.20/keyrings/gkr-keyrings.h 2007-10-03 15:01:48.000000000 +0200
@@ -36,7 +36,8 @@
void gkr_keyrings_add (GkrKeyring *keyring);
-void gkr_keyrings_remove (GkrKeyring *keyring);
+void gkr_keyrings_remove (GkrKeyring *keyring,
+ gboolean unset_if_default);
GkrKeyring* gkr_keyrings_find (const gchar *name);

View File

@ -1,90 +0,0 @@
Index: tests/unit-test-keyrings.c
===================================================================
--- tests/unit-test-keyrings.c (revision 842)
+++ tests/unit-test-keyrings.c (revision 843)
@@ -249,8 +249,8 @@
}
/*
- * A find that does not match should return zero results, not some error message:
- * http://bugzilla.gnome.org/show_bug.cgi?id=447315
+ * A find that does not match should return 'Not Found':
+ * http://bugzilla.gnome.org/show_bug.cgi?id=476682
*/
void unit_test_find_invalid (CuTest* cu)
{
@@ -263,8 +263,7 @@
/* Now try to find it */
res = gnome_keyring_find_items_sync (GNOME_KEYRING_ITEM_GENERIC_SECRET, attrs, &found);
- CuAssertIntEquals(cu, GNOME_KEYRING_RESULT_OK, res);
- CuAssert(cu, "Shouldn't have matched any items", g_list_length (found) == 0);
+ CuAssertIntEquals(cu, GNOME_KEYRING_RESULT_NO_MATCH, res);
}
void unit_test_lock_keyrings (CuTest* cu)
Index: daemon/gkr-daemon-ops.c
===================================================================
--- daemon/gkr-daemon-ops.c (revision 842)
+++ daemon/gkr-daemon-ops.c (revision 843)
@@ -1784,8 +1784,12 @@
if (ctx.nfound > 0 && ctx.items == NULL)
gkr_buffer_add_uint32 (result, GNOME_KEYRING_RESULT_DENIED);
- /* Zero or more items matched and given access to */
- else
+ /* Zero items matched */
+ else if (ctx.nfound == 0)
+ gkr_buffer_add_uint32 (result, GNOME_KEYRING_RESULT_NO_MATCH);
+
+ /* More than one item found and given access to */
+ else
gkr_buffer_add_uint32 (result, GNOME_KEYRING_RESULT_OK);
ctx.items = g_list_sort_with_data (ctx.items, sort_found, ctx.attributes);
Index: library/gnome-keyring-utils.c
===================================================================
--- library/gnome-keyring-utils.c (revision 842)
+++ library/gnome-keyring-utils.c (revision 843)
@@ -111,14 +111,25 @@
return _("Access Denied");
case GNOME_KEYRING_RESULT_NO_KEYRING_DAEMON:
return _("The gnome-keyring-daemon application is not running.");
- case GNOME_KEYRING_RESULT_NO_SUCH_KEYRING:
- return _("The keyring has already been unlocked.");
case GNOME_KEYRING_RESULT_IO_ERROR:
return _("Error communicating with gnome-keyring-daemon");
case GNOME_KEYRING_RESULT_ALREADY_EXISTS:
return _("A keyring with that name already exists");
case GNOME_KEYRING_RESULT_BAD_ARGUMENTS:
return _("Programmer error: The application sent invalid data.");
+
+ /*
+ * TODO: These needs to be better messages, and translated in next
+ * release. This was added late because poorly written programs
+ * were assuming incorrect things about our result codes, and ABI
+ * compatibility and all that.
+ *
+ * http://bugzilla.gnome.org/show_bug.cgi?id=476682
+ */
+ case GNOME_KEYRING_RESULT_NO_MATCH:
+ return "No Results";
+ case GNOME_KEYRING_RESULT_NO_SUCH_KEYRING:
+ return "No such keyring exists";
/*
* This would be a dumb message to display to the user, we never return
Index: library/gnome-keyring-result.h
===================================================================
--- library/gnome-keyring-result.h (revision 842)
+++ library/gnome-keyring-result.h (revision 843)
@@ -33,7 +33,8 @@
GNOME_KEYRING_RESULT_BAD_ARGUMENTS,
GNOME_KEYRING_RESULT_IO_ERROR,
GNOME_KEYRING_RESULT_CANCELLED,
- GNOME_KEYRING_RESULT_KEYRING_ALREADY_EXISTS
+ GNOME_KEYRING_RESULT_KEYRING_ALREADY_EXISTS,
+ GNOME_KEYRING_RESULT_NO_MATCH
} GnomeKeyringResult;
#define GNOME_KEYRING_RESULT_ALREADY_EXISTS \

View File

@ -2,8 +2,8 @@
Summary: A framework for managing user passwords and other secrets
Name: gnome-keyring
Version: 2.20
Release: 6%{?dist}
Version: 2.20.1
Release: 1%{?dist}
License: GPLv2+ and LGPLv2+
Group: System Environment/Libraries
Source: http://download.gnome.org/sources/gnome-keyring/2.20/gnome-keyring-%{version}.tar.bz2
@ -19,12 +19,8 @@ BuildRequires: autoconf, automake, libtool
BuildRequires: intltool
BuildRequires: perl(XML::Parser)
# Backport from svn
Patch1: gnome-keyring-2.20-add_new_keyrings.patch
Patch2: gnome-keyring-2.20-no-unset-default.patch
Patch3: gnome-keyring-2.20-no_match.patch
Patch4: gnome-keyring-2.20-selinux-pam.patch
Patch5: gnome-keyring-2.20-link-against-pam.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=484612
Patch0: gnome-keyring-2.20-selinux-pam.patch
%description
gnome-keyring manages passwords and other types of secrets
@ -64,11 +60,7 @@ and start the keyring daemon.
%prep
%setup -q -n gnome-keyring-%{version}
%patch1 -p0 -b .add_new_keyrings
%patch2 -p1 -b .no_unset_default
%patch3 -p0 -b .no_match
%patch4 -p1 -b .selinux_pam
%patch5 -p1 -b .link-against-pam
%patch0 -p1 -b .selinux_pam
%build
aclocal
@ -115,6 +107,11 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Mon Oct 15 2007 Matthias Clasen <mclasen@redhat.com> - 2.20.1-1
- Update to 2.20.1
- Drop obsolete patches
- Add bug ref for selinux patch
* Tue Oct 9 2007 Matthias Clasen <mclasen@redhat.com> - 2.20-6
- Avoid undefined symbols in the pam module

View File

@ -1 +1 @@
f37c71974323cc79f59e274d97110047 gnome-keyring-2.20.tar.bz2
16eb73c4a23db11ee8f20a731cf2a92b gnome-keyring-2.20.1.tar.bz2