Net:SSH bug (+ fix)

P

Peter C. Verhage

Hi,

Just found a small bug in Net::SSH 1.0. Line 44 of services.rb contains
the following if statement:

if socket_name && socket_factory

If you use the Putty Agent the socket factory is enough for agent usage,
but because of this if statement you also have to set the SSH_AUTH_SOCK
environment variable to make use of the agent. This could be changed by
slightly changing the if statement to:

if (File::ALT_SEPARATOR || socket_name) && socket_factory

Thanks for the great library BTW!

Regards,

Peter
 
D

Daniel Berger

Peter said:
Hi,

Just found a small bug in Net::SSH 1.0. Line 44 of services.rb contains
the following if statement:

if socket_name && socket_factory

If you use the Putty Agent the socket factory is enough for agent usage,
but because of this if statement you also have to set the SSH_AUTH_SOCK
environment variable to make use of the agent. This could be changed by
slightly changing the if statement to:

if (File::ALT_SEPARATOR || socket_name) && socket_factory

Thanks for the great library BTW!

Regards,

Peter

Nice spot. Please post patches, bug fixes, etc on the Net::SSH
RubyForge project page. Jamis is more likely to see it, and less
likely to forget it. :)

Regards,

Dan
 
J

Jamis Buck

Hi,

Just found a small bug in Net::SSH 1.0. Line 44 of services.rb contains
the following if statement:

if socket_name && socket_factory

If you use the Putty Agent the socket factory is enough for agent usage,
but because of this if statement you also have to set the SSH_AUTH_SOCK
environment variable to make use of the agent. This could be changed by
slightly changing the if statement to:

if (File::ALT_SEPARATOR || socket_name) && socket_factory

Thanks for the great library BTW!

Regards,

Peter

Thanks for the fix, Peter. I've committed it to the repository
(http://www.jamisbuck.org/svn/net-ssh) and it will be released
whenever I get some time to package the next release. :)

- Jamis
 
J

Jamis Buck

Nice spot. Please post patches, bug fixes, etc on the Net::SSH
RubyForge project page. Jamis is more likely to see it, and less
likely to forget it. :)

A very, very good point. It also provides a history of what work has
been done, and if someone else encounters a problem, they can quickly
discover whether anyone else has the same problem.

- Jamis
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,169
Messages
2,570,915
Members
47,456
Latest member
JavierWalp

Latest Threads

Top