Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 37618 - KeyChain fails to detect existing ssh-agent where username is numeric
Summary: KeyChain fails to detect existing ssh-agent where username is numeric
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: Keychain (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Keychain Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-08 08:52 UTC by James Spinks
Modified: 2004-01-08 09:02 UTC (History)
0 users

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 James Spinks 2004-01-08 08:52:27 UTC
Using the KeyChain package from within Cygwin on a Windows XP Professional laptop.

Unfortunately, due to the build insisted upon by my employer, all the usernames in the organisation are six digit numbers.  When the keychain script attempts to check for existing ssh-agent instances the command 'ps -u 333333 -f' assumes that the numeric is not the actual username but the userid.  It cannot therefore find an existing ssh-agent instance and starts another one regardless.

I am able to work around this by changing the line in the script that sets the me variable from:

me=`whoami`

to:

me=`id -u`

This uses my actual userid instead of the numeric username and successfully performs the test for an existing ssh-agent.  I do not know how widely applicable this fix will be though outside of my Cygwin environment as I have no ability to test further.

Reproducible: Always
Steps to Reproduce:
1.  Create a user with a numeric username
2.  Run keychain
3.  Run keychain again

Actual Results:  
Keychain launches a new ssh-agent instance each time (and overwrites the
existing hostname-sh and hostname-csh files).
Comment 1 rob holland (RETIRED) gentoo-dev 2004-01-08 08:57:40 UTC
Valid linux username don't start with a number (for precisely this reason).
Comment 2 James Spinks 2004-01-08 09:02:36 UTC
Agreed, but this is Cygwin and not Linux.  Hence I'm stuck with the usernames that Cygwin inherits from Windows.