After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 519487 - Should set or at least unset SSH_AGENT_PID
Should set or at least unset SSH_AGENT_PID
Status: RESOLVED NOTABUG
Product: gnome-keyring
Classification: Core
Component: general
2.21.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME keyring maintainer(s)
GNOME keyring maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2008-02-29 10:42 UTC by Loïc Minier
Modified: 2008-04-16 23:41 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Loïc Minier 2008-02-29 10:42:12 UTC
Hi,

When starting the ssh component, gnome-keyring should also set SSH_AGENT_PID or at least unsetenv() it (or tell gnome-session to do so).  This is particularly weird when another agent is still running and you end up with SSH_AUTH_SOCK pointing to g-k, but SSH_AGENT_PID pointing to e.g. ssh-agent... (see bug #519486).  I guess this might also happen when another agent goes away.

Bye,
Comment 1 Stef Walter 2008-02-29 15:46:02 UTC
True, I can see how that would be confusing. It certainly would be easy enough to set SSH_AGENT_PID

However it seemed to be that SSH_AGENT_PID refers to the the 'ssh-agent' process specifically, and does not always correspond to SSH_AUTH_SOCK. 

It would be interesting to discover which programs are confused by this.
Comment 2 Loïc Minier 2008-02-29 15:51:51 UTC
I understand why you didn't want to set SSH_AGENT_PID to the g-k process, but then it should be cleared.

I don't know which programs are looking at this env var, but grepping my /usr/sbin, /usr/lib, and /usr/bin returned:
/usr/bin/keychain
/usr/bin/ssh-agent

Other users of this env vars: me, getting confused :)
Comment 3 Matthias Clasen 2008-04-16 22:29:41 UTC
I regards to preexisting ssh-agent processes, here is a Fedora bug that asks for gnome-keyring to be somewhat more cooperative:

https://bugzilla.redhat.com/show_bug.cgi?id=442807

Comment 4 Stef Walter 2008-04-16 23:41:20 UTC
There probably needs to be a GUI for disabling this in the next version of GNOME, but here's several ways that users, distros or admins can disable the gnome-keyring SSH agent:

http://live.gnome.org/GnomeKeyring/Ssh

As far as the SSH_AGENT_PID this environment variable, it seems this belongs to the 'ssh-agent' process (similar to how GNOME_KEYRING_PID belongs to gnome-keyring-daemon). 

I could be wrong about this, and I'd certainly be willing to change my opinion (and gnome-keyring) given solid rationale.