cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: curl crashes when trying to scp over socks4

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sat, 14 Jun 2008 22:19:07 +0200 (CEST)

On Sat, 14 Jun 2008, menner_at_arcor.de wrote:

> curl version 7.18.2 with libssh2 version 0.18 and 0.19pre on Solaris 10
> sparc
>
> Immediatelly after establishing a connection to the socks4 proxy, curl
> crashes.
>
> The reason is that in sendf.c Curl_write() and Curl_read() try to talk ssh
> to the socks proxy.

Ah, right. It assumes that just because you want SSH in the end, it can use it
at once... How silly! Good catch!

> My fix for sendf.c is :
> 362c362
> < else if(conn->protocol & PROT_SCP)
> ---
>> else if((conn->protocol & PROT_SCP) && (conn->proto.sshc.state > SSH_STOP))

First, please use diff -u to produce unidiffs so that we can apply the patch
in our ends (which has the sources modified).

Then, I don't like how this patch puts SSH-specific details in a function that
does its best to remain protocol agnostic (and this particular patch would
even break the build for everyone trying to build without libssh2 present). I
think a nicer fix is to set variables somewhere for "want_protocol" and
"use_protocol" and thus it shouldn't send SSH until the "use_protocol" says so
even if "want_protocol" says so already from the start... The SSL and krb code
already do it similar to that.

Oh, and please use the curl-library mailing list for libcurl development
subjects.

> Jetzt komfortabel bei Arcor-Digital TV einsteigen: Mehr Happy Ends, mehr
> Herzschmerz, mehr Fernsehen! Erleben Sie 50 digitale TV Programme und

Including German ads in generic outgoing mails seem like very strange idea...

-- 
  / daniel.haxx.se
Received on 2008-06-14