Skip Menu |
 

This queue is for tickets about the Net-SSH-Perl CPAN distribution.

Report information
The Basics
Id: 25174
Status: resolved
Priority: 0/
Queue: Net-SSH-Perl

People
Owner: Nobody in particular
Requestors: dgehl [...] inverse.ca
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.29
Fixed in: 1.31



Subject: $ENV{HOME} undefined in SSH1.pm
Download (untitled) / with headers
text/plain 106b
Net/SSH/Perl/SSH1.pm accesses $ENV{HOME} which is not always defined (perl version is 5.8.8, OS is RHEL4)
From: dgehl [...] inverse.ca
The attached file fixes the issue
Download SSH1.patch
text/x-diff 905b
--- /usr/lib/perl5/vendor_perl/5.8.5/Net/SSH/Perl/SSH1.pm 2005-10-11 20:57:31.000000000 -0400 +++ SSH1.pm 2007-02-26 15:09:47.000000000 -0500 @@ -27,14 +27,15 @@ sub _proto_init { my $ssh = shift; + my $home = $ENV{HOME} || (getpwuid($>))[7]; unless ($ssh->{config}->get('user_known_hosts')) { - $ssh->{config}->set('user_known_hosts', "$ENV{HOME}/.ssh/known_hosts"); + $ssh->{config}->set('user_known_hosts', "$home/.ssh/known_hosts"); } unless ($ssh->{config}->get('global_known_hosts')) { $ssh->{config}->set('global_known_hosts', "/etc/ssh_known_hosts"); } unless (my $if = $ssh->{config}->get('identity_files')) { - $ssh->{config}->set('identity_files', [ "$ENV{HOME}/.ssh/identity" ]); + $ssh->{config}->set('identity_files', [ "$home/.ssh/identity" ]); } for my $a (qw( password rhosts rhosts_rsa rsa ch_res )) {
Applied with minor changes in version 1.31. Thank you.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.