From 8ab9ab55d27faf6a9a831e0473a51deaec803f6f Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Fri, 9 Nov 2012 08:19:52 -0600 Subject: [PATCH] WARNING: couldn't connect to: /tmp/keyring-... (#783568, gnome#665961) --- ...ing-3.6.1-pkcs11_socket_nodebug_spam.patch | 62 +++++++++++++++++++ gnome-keyring.spec | 12 +++- 2 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 gnome-keyring-3.6.1-pkcs11_socket_nodebug_spam.patch diff --git a/gnome-keyring-3.6.1-pkcs11_socket_nodebug_spam.patch b/gnome-keyring-3.6.1-pkcs11_socket_nodebug_spam.patch new file mode 100644 index 0000000..819f8b3 --- /dev/null +++ b/gnome-keyring-3.6.1-pkcs11_socket_nodebug_spam.patch @@ -0,0 +1,62 @@ +From 370694b36f1ed6f26554ccc740da3b3e92aafded Mon Sep 17 00:00:00 2001 +From: Rex Dieter +Date: Fri, 17 Aug 2012 08:52:25 -0500 +Subject: [PATCH] only print debug message if no pkcs11 socket + +This is to handle the case of running gnome-keyring in environments +not matching GNOME;Unity and avoid needless +WARNING: couldn't connect to: /tmp/keyring-SqfLpI/pkcs11 +type errors + +https://bugzilla.gnome.org/show_bug.cgi?id=665961 +--- + pkcs11/rpc-layer/gkm-rpc-module.c | 18 ++++++++++++++++-- + 1 file changed, 16 insertions(+), 2 deletions(-) + +diff --git a/pkcs11/rpc-layer/gkm-rpc-module.c b/pkcs11/rpc-layer/gkm-rpc-module.c +index 240fd83..1b11d96 100644 +--- a/pkcs11/rpc-layer/gkm-rpc-module.c ++++ b/pkcs11/rpc-layer/gkm-rpc-module.c +@@ -251,8 +251,13 @@ call_connect (CallState *cs) + + if (connect (sock, (struct sockaddr*) &addr, sizeof (addr)) < 0) { + close (sock); +- warning (("couldn't connect to: %s: %s", pkcs11_socket_path, strerror (errno))); +- return CKR_DEVICE_ERROR; ++ if (errno == ENOENT) { ++ debug (("couldn't connect to: %s: %s", pkcs11_socket_path, strerror (errno))); ++ return CKR_DEVICE_REMOVED; ++ } else { ++ warning (("couldn't connect to: %s: %s", pkcs11_socket_path, strerror (errno))); ++ return CKR_DEVICE_ERROR; ++ } + } + + if (egg_unix_credentials_write (sock) < 0) { +@@ -1208,6 +1213,10 @@ rpc_C_Initialize (CK_VOID_PTR init_args) + if (ret == CKR_OK) + ret = call_run (cs); + call_done (cs, ret); ++ ++ /* No daemon available */ ++ } else if (ret == CKR_DEVICE_REMOVED) { ++ ret = CKR_OK; + } + } + +@@ -1248,8 +1257,13 @@ rpc_C_Finalize (CK_VOID_PTR reserved) + if (ret == CKR_OK) + ret = call_run (cs); + call_done (cs, ret); ++ ++ /* No daemon available */ ++ } else if (ret == CKR_DEVICE_REMOVED) { ++ ret = CKR_OK; + } + ++ + if (ret != CKR_OK) + warning (("finalizing the daemon returned an error: %d", ret)); + } +-- +1.7.12.1 \ No newline at end of file diff --git a/gnome-keyring.spec b/gnome-keyring.spec index 156bdfa..3f60980 100644 --- a/gnome-keyring.spec +++ b/gnome-keyring.spec @@ -8,13 +8,18 @@ Summary: Framework for managing passwords and other secrets Name: gnome-keyring Version: 3.6.1 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ and LGPLv2+ Group: System Environment/Libraries #VCS: git:git://git.gnome.org/gnome-keyring Source: http://download.gnome.org/sources/gnome-keyring/3.6/gnome-keyring-%{version}.tar.xz URL: http://www.gnome.org +## upstream patches +# https://bugzilla.redhat.com/show_bug.cgi?id=783568 +# https://bugzilla.gnome.org/show_bug.cgi?id=665961 +Patch100: gnome-keyring-3.6.1-pkcs11_socket_nodebug_spam.patch + BuildRequires: glib2-devel >= %{glib2_version} BuildRequires: gtk3-devel >= %{gtk3_version} BuildRequires: gcr-devel >= %{gcr_version} @@ -57,6 +62,8 @@ automatically unlock the "login" keyring when the user logs in. %prep %setup -q -n gnome-keyring-%{version} +%patch100 -p1 -b .pkcs11_socket_nodebug_spam + %build %configure \ --with-pam-dir=/%{_lib}/security \ @@ -118,6 +125,9 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas >&/dev/null || : %changelog +* Fri Nov 09 2012 Rex Dieter 3.6.1-2 +- WARNING: couldn't connect to: /tmp/keyring-... (#783568, gnome#665961) + * Tue Oct 16 2012 Kalev Lember - 3.6.1-1 - Update to 3.6.1