Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 389487 - net-misc/keychain - keychain matches all (too many) processes with "ssh-agent" in cmdline
Summary: net-misc/keychain - keychain matches all (too many) processes with "ssh-agent...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-04 13:40 UTC by Mark Keisler
Modified: 2018-03-11 04:01 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Keisler 2011-11-04 13:40:44 UTC
keychain sometimes mistakenly thinks it has found an existing ssh-agent process and then fails when it tries to use it.  It has actually found a dbus process.

Reproducible: Sometimes

Steps to Reproduce:
1.Login to xfce
2.open a login terminal, I use zsh
3.start keychain in ~/.zlogin
Actual Results:  
 % keychain --agents ssh  ~/.ssh/id_dsa ~/.ssh/id_rsa

 * keychain 2.7.1 ~ http://www.funtoo.org
 * Found existing ssh-agent: 3312
 * Adding 2 ssh key(s): /home/qa4437/.ssh/id_dsa /home/qa4437/.ssh/id_rsa
 * Error: Problem adding; giving up


Expected Results:  
should start a ssh-agent and use it.

qa4437@shadow ~ % ps -fwp 3312 
UID        PID  PPID  C STIME TTY          TIME CMD
qa4437    3312     1  0 08:33 ?        00:00:00 /usr/bin/dbus-launch --exit-with-session /usr/bin/ssh-agent -- startxfce4
Comment 1 Mark Keisler 2011-11-05 18:43:57 UTC
My thought it that for starters, keychain should use pgrep (since it matches the exact command) if it is present instead of slogging through 'ps x|awk' output as it does.
Comment 2 Oleh 2016-06-24 16:16:04 UTC
is this a problem with 2.8.2?
Comment 3 Mark Keisler 2017-07-16 02:12:13 UTC
My gentoo system is now headless, so I can't check the exact thing that happened before, but trying to fake it seems to show that the issue would no longer occur with 2.8.x
Comment 4 Doug Goldstein (RETIRED) gentoo-dev 2018-03-11 04:01:38 UTC
Thanks for the follow up Mark. Going to mark this as fixed since the current versions in the tree solve this.