This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ANNOUNCEMENT] Updated: keychain-2.0.3-1

Karl M wrote:
Hi All...

I believe I found a small bug in the latest keychain. For Cygwin, keychain
now does a "ps -e -u <username> -f" to look for ssh-agent processes...I
believe it should be a "ps -u <username> -f" instead.

The reason is as follows...the -e shows processes for all users. If multiple
users have ssh-agent processes hanging around, keychain can find the wrong
one and this produces some strange results. I may be the only one to see this
because ssh-agent processes don't usually survive a logoff. I launch keychain
from a service for each user (that wants the feature) so that the agent stays
around for multiple logon/off sessions...that way, they live untill the next

I have never run Cygwin as a multiuser system, but I take your word for it. My experience with ps while testing previous version of keychain was that it ignores any options it doesn't understand. I would not be surprised if it ignored the -u after an -e 8-)

The attached patch file removes the -e option and also creates a third output file in the .keychain directory. The new file is ~/.keychain/${HOSTNAME}.cmd so that programs launched from a windows command shell can also use keychain.

Please don't do that. If you have fixed/added two functionalities include two patches, it's so much easier to evaluate that way. I'll release an updated keychain with the ps fix soon (tomorrow?).

For the cmd part I cannot see any cmd.exe specific code, can it be renamed to .bat so the '95 family can also run it?
And how useful is it, do people actually use cmd.exe as their cygwin shell?

The second attachment is a script to launch keychain as a service for those interested in surviving multiple logon/off sessions. Just use it to create a service for each user that wants the feature. The service only sets up the ssh-agent. The keys are loaded from the .profile and the passphrase(s) are entered then.



-- Med venlig hilsen / Kind regards

Hack Kampbjørn

-- Unsubscribe info: Problem reports: Documentation: FAQ:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]