gnome-keyring-daemon's output cannot be sourced anymore

Bug #316070 reported by Daniel Hahler
2
Affects Status Importance Assigned to Milestone
GNOME Keyring
Fix Released
High
gnome-keyring (Ubuntu)
Fix Released
High
Ubuntu Desktop Bugs

Bug Description

Binary package hint: gnome-keyring

A change in the behavior of gnome-keyring-daemon caused a stalled startkde on my system.

I have the following file:
$ cat ~/.kde/env/start-custom.sh
#!/bin/sh
eval `gnome-keyring-daemon`
export GNOME_KEYRING_PID
export GNOME_KEYRING_SOCKET

This used to work and was meant to provide interoperability with the gnome-keyring-daemon under KDE.
However with 2.25.4.1-0ubuntu1, this fails as follow:
$ `gnome-keyring-daemon`
** Message: another SSH agent is running at: /tmp/keyring-xF7mcu/ssh
** Message: another gnome-keyring-daemon is running
** Message: couldn't set environment variable in session: Setenv interface is only available during the Initialization phase

Then, the process does not exit, but hangs.

I don't know how to debug this further, since running "gnome-keyring-daemon" without letting the result get sourced (through the use of backticks around it), it exits.

Also, since "gnome-keyring-daemon|xargs -n1 echo" fails/hangs in the same way I suspect that the behavior change is caused/triggered when its output gets redirected somehow.

You can see that it's a quite common method to add such a start script, by searching for it on Google:
http://www.google.com/search?q=eval+`gnome-keyring-daemon`+export

ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 9.04
NonfreeKernelModules: nvidia
Package: gnome-keyring 2.25.4.1-0ubuntu1
ProcEnviron:
 LANGUAGE=de
 PATH=(custom, user)
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
SourcePackage: gnome-keyring
Uname: Linux 2.6.27-8-generic i686

Tags: apport-bug
Revision history for this message
Daniel Hahler (blueyed) wrote :
Revision history for this message
Daniel Hahler (blueyed) wrote :

Setting Importance=High, because it causes login failure (i.e. startkde just hangs) and it not really easy to debug/find out.

Changed in gnome-keyring:
importance: Undecided → High
Revision history for this message
Sebastien Bacher (seb128) wrote :

that's an upstream issue, could somebody having the bug open that on bugzilla.gnome.org?

Changed in gnome-keyring:
assignee: nobody → desktop-bugs
Revision history for this message
Cody A.W. Somerville (cody-somerville) wrote :

I imagine this issue is that the pam module has indeed already started it ;]

Revision history for this message
Daniel Hahler (blueyed) wrote :

No, Cody.
gnome-keyring-daemon isn't running yet - it's just behaving differently/buggy when being run in a subshell/-process(?) - as in $(gnome-keyring-daemon).

Revision history for this message
Sebastien Bacher (seb128) wrote :

did you open the bug on the GNOME bug tracker?

Revision history for this message
Sebastien Bacher (seb128) wrote :

the bug has been fixed upstream now

Changed in gnome-keyring:
status: New → Triaged
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-keyring - 2.25.92-0ubuntu1

---------------
gnome-keyring (2.25.92-0ubuntu1) jaunty; urgency=low

  * New upstream version:
    - Fix problems when multiple processes tried to initialize the
      gnome-keyring-daemon at the same time, often resulting in a user
      session that hung on login.
    - Add compatibility support for loading SSH unlock passwords from
      previous versions of gnome-keyring.
    - Fix compiler warnings on 32-bit systems.
    - Fix uninitialized variable usage. These resulted in crashes.
    - Initialize PKCS#11 tokens before importing certificates or keys
      to them. Remove previous auto-initialize idea.
    - Add basic support for PKCS#11 SO logins.
    - Fix focus issues in the import certificate/key dialog.
    - When looking for PKCS#11 objects, skip tokens that have not been
      initialized.
    - Exit properly when an error occurs on importing a certificate or key.
    - Hash objects when storing them in PKCS#11 user-store and
      validate the hashes when loading them.
    - Build fix on Solaris
    - If login keyring doesn't exist when changing a PAM password, don't
      create it automatically.
    - Close stdin/stdout when not running the daemon in foreground. This
      fixes a regression in scripts starting gnome-keyring-daemon. (lp: #316070)

 -- Sebastien Bacher <email address hidden> Mon, 02 Mar 2009 17:00:10 +0100

Changed in gnome-keyring:
status: Fix Committed → Fix Released
Changed in gnome-keyring:
status: Unknown → Fix Released
Changed in gnome-keyring:
importance: Unknown → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.