From libssh2-devel-bounces@cool.haxx.se  Tue Mar  1 00:06:58 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p1SN6ow3027674;
	Tue, 1 Mar 2011 00:06:57 +0100
Received: from earth.stuge.se (earth.stuge.se [212.116.89.126])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p1SN6mP1027648
	for <libssh2-devel@cool.haxx.se>; Tue, 1 Mar 2011 00:06:48 +0100
Received: (qmail 19321 invoked from network); 28 Feb 2011 23:06:51 -0000
Received: from unknown (HELO earth.stuge.se) (127.0.0.1)
	by localhost with SMTP; 28 Feb 2011 23:06:51 -0000
MIME-Version: 1.0
From: "libssh2 Trac" <trac@libssh2.stuge.se>
X-Trac-Version: 0.12
Precedence: bulk
Cc: libssh2-devel@cool.haxx.se
Auto-Submitted: auto-generated
X-Mailer: Trac 0.12, by Edgewall Software
X-Trac-Project: libssh2
Date: Mon, 28 Feb 2011 23:06:51 -0000
X-URL: http://trac.libssh2.org/
Subject: Re: [libssh2] #211: size mismatch between struct transportpacket
	fields causes libssh2 to get stuck
X-Trac-Ticket-URL: http://trac.libssh2.org/ticket/211#comment:5
Message-ID: <123.169fad2fa3e5cbc031f1ce262d32ee54@libssh2.stuge.se>
References: <108.62cba77b47352402c1cd0687daecf8b2@libssh2.stuge.se>
X-Trac-Ticket-ID: 211
In-Reply-To: <108.62cba77b47352402c1cd0687daecf8b2@libssh2.stuge.se>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Tue, 01 Mar 2011 00:06:58 +0100 (CET)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Tue, 01 Mar 2011 00:06:48 +0100 (CET)
X-MIME-Autoconverted: from base64 to 8bit by giant.haxx.se id p1SN6mP1027648
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Reply-To: trac@libssh2.stuge.se,
        libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="utf-8"
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by giant.haxx.se id p1SN6ow3027674

#211: size mismatch between struct transportpacket fields causes libssh2 to get
stuck
---------------------------------------------------------------------------------------+
  Reporter:  www.google.com/accounts/o8/id?id=aitoawlhggg_yplkl7grwwpbbum-omtqud4rmna  |        Owner:  Peter Stuge <peter@â€¦>       
      Type:  defect                                                                    |       Status:  closed                      
  Priority:  normal                                                                    |    Milestone:  1.2.8                       
 Component:  protocol                                                                  |      Version:  1.2.7                       
Resolution:  fixed                                                                     |     Keywords:                              
    Blocks:                                                                            |   Blocked By:                              
---------------------------------------------------------------------------------------+

Comment (by stuge):

 Replying to [comment:4 www.google.com/accounts/o8/id?id
 =aitoawlhggg_yplkl7grwwpbbum-omtqud4rmna]:
 > won't this get us into trouble if there was a error after p->total_num
 was set
 > (for example while decrypting a chunk)

 Did you already look at which code paths have this problem? Do you know if
 there are many of them?

-- 
Ticket URL: <http://trac.libssh2.org/ticket/211#comment:5>
libssh2 <http://trac.libssh2.org/>
C library for writing portable SSH2 clients

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Tue Mar  1 01:28:44 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p210SUeB027337;
	Tue, 1 Mar 2011 01:28:43 +0100
Received: from earth.stuge.se (earth.stuge.se [212.116.89.126])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p210SS82027315
	for <libssh2-devel@cool.haxx.se>; Tue, 1 Mar 2011 01:28:28 +0100
Received: (qmail 24192 invoked from network); 1 Mar 2011 00:28:31 -0000
Received: from unknown (HELO earth.stuge.se) (127.0.0.1)
	by localhost with SMTP; 1 Mar 2011 00:28:31 -0000
MIME-Version: 1.0
From: "libssh2 Trac" <trac@libssh2.stuge.se>
X-Trac-Version: 0.12
Precedence: bulk
Cc: libssh2-devel@cool.haxx.se
Auto-Submitted: auto-generated
X-Mailer: Trac 0.12, by Edgewall Software
X-Trac-Project: libssh2
Date: Tue, 01 Mar 2011 00:28:31 -0000
X-URL: http://trac.libssh2.org/
Subject: Re: [libssh2] #211: size mismatch between struct transportpacket
	fields causes libssh2 to get stuck
X-Trac-Ticket-URL: http://trac.libssh2.org/ticket/211#comment:6
Message-ID: <123.0609f966ddcf6fb349ce870f55534dba@libssh2.stuge.se>
References: <108.62cba77b47352402c1cd0687daecf8b2@libssh2.stuge.se>
X-Trac-Ticket-ID: 211
In-Reply-To: <108.62cba77b47352402c1cd0687daecf8b2@libssh2.stuge.se>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Tue, 01 Mar 2011 01:28:44 +0100 (CET)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Tue, 01 Mar 2011 01:28:28 +0100 (CET)
X-MIME-Autoconverted: from base64 to 8bit by giant.haxx.se id p210SS82027315
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Reply-To: trac@libssh2.stuge.se,
        libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="utf-8"
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by giant.haxx.se id p210SUeB027337

#211: size mismatch between struct transportpacket fields causes libssh2 to get
stuck
---------------------------------------------------------------------------------------+
  Reporter:  www.google.com/accounts/o8/id?id=aitoawlhggg_yplkl7grwwpbbum-omtqud4rmna  |        Owner:  Peter Stuge <peter@â€¦>       
      Type:  defect                                                                    |       Status:  closed                      
  Priority:  normal                                                                    |    Milestone:  1.2.8                       
 Component:  protocol                                                                  |      Version:  1.2.7                       
Resolution:  fixed                                                                     |     Keywords:                              
    Blocks:                                                                            |   Blocked By:                              
---------------------------------------------------------------------------------------+

Comment (by www.google.com/accounts/o8/id?id=aitoawlhggg_yplkl7grwwpbbum-omtqud4rmna):

 Replying to [comment:5 stuge]:
 > Replying to [comment:4 www.google.com/accounts/o8/id?id
 =aitoawlhggg_yplkl7grwwpbbum-omtqud4rmna]:
 > > won't this get us into trouble if there was a error after p->total_num
 was set
 > > (for example while decrypting a chunk)
 >
 > Did you already look at which code paths have this problem? Do you know
 if there are many >of them?
 I can't speak about there being many. The one that I had in mind was in
 _libssh2_channel_read function (src/channel.c on line 1692) we have
     while (rc > 0)
         rc = _libssh2_transport_read(session);

     if ((rc < 0) && (rc != LIBSSH2_ERROR_EAGAIN))
         return _libssh2_error(session, rc, "transport read");
 Now if we get a decryption error in the 2nd call to
 _libssh2_transort_read, we could have session->packet.total_num set to a
 non zero value.
 In response to this error client code might try to free the channel (which
 is what my code does). libssh2_channel_free again calls
 libssh2_transport_read and we get stuck in the do {} while loop.

 Jasmeet

-- 
Ticket URL: <http://trac.libssh2.org/ticket/211#comment:6>
libssh2 <http://trac.libssh2.org/>
C library for writing portable SSH2 clients

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Tue Mar  1 13:04:27 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p21C47k0018866;
	Tue, 1 Mar 2011 13:04:24 +0100
Received: from mail-ww0-f42.google.com (mail-ww0-f42.google.com [74.125.82.42])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p21C45nu018638
	(version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Tue, 1 Mar 2011 13:04:05 +0100
Received: by wwe15 with SMTP id 15so4315583wwe.5
	for <libssh2-devel@cool.haxx.se>; Tue, 01 Mar 2011 04:04:01 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:date:message-id:subject:from:to
	:content-type; bh=yhr+7/ayLedZKrYR0N/bP41zHuDxEFN9+GY/vpY/WyM=;
	b=ei41AtcFV9AbSrwX/fuW413QOt+adfgdYwTITR8U/3IQgE/nNDn84m8QbMm7i7RVAJ
	p+7nrKtTtxUKcylA3EvPR9uAImF4fF0mw0yvETz1NY9zYiOhiw20rqUl1k+K1teEspWy
	rESfGGtG/tYVDoQaq7D1ApwwXQAsio5qzLFQI=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:date:message-id:subject:from:to:content-type;
	b=LEb9oIpt5AfENa3eXlPPQJM14kWAwNmUIisWHACPe0Yvz91pqxeyWiu0+mdaLOGU0C
	8geL0nTOA5phYMKbEyc5ZEjnECie/3HM9K4BD5fPxsBsEd6NqAAgDrfXKRPrdCDqw0Lt
	IPVM4j64GPgM6qLmpIBHoDKglYsjgD5cj51G4=
MIME-Version: 1.0
Received: by 10.227.206.70 with SMTP id ft6mr413882wbb.26.1298981040963; Tue,
	01 Mar 2011 04:04:00 -0800 (PST)
Received: by 10.227.13.140 with HTTP; Tue, 1 Mar 2011 04:04:00 -0800 (PST)
Date: Tue, 1 Mar 2011 17:34:00 +0530
Message-ID: <AANLkTi=-b1moZSRq7qdX8GbBiWSBeBZZeMnqkYTvgjcj@mail.gmail.com>
Subject: Login problem - Power Broker Menu
From: Naveen Sharma <writetonsharma@gmail.com>
To: libssh2-devel@cool.haxx.se
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Tue, 01 Mar 2011 13:04:27 +0100 (CET)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Tue, 01 Mar 2011 13:04:05 +0100 (CET)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============1561080592=="
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

--===============1561080592==
Content-Type: multipart/alternative; boundary=0015174c3f20844139049d6a9714

--0015174c3f20844139049d6a9714
Content-Type: text/plain; charset=UTF-8

Hi,

I am trying to login to the server and which works fine. After the login, a
Power Broker menu is shown, something like below:

1) Power Broker Menu
2) Change Power Broker Password
3) Change Password on this server
0) Exit

Please enter choice:

I am not able to go past this and I have tried various combination. On a
normal server, I am able to login and execute commands, but on this specific
server, I have no idea how to go ahead.

This is the sequence of code I am trying:

//I did a normal authentication, which is successful

libssh2_channel_open_session()
libssh2_channel_request_pty()
libssh2_channel_shell()
libssh2_channel_read()                               // This is reading this
menu.

I am trying, libssh2_channel_write(), but this is not working.


Please suggest a solution.


Thanks,
Naveen.

--0015174c3f20844139049d6a9714
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<br>Hi,<br><br>I am trying to login to the server and which works fine. Aft=
er the login, a Power Broker menu is shown, something like below:<br><br>1)=
 Power Broker Menu<br>2) Change Power Broker Password<br>3) Change Password=
 on this server<br>
0) Exit<br><br>Please enter choice: <br><br>I am not able to go past this a=
nd I have tried various combination. On a normal server, I am able to login=
 and execute commands, but on this specific server, I have no idea how to g=
o ahead.<br>
<br>This is the sequence of code I am trying:<br><br>//I did a normal authe=
ntication, which is successful<br><br>libssh2_channel_open_session()<br>lib=
ssh2_channel_request_pty()<br>libssh2_channel_shell()<br>libssh2_channel_re=
ad()=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 // This is reading this menu.<br>
<br>I am trying, libssh2_channel_write(), but this is not working.<br><br><=
br>Please suggest a solution.<br><br><br>Thanks,<br>Naveen.<br>

--0015174c3f20844139049d6a9714--

--===============1561080592==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

--===============1561080592==--

From libssh2-devel-bounces@cool.haxx.se  Tue Mar  1 16:16:13 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p21FFq1M029667;
	Tue, 1 Mar 2011 16:16:09 +0100
Received: from foo.stuge.se (qmailr@foo.stuge.se [213.88.146.6])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with SMTP id p21FFoJD029636
	for <libssh2-devel@cool.haxx.se>; Tue, 1 Mar 2011 16:15:51 +0100
Received: (qmail 25973 invoked by uid 501); 1 Mar 2011 15:15:50 -0000
Message-ID: <20110301151550.25972.qmail@stuge.se>
Date: Tue, 1 Mar 2011 16:15:50 +0100
From: Peter Stuge <peter@stuge.se>
To: libssh2-devel@cool.haxx.se
Subject: Re: Login problem - Power Broker Menu
Mail-Followup-To: libssh2-devel@cool.haxx.se
References: <AANLkTi=-b1moZSRq7qdX8GbBiWSBeBZZeMnqkYTvgjcj@mail.gmail.com>
MIME-Version: 1.0
Content-Disposition: inline
In-Reply-To: <AANLkTi=-b1moZSRq7qdX8GbBiWSBeBZZeMnqkYTvgjcj@mail.gmail.com>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Tue, 01 Mar 2011 16:16:13 +0100 (CET)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Tue, 01 Mar 2011 16:15:51 +0100 (CET)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

Naveen Sharma wrote:
> This is the sequence of code I am trying:
> 
> libssh2_channel_open_session()
> libssh2_channel_request_pty()
> libssh2_channel_shell()
> libssh2_channel_read()               // This is reading this menu.
> 
> I am trying, libssh2_channel_write(), but this is not working.
> Please suggest a solution.

You have not provided very much information, so it is difficult to
suggest anything.

For a start, please send the exact bytes that you receive from the
server. You are clearly not having a problem with the SSH protocol
here, I think it is more likely that your program is not emulating
the terminal type you claimed to support in _request_pty() completely
or that the terminal type is not compatible with the server.

Of course full libssh2 debug output would also work. Recompile the
library specifying --enable-debug during configure and call
libssh2_trace(session, ~0); and your program should produce very
verbose output that will help us find your problem.


//Peter
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Tue Mar  1 16:41:22 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p21FfGag013120;
	Tue, 1 Mar 2011 16:41:21 +0100
Received: from earth.stuge.se (earth.stuge.se [212.116.89.126])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p21FfFEc013080
	for <libssh2-devel@cool.haxx.se>; Tue, 1 Mar 2011 16:41:15 +0100
Received: (qmail 17319 invoked from network); 1 Mar 2011 15:41:16 -0000
Received: from unknown (HELO earth.stuge.se) (127.0.0.1)
	by localhost with SMTP; 1 Mar 2011 15:41:16 -0000
MIME-Version: 1.0
From: "libssh2 Trac" <trac@libssh2.stuge.se>
X-Trac-Version: 0.12
Precedence: bulk
Cc: libssh2-devel@cool.haxx.se
Auto-Submitted: auto-generated
X-Mailer: Trac 0.12, by Edgewall Software
X-Trac-Project: libssh2
Date: Tue, 01 Mar 2011 15:41:16 -0000
X-URL: http://trac.libssh2.org/
Subject: [libssh2] #214: Automobile Insurance - How To Lower Automobile
	Insurance Premiums
X-Trac-Ticket-URL: http://trac.libssh2.org/ticket/214
Message-ID: <051.ef0b9e3b3f517c8b002bac136f29c0d7@libssh2.stuge.se>
X-Trac-Ticket-ID: 214
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Tue, 01 Mar 2011 16:41:22 +0100 (CET)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Tue, 01 Mar 2011 16:41:15 +0100 (CET)
X-MIME-Autoconverted: from base64 to 8bit by giant.haxx.se id p21FfFEc013080
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Reply-To: trac@libssh2.stuge.se,
        libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

#214: Automobile Insurance - How To Lower Automobile Insurance Premiums
------------------------------------+---------------------------------------
  Reporter:  autoinsurance06        |       Owner:       
      Type:  enhancement            |      Status:  new  
  Priority:  normal                 |   Milestone:  1.2.8
 Component:  Python bindings        |     Version:  1.2.6
  Keywords:  Automobile, Insurance  |      Blocks:       
Blocked By:                         |  
------------------------------------+---------------------------------------
 [[Image(http://insurancindusrtynews.files.wordpress.com/2010/11
 /automobile-insurance-coverage.jpg)]]

 Because of our economy nowadays we have to find the best way to save our
 money especially in getting the '''[http://www.automobile-insurance.com/
 Automobile Insurance]''' for our car. Many people want to get even the
 '''vehicle insurance''' to have the protection for themselves and to
 insured there car in times of the accident. We don't know hen is our time
 of accidents that is why if we are driving the car or the vehicle we need
 to get an '''automobile insurance''' to have the protection in our selves
 and to insured our car.

 [[Image(http://4.bp.blogspot.com/_vbnsL3-Jpi0/TPFMiyR99tI/AAAAAAAAACE/O9FF7optpAc/s1600/auto%2Binsurance1.jpg)]]

 There are many ways to lower your an
 '''[http://www.scipy.org/scipy/scikits/ticket/125 Automobile Insurance]'''
 premium all you have to do is to shop around in your local area or state
 and compare the '''automotive insurance''' premiums each of the company.
 You can shop online also where in most of the '''Insurance''' company
 nowadays have already their own site for the people who want to obtain
 there services or benefits.

-- 
Ticket URL: <http://trac.libssh2.org/ticket/214>
libssh2 <http://trac.libssh2.org/>
C library for writing portable SSH2 clients

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Tue Mar  1 19:05:49 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p21I5UOJ002205;
	Tue, 1 Mar 2011 19:05:47 +0100
Received: from earth.stuge.se (earth.stuge.se [212.116.89.126])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p21I5UF6002202
	for <libssh2-devel@cool.haxx.se>; Tue, 1 Mar 2011 19:05:30 +0100
Received: (qmail 12380 invoked from network); 1 Mar 2011 18:05:30 -0000
Received: from unknown (HELO earth.stuge.se) (127.0.0.1)
	by localhost with SMTP; 1 Mar 2011 18:05:30 -0000
MIME-Version: 1.0
From: "libssh2 Trac" <trac@libssh2.stuge.se>
X-Trac-Version: 0.12
Precedence: bulk
Cc: libssh2-devel@cool.haxx.se
Auto-Submitted: auto-generated
X-Mailer: Trac 0.12, by Edgewall Software
X-Trac-Project: libssh2
Date: Tue, 01 Mar 2011 18:05:30 -0000
X-URL: http://trac.libssh2.org/
Subject: Re: [libssh2] #211: size mismatch between struct transportpacket
	fields causes libssh2 to get stuck
X-Trac-Ticket-URL: http://trac.libssh2.org/ticket/211#comment:7
Message-ID: <123.a139be25cc2cf5b926cc18b050516b4e@libssh2.stuge.se>
References: <108.62cba77b47352402c1cd0687daecf8b2@libssh2.stuge.se>
X-Trac-Ticket-ID: 211
In-Reply-To: <108.62cba77b47352402c1cd0687daecf8b2@libssh2.stuge.se>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Tue, 01 Mar 2011 19:05:49 +0100 (CET)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Tue, 01 Mar 2011 19:05:30 +0100 (CET)
X-MIME-Autoconverted: from base64 to 8bit by giant.haxx.se id p21I5UF6002202
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Reply-To: trac@libssh2.stuge.se,
        libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="utf-8"
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by giant.haxx.se id p21I5UOJ002205

#211: size mismatch between struct transportpacket fields causes libssh2 to get
stuck
---------------------------------------------------------------------------------------+
  Reporter:  www.google.com/accounts/o8/id?id=aitoawlhggg_yplkl7grwwpbbum-omtqud4rmna  |        Owner:  Peter Stuge <peter@â€¦>       
      Type:  defect                                                                    |       Status:  closed                      
  Priority:  normal                                                                    |    Milestone:  1.2.8                       
 Component:  protocol                                                                  |      Version:  1.2.7                       
Resolution:  fixed                                                                     |     Keywords:                              
    Blocks:                                                                            |   Blocked By:                              
---------------------------------------------------------------------------------------+

Comment (by www.google.com/accounts/o8/id?id=aitoawlhggg_yplkl7grwwpbbum-omtqud4rmna):

 Replying to [comment:6 www.google.com/accounts/o8/id?id
 =aitoawlhggg_yplkl7grwwpbbum-omtqud4rmna]:
 > Replying to [comment:5 stuge]:
 > > Replying to [comment:4 www.google.com/accounts/o8/id?id
 =aitoawlhggg_yplkl7grwwpbbum-omtqud4rmna]:
 > > > won't this get us into trouble if there was a error after
 p->total_num was set
 > > > (for example while decrypting a chunk)
 > >
 > > Did you already look at which code paths have this problem? Do you
 know if there are many >of them?
 > I can't speak about there being many. The one that I had in mind was in
 _libssh2_channel_read function (src/channel.c on line 1692) we have
 >     while (rc > 0)
 >         rc = _libssh2_transport_read(session);
 >
 >     if ((rc < 0) && (rc != LIBSSH2_ERROR_EAGAIN))
 >         return _libssh2_error(session, rc, "transport read");
 > Now if we get a decryption error in the 2nd call to
 _libssh2_transort_read, we could have session->packet.total_num set to a
 non zero value.
 > In response to this error client code might try to free the channel
 (which is what my code does). libssh2_channel_free again calls
 libssh2_transport_read and we get stuck in the do {} while loop.
 >
 > Jasmeet
 Any thoughts ?

-- 
Ticket URL: <http://trac.libssh2.org/ticket/211#comment:7>
libssh2 <http://trac.libssh2.org/>
C library for writing portable SSH2 clients

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Tue Mar  1 19:18:05 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p21IHuKY006590;
	Tue, 1 Mar 2011 19:18:02 +0100
Received: from earth.stuge.se (earth.stuge.se [212.116.89.126])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p21IHs9K006571
	for <libssh2-devel@cool.haxx.se>; Tue, 1 Mar 2011 19:17:54 +0100
Received: (qmail 18324 invoked from network); 1 Mar 2011 18:17:56 -0000
Received: from unknown (HELO earth.stuge.se) (127.0.0.1)
	by localhost with SMTP; 1 Mar 2011 18:17:56 -0000
MIME-Version: 1.0
From: "libssh2 Trac" <trac@libssh2.stuge.se>
X-Trac-Version: 0.12
Precedence: bulk
Cc: libssh2-devel@cool.haxx.se
Auto-Submitted: auto-generated
X-Mailer: Trac 0.12, by Edgewall Software
X-Trac-Project: libssh2
Date: Tue, 01 Mar 2011 18:17:56 -0000
X-URL: http://trac.libssh2.org/
Subject: Re: [libssh2] #211: size mismatch between struct transportpacket
	fields causes libssh2 to get stuck
X-Trac-Ticket-URL: http://trac.libssh2.org/ticket/211#comment:8
Message-ID: <123.ae6982dc4b20a730d1cc7dbd5ea6a6cd@libssh2.stuge.se>
References: <108.62cba77b47352402c1cd0687daecf8b2@libssh2.stuge.se>
X-Trac-Ticket-ID: 211
In-Reply-To: <108.62cba77b47352402c1cd0687daecf8b2@libssh2.stuge.se>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Tue, 01 Mar 2011 19:18:05 +0100 (CET)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Tue, 01 Mar 2011 19:17:54 +0100 (CET)
X-MIME-Autoconverted: from base64 to 8bit by giant.haxx.se id p21IHs9K006571
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Reply-To: trac@libssh2.stuge.se,
        libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="utf-8"
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by giant.haxx.se id p21IHuKY006590

#211: size mismatch between struct transportpacket fields causes libssh2 to get
stuck
---------------------------------------------------------------------------------------+
  Reporter:  www.google.com/accounts/o8/id?id=aitoawlhggg_yplkl7grwwpbbum-omtqud4rmna  |        Owner:  Peter Stuge <peter@â€¦>       
      Type:  defect                                                                    |       Status:  closed                      
  Priority:  normal                                                                    |    Milestone:  1.2.8                       
 Component:  protocol                                                                  |      Version:  1.2.7                       
Resolution:  fixed                                                                     |     Keywords:                              
    Blocks:                                                                            |   Blocked By:                              
---------------------------------------------------------------------------------------+

Comment (by stuge):

 Replying to [comment:7 www.google.com/accounts/o8/id?id
 =aitoawlhggg_yplkl7grwwpbbum-omtqud4rmna]:
 > > > Did you already look at which code paths have this problem? Do you
 know if there are many of them?
 > > I can't speak about there being many. The one that I had in mind was
 in _libssh2_channel_read
 > Any thoughts ?

 What is there to think about? Someone needs to check which code paths have
 this problem. I tried to hint to that in my last comment. It would be
 great if you looked into it.

 Obviously fixing this one occurence of the problem, without looking at if
 it may be something present in other corners of the libssh2 code, makes no
 sense.

-- 
Ticket URL: <http://trac.libssh2.org/ticket/211#comment:8>
libssh2 <http://trac.libssh2.org/>
C library for writing portable SSH2 clients

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Tue Mar  1 20:52:49 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p21JqY9P022820;
	Tue, 1 Mar 2011 20:52:47 +0100
Received: from earth.stuge.se (earth.stuge.se [212.116.89.126])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p21JqWGn022809
	for <libssh2-devel@cool.haxx.se>; Tue, 1 Mar 2011 20:52:32 +0100
Received: (qmail 23863 invoked from network); 1 Mar 2011 19:52:33 -0000
Received: from unknown (HELO earth.stuge.se) (127.0.0.1)
	by localhost with SMTP; 1 Mar 2011 19:52:33 -0000
MIME-Version: 1.0
From: "libssh2 Trac" <trac@libssh2.stuge.se>
X-Trac-Version: 0.12
Precedence: bulk
Cc: libssh2-devel@cool.haxx.se
Auto-Submitted: auto-generated
X-Mailer: Trac 0.12, by Edgewall Software
X-Trac-Project: libssh2
Date: Tue, 01 Mar 2011 19:52:33 -0000
X-URL: http://trac.libssh2.org/
Subject: Re: [libssh2] #211: size mismatch between struct transportpacket
	fields causes libssh2 to get stuck
X-Trac-Ticket-URL: http://trac.libssh2.org/ticket/211#comment:9
Message-ID: <123.2e3c44312f82d2b7bd7e41b77c832211@libssh2.stuge.se>
References: <108.62cba77b47352402c1cd0687daecf8b2@libssh2.stuge.se>
X-Trac-Ticket-ID: 211
In-Reply-To: <108.62cba77b47352402c1cd0687daecf8b2@libssh2.stuge.se>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Tue, 01 Mar 2011 20:52:49 +0100 (CET)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Tue, 01 Mar 2011 20:52:32 +0100 (CET)
X-MIME-Autoconverted: from base64 to 8bit by giant.haxx.se id p21JqWGn022809
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Reply-To: trac@libssh2.stuge.se,
        libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="utf-8"
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by giant.haxx.se id p21JqY9P022820

#211: size mismatch between struct transportpacket fields causes libssh2 to get
stuck
---------------------------------------------------------------------------------------+
  Reporter:  www.google.com/accounts/o8/id?id=aitoawlhggg_yplkl7grwwpbbum-omtqud4rmna  |        Owner:  Peter Stuge <peter@â€¦>       
      Type:  defect                                                                    |       Status:  closed                      
  Priority:  normal                                                                    |    Milestone:  1.2.8                       
 Component:  protocol                                                                  |      Version:  1.2.7                       
Resolution:  fixed                                                                     |     Keywords:                              
    Blocks:                                                                            |   Blocked By:                              
---------------------------------------------------------------------------------------+

Comment (by www.google.com/accounts/o8/id?id=aitoawlhggg_yplkl7grwwpbbum-omtqud4rmna):

 Replying to [comment:8 stuge]:
 > Replying to [comment:7 www.google.com/accounts/o8/id?id
 =aitoawlhggg_yplkl7grwwpbbum-omtqud4rmna]:
 > > > > Did you already look at which code paths have this problem? Do you
 know if there are many of them?
 > > > I can't speak about there being many. The one that I had in mind was
 in _libssh2_channel_read
 > > Any thoughts ?
 >
 > What is there to think about? Someone needs to check which code paths
 have this problem. I tried to >hint to that in my last comment. It would
 be great if you looked into it.

 I can, but before that I need to understand
 a) The general problem is that anytime we call libssh2_transport_read
 after an error, where the previous (error experiencing) call already set
 session.p->total_num, we end up using a bogus total_num value. Do you wish
 to know from what all code paths we could get into this situation ?
 b) What was wrong with the solution that I suggested originally i.e.
 setting session->p.total_num to 0 in case of any error except
 LIBSSH2_ERROR_EAGAIN. This was tackling the general error not a specific
 corner case. Also note that we reset p->total_num after a complete message
 has been recieved, why not do the same for errors ?. Its not as if the
 client could (or needs to) look at total_num.
 c) Is one scenario (suggested in comment #7) where we can get into this
 problem not enough to merit a solution ?. If so then a) becomes a academic
 exercise.

 >
 > Obviously fixing this one occurence of the problem, without looking at
 if it may be something present >in other corners of the libssh2 code,
 makes no sense.
 I agree and hence the original solution tackling the general case.

-- 
Ticket URL: <http://trac.libssh2.org/ticket/211#comment:9>
libssh2 <http://trac.libssh2.org/>
C library for writing portable SSH2 clients

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Tue Mar  1 21:08:55 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p21K8m8F001417;
	Tue, 1 Mar 2011 21:08:54 +0100
Received: from earth.stuge.se (earth.stuge.se [212.116.89.126])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p21K8lIt001413
	for <libssh2-devel@cool.haxx.se>; Tue, 1 Mar 2011 21:08:47 +0100
Received: (qmail 29339 invoked from network); 1 Mar 2011 20:08:49 -0000
Received: from unknown (HELO earth.stuge.se) (127.0.0.1)
	by localhost with SMTP; 1 Mar 2011 20:08:49 -0000
MIME-Version: 1.0
From: "libssh2 Trac" <trac@libssh2.stuge.se>
X-Trac-Version: 0.12
Precedence: bulk
Cc: libssh2-devel@cool.haxx.se
Auto-Submitted: auto-generated
X-Mailer: Trac 0.12, by Edgewall Software
X-Trac-Project: libssh2
Date: Tue, 01 Mar 2011 20:08:49 -0000
X-URL: http://trac.libssh2.org/
Subject: [libssh2] #214: Gift Baskets
X-Trac-Ticket-URL: http://trac.libssh2.org/ticket/214
Message-ID: <049.d2c75f4c4843d309cea47ca4cb97ce24@libssh2.stuge.se>
X-Trac-Ticket-ID: 214
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Tue, 01 Mar 2011 21:08:55 +0100 (CET)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Tue, 01 Mar 2011 21:08:47 +0100 (CET)
X-MIME-Autoconverted: from base64 to 8bit by giant.haxx.se id p21K8lIt001413
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Reply-To: trac@libssh2.stuge.se,
        libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

#214: Gift Baskets
----------------------------+-----------------------------------------------
  Reporter:  giftbaskets11  |       Owner:       
      Type:  defect         |      Status:  new  
  Priority:  normal         |   Milestone:  1.2.8
 Component:  tests          |     Version:  1.2.6
  Keywords:  gift baskets   |      Blocks:       
Blocked By:                 |  
----------------------------+-----------------------------------------------
 == Gift Baskets - How To Make A Get Well Soon Gift Basket ==

 [[Image(https://www.giftbasketvillage.com/store/images/products/588_small.jpg)]]

 When you will be able to have the best as you wanted for your
 '''[http://www.giftbasketsplus.com/ gift baskets]''' then such having a
 friend who is sick then you should make your friend happy by giving her
 '''gift basket'''. Surely that you will make your friend happy because of
 the '''BASKET''' that you will be giving to her.

 [[Image(http://www.gwendolynstrong.com/wp-content/gallery/lucy-
 lunt/thanks_a_million_gift_basket_7903.jpg)]]

 The first thing that you should do is that you need to prepare for the
 items that you will  be able to put inside your
 '''[http://flloss.livinglogic.de/ticket/21 gift baskets]'''. There are so
 many things that you can put in your gift basket then i can say that you
 are making your decision really in the proper situation. your '''Gift
 Baskets''' will give you the best as you wanted for your '''shopping
 baskets'''. There are so many things that you will be able to have the
 kind of assurance that really indeed that it could be the best for you.

-- 
Ticket URL: <http://trac.libssh2.org/ticket/214>
libssh2 <http://trac.libssh2.org/>
C library for writing portable SSH2 clients

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Tue Mar  1 21:30:39 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p21KUX88010495;
	Tue, 1 Mar 2011 21:30:39 +0100
Received: from earth.stuge.se (earth.stuge.se [212.116.89.126])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p21KUUoU010488
	for <libssh2-devel@cool.haxx.se>; Tue, 1 Mar 2011 21:30:31 +0100
Received: (qmail 6083 invoked from network); 1 Mar 2011 20:30:33 -0000
Received: from unknown (HELO earth.stuge.se) (127.0.0.1)
	by localhost with SMTP; 1 Mar 2011 20:30:33 -0000
MIME-Version: 1.0
From: "libssh2 Trac" <trac@libssh2.stuge.se>
X-Trac-Version: 0.12
Precedence: bulk
Cc: libssh2-devel@cool.haxx.se
Auto-Submitted: auto-generated
X-Mailer: Trac 0.12, by Edgewall Software
X-Trac-Project: libssh2
Date: Tue, 01 Mar 2011 20:30:33 -0000
X-URL: http://trac.libssh2.org/
Subject: [libssh2] #215: Life Insurance - How To Get Credit Life Insurance
	On A Mortgage
X-Trac-Ticket-URL: http://trac.libssh2.org/ticket/215
Message-ID: <050.b634658cc3756cfca53f2f683a628b54@libssh2.stuge.se>
X-Trac-Ticket-ID: 215
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Tue, 01 Mar 2011 21:30:39 +0100 (CET)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Tue, 01 Mar 2011 21:30:31 +0100 (CET)
X-MIME-Autoconverted: from base64 to 8bit by giant.haxx.se id p21KUUoU010488
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Reply-To: trac@libssh2.stuge.se,
        libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

#215: Life Insurance - How To Get Credit Life Insurance On A Mortgage
------------------------------+---------------------------------------------
  Reporter:  lifeinsurance0   |       Owner:  jenny cool
      Type:  enhancement      |      Status:  new       
  Priority:  high             |   Milestone:  1.2.8     
 Component:  Python bindings  |     Version:  1.2.6     
  Keywords:  life insurance   |      Blocks:            
Blocked By:                   |  
------------------------------+---------------------------------------------
 [[Image(http://www.thebesteverythings.com/wp-content/uploads/2011/01/01
 /know-how-to-choose-which-life-insurance-type-is-right-for-
 you/life_insurance_landing.jpg)]]

 Mortagage is very common for those people who has there own lot or
 land.You have to know where to find '''[http://www.lifeinsurance.net.au/
 life insurance]''' so that you would be able to understand well everything
 about this '''Insurance'''.All you have to do is to make sure that you
 would be able to pay the '''Living Insurance''' that you have.Or make sure
 that you have everything for the  payments so that you will not create
 lots of bills.

 [[Image(http://www.life-insurance-companies.org/hero_images/0000/0050
 /life-insurance-companies-optimized.jpg?1202432622)]]

 On your mortgage, you can also get a '''[http://www.lifeinsurance.net.au/
 life insurance]'''.To do that, you have to ask the '''LifeInsurance'''
 company to help you out with your needs.Above all, you have to make sure
 that you know a lot when it comes to your mortgage so that you would be
 able to understand how to get  credit '''lifeinsurance''' from it.For more
 facts, you  can check in the Internet so that you would be able to know
 how to get it from the mortgage that you have.

-- 
Ticket URL: <http://trac.libssh2.org/ticket/215>
libssh2 <http://trac.libssh2.org/>
C library for writing portable SSH2 clients

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Tue Mar  1 21:31:49 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p21KVlwk011400;
	Tue, 1 Mar 2011 21:31:48 +0100
Received: from earth.stuge.se (earth.stuge.se [212.116.89.126])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p21KVjPA011390
	for <libssh2-devel@cool.haxx.se>; Tue, 1 Mar 2011 21:31:45 +0100
Received: (qmail 6593 invoked from network); 1 Mar 2011 20:31:48 -0000
Received: from unknown (HELO earth.stuge.se) (127.0.0.1)
	by localhost with SMTP; 1 Mar 2011 20:31:48 -0000
MIME-Version: 1.0
From: "libssh2 Trac" <trac@libssh2.stuge.se>
X-Trac-Version: 0.12
Precedence: bulk
Cc: libssh2-devel@cool.haxx.se
Auto-Submitted: auto-generated
X-Mailer: Trac 0.12, by Edgewall Software
X-Trac-Project: libssh2
Date: Tue, 01 Mar 2011 20:31:48 -0000
X-URL: http://trac.libssh2.org/
Subject: [libssh2] #216: Life Insurance - How To Get Credit Life Insurance
	On A Mortgage
X-Trac-Ticket-URL: http://trac.libssh2.org/ticket/216
Message-ID: <050.762a31db6dd812e854e220424380c4da@libssh2.stuge.se>
X-Trac-Ticket-ID: 216
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Tue, 01 Mar 2011 21:31:48 +0100 (CET)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Tue, 01 Mar 2011 21:31:45 +0100 (CET)
X-MIME-Autoconverted: from base64 to 8bit by giant.haxx.se id p21KVjPA011390
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Reply-To: trac@libssh2.stuge.se,
        libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

#216: Life Insurance - How To Get Credit Life Insurance On A Mortgage
------------------------------+---------------------------------------------
  Reporter:  lifeinsurance0   |       Owner:  jenny cool
      Type:  enhancement      |      Status:  new       
  Priority:  high             |   Milestone:  1.2.8     
 Component:  Python bindings  |     Version:  1.2.6     
  Keywords:  life insurance   |      Blocks:            
Blocked By:                   |  
------------------------------+---------------------------------------------
 [[Image(http://www.thebesteverythings.com/wp-content/uploads/2011/01/01
 /know-how-to-choose-which-life-insurance-type-is-right-for-
 you/life_insurance_landing.jpg)]]

 Mortagage is very common for those people who has there own lot or
 land.You have to know where to find '''[http://www.lifeinsurance.net.au/
 life insurance]''' so that you would be able to understand well everything
 about this '''Insurance'''.All you have to do is to make sure that you
 would be able to pay the '''Living Insurance''' that you have.Or make sure
 that you have everything for the  payments so that you will not create
 lots of bills.

 [[Image(http://www.life-insurance-companies.org/hero_images/0000/0050
 /life-insurance-companies-optimized.jpg?1202432622)]]

 On your mortgage, you can also get a
 '''[http://trac.transifex.org/ticket/711 life insurance]'''.To do that,
 you have to ask the '''LifeInsurance''' company to help you out with your
 needs.Above all, you have to make sure that you know a lot when it comes
 to your mortgage so that you would be able to understand how to get
 credit '''lifeinsurance''' from it.For more facts, you  can check in the
 Internet so that you would be able to know how to get it from the mortgage
 that you have.

-- 
Ticket URL: <http://trac.libssh2.org/ticket/216>
libssh2 <http://trac.libssh2.org/>
C library for writing portable SSH2 clients

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Tue Mar  1 21:43:51 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p21KhkbN019787;
	Tue, 1 Mar 2011 21:43:50 +0100
Received: from imail.ipswitch.com (imail.ipswitch.com [156.21.1.5])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p21KhhpT019596
	for <libssh2-devel@cool.haxx.se>; Tue, 1 Mar 2011 21:43:44 +0100
DKIM-Signature: q=dns/txt; v=1; c=relaxed/relaxed; s=ipswitch;
	d=ipswitch.com; a=rsa-sha1;
	h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:
	Content-Transfer-Encoding;
	b=ettoqF3fh7P9V9uyf3HuS6ym8s/7/5knRZrpaYAhbzfivGm2c4R7jan7ECyI73tb7t
	2cxlwAAlzI0jMlpUZcVZ7AXWG1anogqQsc6h4TKzdb4KUZzYwiVoG9QfjWpyLU4pN1OZ
	5DWwsjQNvXaHzRXsrkWYFQTyYEuoMsJvOCTWo=;
	bh=zZFHG4+4YEZVu9nEmTMIXXvgsqc=; t=1299012221;
Received: from mrrnt [66.170.5.130] by ipswitch.com with ESMTP
	(SMTPD-11.03) id b30600359e4891fa; Tue, 1 Mar 2011 15:43:40 -0500
From: "Mark Riordan" <mriordan@ipswitch.com>
To: <libssh2-devel@cool.haxx.se>
Subject: Spammers have discovered trac.libssh2.org
Date: Tue, 1 Mar 2011 14:43:41 -0600
Message-ID: <009401cbd851$59fa0820$0dee1860$@com>
MIME-Version: 1.0
X-Mailer: Microsoft Office Outlook 12.0
Thread-Index: AcvYUVgpS0EqxOAsTI6yAmTMg7G1Lg==
Content-Language: en-us
x-cr-hashedpuzzle: AK3X COtY Cfzd Cuec DGsH DXsx DtlC Eri9 FVOY GPbj Ia2A JA1z
	JQso JxF9 KKdr KUB+; 1;
	bABpAGIAcwBzAGgAMgAtAGQAZQB2AGUAbABAAGMAbwBvAGwALgBoAGEAeAB4AC4AcwBlAA==;
	Sosha1_v1; 7; {FDA221FF-E4E6-4290-905A-0584CCB1872F};
	bQByAGkAbwByAGQAYQBuAEAAaQBwAHMAdwBpAHQAYwBoAC4AYwBvAG0A;
	Tue, 01 Mar 2011 20:43:39 GMT;
	UwBwAGEAbQBtAGUAcgBzACAAaABhAHYAZQAgAGQAaQBzAGMAbwB2AGUAcgBlAGQAIAB0AHIAYQBjAC4AbABpAGIAcwBzAGgAMgAuAG8AcgBnAA==
x-cr-puzzleid: {FDA221FF-E4E6-4290-905A-0584CCB1872F}
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Tue, 01 Mar 2011 21:43:51 +0100 (CET)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Tue, 01 Mar 2011 21:43:44 +0100 (CET)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

Alas, it seems that bad guys have discovered a way to spam us.
Is there a way to require administrator approval of new accounts
on trac.libssh2.org?

Thanks.

Mark R


_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Tue Mar  1 22:01:07 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p21L0rS2029602;
	Tue, 1 Mar 2011 22:01:04 +0100
Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com
	[209.85.216.54])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p21L0ph1029516
	(version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Tue, 1 Mar 2011 22:00:52 +0100
Received: by qwj8 with SMTP id 8so4673368qwj.41
	for <libssh2-devel@cool.haxx.se>; Tue, 01 Mar 2011 13:00:47 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=googlemail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:content-type;
	bh=ja2x2lrdt2jJwoa3dk5cP8IsslKXymlORm2Ov6Z6O0g=;
	b=SPCLAROKE6gUeW5d0QJiNI3QxqG3YVPgltkQw1JRZu8gI4f7nRpL6HMZeB4w03ef8O
	MEUzbNPeFNSqqLMJfzthGeR6NR72TlTA9BsGvp5yHPgfkuDtRvu/gRqcY/m7Ga+PILyu
	ZU2RXzhkpC3DHIq3aQCeGBjOIFMswDX4/lVD4=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:content-type;
	b=frYutoYior3KvR9/h8u0CpzgEyYWu4uYlGXuUsmFwJSemOlk3hCz+F6EC4l4rRAZgK
	3Tgyz5AmEPlznp5ckLKMKvXqywPDV7Sp9BRNekAr/7R/WGoKn7DnRSHTqyylEmbDOzLe
	9KjO95f3wtUAduNBu0K8uSz7dsR0wShyFy8ZU=
MIME-Version: 1.0
Received: by 10.229.38.145 with SMTP id b17mr5874391qce.131.1299013247745;
	Tue, 01 Mar 2011 13:00:47 -0800 (PST)
Received: by 10.229.29.197 with HTTP; Tue, 1 Mar 2011 13:00:47 -0800 (PST)
In-Reply-To: <009401cbd851$59fa0820$0dee1860$@com>
References: <009401cbd851$59fa0820$0dee1860$@com>
Date: Tue, 1 Mar 2011 21:00:47 +0000
X-Google-Sender-Auth: G8yIN1Y1Xx44hchqxRIEJGGNwTY
Message-ID: <AANLkTimH=4nYUdrU--TZVFv4L7_cnpjOGZVq-dnkA9dx@mail.gmail.com>
Subject: Re: Spammers have discovered trac.libssh2.org
From: Alexander Lamaison <swish@lammy.co.uk>
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Tue, 01 Mar 2011 22:01:07 +0100 (CET)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Tue, 01 Mar 2011 22:00:52 +0100 (CET)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

On 1 March 2011 20:43, Mark Riordan <mriordan@ipswitch.com> wrote:
> Alas, it seems that bad guys have discovered a way to spam us.
> Is there a way to require administrator approval of new accounts
> on trac.libssh2.org?

I'm not sure about that.  I've been using the CaptchAuthPlus plugin to
require everyone to solve a captcha before they can sign up.

Alex
--
Easy SFTP for Windows Explorer (http://www.swish-sftp.org)
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Tue Mar  1 22:07:32 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p21L7T76004127;
	Tue, 1 Mar 2011 22:07:32 +0100
Received: from imail.ipswitch.com (imail.ipswitch.com [156.21.1.5])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p21L7RAn004049
	for <libssh2-devel@cool.haxx.se>; Tue, 1 Mar 2011 22:07:27 +0100
DKIM-Signature: q=dns/txt; v=1; c=relaxed/relaxed; s=ipswitch;
	d=ipswitch.com; a=rsa-sha1;
	h=From:To:References:In-Reply-To:Subject:Date:Message-ID:
	MIME-Version:Content-Type:Content-Transfer-Encoding;
	b=rz4IljzIPz1xFEnhG/UnlVN/PtUUmkWDNhFdE+m1vJ+HcQkE3vbUMWuDkCUpzjcPcs
	9p7m75sBDtS3u3Z6XqD9qfSCs5Y6ZSLuRqVGMMDqZHIh8TNwB/X1Nddh2gbTvqLVTPtO
	XYd2YCPRa4kyJcy8AnW1sQXxAYz6DB6oQf5Ns=;
	bh=J+eNxU03IYY8z21zFVSPwbVZm04=; t=1299013645;
Received: from mrrnt [66.170.5.130] by ipswitch.com with ESMTP
	(SMTPD-11.03) id 192e0035a39892d0; Tue, 1 Mar 2011 16:07:24 -0500
From: "Mark Riordan" <mriordan@ipswitch.com>
To: "'libssh2 development'" <libssh2-devel@cool.haxx.se>
References: <009401cbd851$59fa0820$0dee1860$@com>
	<AANLkTimH=4nYUdrU--TZVFv4L7_cnpjOGZVq-dnkA9dx@mail.gmail.com>
In-Reply-To: <AANLkTimH=4nYUdrU--TZVFv4L7_cnpjOGZVq-dnkA9dx@mail.gmail.com>
Subject: RE: Spammers have discovered trac.libssh2.org
Date: Tue, 1 Mar 2011 15:07:25 -0600
Message-ID: <00ac01cbd854$aaba7530$002f5f90$@com>
MIME-Version: 1.0
X-Mailer: Microsoft Office Outlook 12.0
Thread-Index: AcvYU/viAZwj2YCITYW9bMMqC1XiJwAAHzyg
Content-Language: en-us
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Tue, 01 Mar 2011 22:07:32 +0100 (CET)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Tue, 01 Mar 2011 22:07:28 +0100 (CET)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

Alexander Lamaison said:
>On 1 March 2011 20:43, Mark Riordan <mriordan@ipswitch.com> wrote:
>> Alas, it seems that bad guys have discovered a way to spam us.
>> Is there a way to require administrator approval of new accounts
>> on trac.libssh2.org?
>
> I'm not sure about that.  I've been using the CaptchAuthPlus plugin to
> require everyone to solve a captcha before they can sign up.

Hmmm, you would think that would stop them.  They must be determined.

OK, thanks.

Mark



_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Tue Mar  1 22:32:07 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p21LVw4R016344;
	Tue, 1 Mar 2011 22:32:05 +0100
Received: from mail-qy0-f182.google.com (mail-qy0-f182.google.com
	[209.85.216.182])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p21LVuWe016315
	(version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Tue, 1 Mar 2011 22:31:57 +0100
Received: by qyk27 with SMTP id 27so4610608qyk.20
	for <libssh2-devel@cool.haxx.se>; Tue, 01 Mar 2011 13:31:54 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=googlemail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:content-type
	:content-transfer-encoding;
	bh=y7MN5rrmy+XcHXxeQRmdeYRBD7K9Fnzw9GALYyJvhfI=;
	b=OawVU8sOYKOq0eA+3qnrLybGqpN0IRAYWBKbYynFOCMOyenGta6Inxt2270qSy3/Ni
	QsByqfleAwDSl/4BFnK/0B+oQnwL5H9gDzBPQMdaMRykHoZ1i0VR4oCd4XahQ3px1Kv8
	2YGUdB+MOC8XQ6b5t5ShPX2w9rTuUnjrcUmUI=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:content-type
	:content-transfer-encoding;
	b=CZ4bAITJ/ji5dbJlQL7oICe1ByYE3SW89L8f4kmbdiVkunPOGsZeC54nfH9Yu7wbCV
	w3Kuv9duU9WtRH8t51QfJWhkbeWFQyP1ha28i4edJeC/dVqvOsD7yHUrTM7B/okq4L9V
	Z0vHi6HrCoPcBtRkUU4q3xI0MHLnlgkztLuXE=
MIME-Version: 1.0
Received: by 10.229.38.145 with SMTP id b17mr5898624qce.131.1299015114435;
	Tue, 01 Mar 2011 13:31:54 -0800 (PST)
Received: by 10.229.29.197 with HTTP; Tue, 1 Mar 2011 13:31:54 -0800 (PST)
In-Reply-To: <00ac01cbd854$aaba7530$002f5f90$@com>
References: <009401cbd851$59fa0820$0dee1860$@com>
	<AANLkTimH=4nYUdrU--TZVFv4L7_cnpjOGZVq-dnkA9dx@mail.gmail.com>
	<00ac01cbd854$aaba7530$002f5f90$@com>
Date: Tue, 1 Mar 2011 21:31:54 +0000
X-Google-Sender-Auth: XysPEnmCHxpEstvk2i92iecK1GE
Message-ID: <AANLkTikkxYOxFeP2pXd3L2_H235SBZ8JePvqYJ2fTryS@mail.gmail.com>
Subject: Re: Spammers have discovered trac.libssh2.org
From: Alexander Lamaison <swish@lammy.co.uk>
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Tue, 01 Mar 2011 22:32:07 +0100 (CET)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Tue, 01 Mar 2011 22:31:57 +0100 (CET)
X-MIME-Autoconverted: from quoted-printable to 8bit by giant.haxx.se id
	p21LVuWe016315
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="iso-8859-1"
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by giant.haxx.se id p21LVw4R016344

On 1 March 2011 21:07, Mark Riordan <mriordan@ipswitch.com> wrote:
> Alexander Lamaison said:
>>On 1 March 2011 20:43, Mark Riordan <mriordan@ipswitch.com> wrote:
>>> Alas, it seems that bad guys have discovered a way to spam us.
>>> Is there a way to require administrator approval of new accounts
>>> on trac.libssh2.org?
>>
>> I'm not sure about that.  I've been using the CaptchAuthPlus plugin to
>> require everyone to solve a captcha before they can sign up.
>
> Hmmm, you would think that would stop them.  They must be determined.

It has done ... on my site.  I'm suggesting that the libssh2 site should try it.

Though I have a feeling this isn't due to spam user registrations as
you don't need to register to post a bug report.

Alex

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Tue Mar  1 22:41:25 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p21LfLN5020630;
	Tue, 1 Mar 2011 22:41:25 +0100
Received: from foo.stuge.se (qmailr@foo.stuge.se [213.88.146.6])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with SMTP id p21LfJia020620
	for <libssh2-devel@cool.haxx.se>; Tue, 1 Mar 2011 22:41:19 +0100
Received: (qmail 19272 invoked by uid 501); 1 Mar 2011 21:41:22 -0000
Message-ID: <20110301214122.19271.qmail@stuge.se>
Date: Tue, 1 Mar 2011 22:41:22 +0100
From: Peter Stuge <peter@stuge.se>
To: libssh2-devel@cool.haxx.se
Subject: Re: Spammers have discovered trac.libssh2.org
Mail-Followup-To: libssh2-devel@cool.haxx.se
References: <009401cbd851$59fa0820$0dee1860$@com>
MIME-Version: 1.0
Content-Disposition: inline
In-Reply-To: <009401cbd851$59fa0820$0dee1860$@com>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Tue, 01 Mar 2011 22:41:25 +0100 (CET)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Tue, 01 Mar 2011 22:41:19 +0100 (CET)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

Hey everyone,

Mark Riordan wrote:
> Alas, it seems that bad guys have discovered a way to spam us.

Yeah. I've deleted the tickets, but they can of course create new.


> Is there a way to require administrator approval of new accounts
> on trac.libssh2.org?

The spam thing is pretty much impossible to solve perfectly in an
automated way.

I've seen spamming both on the libusb and the libssh2 Tracs that
I'm hosting.

One way to fight the spam is to make it increasingly difficult to
input information into Trac, but on the other hand that is absolutely
counter it's purpose in the first place. We want it to be *easy* to
create tickets and update wiki pages. I consider the ideal to be that
no signup at all is required.

Captcha adds another hurdle, but is easily circumvented. Spammers
set up porn sites where they make real humans solve real captchas
to access content. Except the captcha actually comes from a different
site (us) which spammers want to spam. Another method is to pay cheap
labour to do nothing but solve captchas all day long.

My point is that raising the bar a little, using any technical
solution, will only hold off spammers for so long, and annoys
legitimate users. I would like very much to find a sustainable
solution and preferably one which doesn't inconvenience legitimate
users.

I believe moderation is the only thing that will work. I've been
ogling the TicketModerator plugin over here:

https://software.sandia.gov/trac/fast/wiki/TicketModerator

Just that I'm not sure it works exactly the way I would like to.. I
do want to try it out though. Actual people will need to moderate
Trac submissions, and I'd like to propose that we all help with that,
so that no single person is overwhelmed with the work and maybe as a
bonus we'll also cover different time zones. Not in any way expected
to have instant feedback of course.


//Peter
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Tue Mar  1 22:54:58 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p21LsrVe025422;
	Tue, 1 Mar 2011 22:54:57 +0100
Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com
	[209.85.216.54])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p21Lso7O025411
	(version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Tue, 1 Mar 2011 22:54:51 +0100
Received: by qwj8 with SMTP id 8so4716032qwj.41
	for <libssh2-devel@cool.haxx.se>; Tue, 01 Mar 2011 13:54:48 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=googlemail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:content-type;
	bh=3WQTPDpzCADsE0HKfzLmxsgm2wUCg+6/Hu4RWV+tl4k=;
	b=oeQbovvUNqPGomwwg26Fp2hh8DtyPbeEmKdiClCOLnGqT1V2eNlIjR8Cd7OhEgvHAG
	P/8EN53GwQRAIIiuevT1X4FUHOjlraxHCC9yBqzQPSI06BwEJ1NZPNr4YSkEuMbsnvrj
	ufj1CW+CqJpgaUADhfZjDx0Ux0yYlqcnhkn5o=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:content-type;
	b=UI0rGme5D8GkHKhdjvVllxB8ZhSYM4nLkZMdr9ocY5ZVKPWTH4diT39QRrij0cg7LV
	JTkYlXuosTXKQB2kw+FfW6V0BGTGEk8a+jW9TqllMcc4hFyoPM7APBLL6G01bt3Qs8P1
	iWHDln5EgpxUM3y5Rl3gcHwdfWdNQWD/q9do8=
MIME-Version: 1.0
Received: by 10.224.73.193 with SMTP id r1mr6483987qaj.167.1299016488026; Tue,
	01 Mar 2011 13:54:48 -0800 (PST)
Received: by 10.229.29.197 with HTTP; Tue, 1 Mar 2011 13:54:47 -0800 (PST)
In-Reply-To: <20110301214122.19271.qmail@stuge.se>
References: <009401cbd851$59fa0820$0dee1860$@com>
	<20110301214122.19271.qmail@stuge.se>
Date: Tue, 1 Mar 2011 21:54:47 +0000
X-Google-Sender-Auth: fqPZkMShFBKqxD5AovJ7dmGexto
Message-ID: <AANLkTim7vboT9td-c2C1Rfv+Uh93Yt+xVK2Cy3U9mzYH@mail.gmail.com>
Subject: Re: Spammers have discovered trac.libssh2.org
From: Alexander Lamaison <swish@lammy.co.uk>
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Tue, 01 Mar 2011 22:54:58 +0100 (CET)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Tue, 01 Mar 2011 22:54:51 +0100 (CET)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

On 1 March 2011 21:41, Peter Stuge <peter@stuge.se> wrote:
> Hey everyone,
>
> Mark Riordan wrote:
>> Alas, it seems that bad guys have discovered a way to spam us.
>
> Yeah. I've deleted the tickets, but they can of course create new.
>
> The spam thing is pretty much impossible to solve perfectly in an
> automated way.

To solve 100%, yes impossible.  To reduce greatly, no.

I've found the spam filter included with Trac 0.12 to be very
effective.  It combines measures such as Captcha and Bayesian
filtering with online spam filtering information from the likes of
TypePad and Akismet to decide what is and isn't spam.  My Trac gets
spammed 50 times a day but less that one a week makes it through the
filter.  I've never seen a false positive.

Alex
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Tue Mar  1 23:06:40 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p21M6S1G002955;
	Tue, 1 Mar 2011 23:06:40 +0100
Received: from foo.stuge.se (qmailr@foo.stuge.se [213.88.146.6])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with SMTP id p21M6Qu9002952
	for <libssh2-devel@cool.haxx.se>; Tue, 1 Mar 2011 23:06:27 +0100
Received: (qmail 22930 invoked by uid 501); 1 Mar 2011 22:06:28 -0000
Message-ID: <20110301220628.22929.qmail@stuge.se>
Date: Tue, 1 Mar 2011 23:06:28 +0100
From: Peter Stuge <peter@stuge.se>
To: libssh2-devel@cool.haxx.se
Subject: Re: Spammers have discovered trac.libssh2.org
Mail-Followup-To: libssh2-devel@cool.haxx.se
References: <009401cbd851$59fa0820$0dee1860$@com>
	<20110301214122.19271.qmail@stuge.se>
	<AANLkTim7vboT9td-c2C1Rfv+Uh93Yt+xVK2Cy3U9mzYH@mail.gmail.com>
MIME-Version: 1.0
Content-Disposition: inline
In-Reply-To: <AANLkTim7vboT9td-c2C1Rfv+Uh93Yt+xVK2Cy3U9mzYH@mail.gmail.com>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Tue, 01 Mar 2011 23:06:40 +0100 (CET)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Tue, 01 Mar 2011 23:06:27 +0100 (CET)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

Alexander Lamaison wrote:
> > The spam thing is pretty much impossible to solve perfectly in an
> > automated way.
> 
> I've found the spam filter included with Trac 0.12 to be very
> effective.

I've enabled it with simple bayesian on the libusb Trac but I don't
see it working so well. :\


> My Trac gets spammed 50 times a day but less that one a week makes
> it through the filter.

I don't think that's good enough though. I'd like us to have a
solution that gets rid of the problem completely, even if means a
little bit of manual work.


//Peter
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Tue Mar  1 23:49:38 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p21MnUDJ020444;
	Tue, 1 Mar 2011 23:49:37 +0100
Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com
	[209.85.216.54])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p21MnRce020426
	(version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Tue, 1 Mar 2011 23:49:28 +0100
Received: by qwj8 with SMTP id 8so4756691qwj.41
	for <libssh2-devel@cool.haxx.se>; Tue, 01 Mar 2011 14:49:25 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=googlemail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:content-type;
	bh=ekaIdk3LEibqFp5mYtXr6ts3Ds3z9H62Lxb8WTb40vI=;
	b=TozDct2D7O+H1K+7cOS0ZQ3jxwguEb3ufXRzGJBpiBzhOuLUcSNM+tmodIaX/epeZf
	qbAdlNXU3gys8k4DBhh1RWXDSYUHrTh7DBl0ywfK1mLbQd1WM1Iu1sD1vg254lfMWpAX
	pc/xWM/eG26N1EGFcVS75p4uoeqih1ezLxwDA=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:content-type;
	b=PVu1VSg9CxlKl0J0f3/L0Pu5W0kMUIDp3U+n1qyraIrrcz6N3cxYXO4h3Fh7rsLv+X
	1CuND86X8uXf+tXWbfnoLcILgpXGTiwyzfzL/MIbUUl+9JhVy4ncDaPkYPOiHuSDkC7V
	DhzYgUeF6xRsXJpyDBiGdaMduHKzhL1J/tlCI=
MIME-Version: 1.0
Received: by 10.229.236.134 with SMTP id kk6mr5960686qcb.93.1299019764723;
	Tue, 01 Mar 2011 14:49:24 -0800 (PST)
Received: by 10.229.29.197 with HTTP; Tue, 1 Mar 2011 14:49:24 -0800 (PST)
In-Reply-To: <20110301220628.22929.qmail@stuge.se>
References: <009401cbd851$59fa0820$0dee1860$@com>
	<20110301214122.19271.qmail@stuge.se>
	<AANLkTim7vboT9td-c2C1Rfv+Uh93Yt+xVK2Cy3U9mzYH@mail.gmail.com>
	<20110301220628.22929.qmail@stuge.se>
Date: Tue, 1 Mar 2011 22:49:24 +0000
X-Google-Sender-Auth: _1w3SHa0SqapGea5VaTuUJpBqWA
Message-ID: <AANLkTi=Z6nFmia3AYRgKiQq_-ij2VJHtOGz-0g1Xfy59@mail.gmail.com>
Subject: Re: Spammers have discovered trac.libssh2.org
From: Alexander Lamaison <swish@lammy.co.uk>
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Tue, 01 Mar 2011 23:49:37 +0100 (CET)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Tue, 01 Mar 2011 23:49:28 +0100 (CET)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

On 1 March 2011 22:06, Peter Stuge <peter@stuge.se> wrote:
> Alexander Lamaison wrote:
>> > The spam thing is pretty much impossible to solve perfectly in an
>> > automated way.
>>
>> I've found the spam filter included with Trac 0.12 to be very
>> effective.
>
> I've enabled it with simple bayesian on the libusb Trac but I don't
> see it working so well. :\

Have you tried enabling the TypePad and Akismet features along with
Existing Session filtering?  I've found this combination to be
excellent when used with Captcha and a >0 kudos requirement.

>> My Trac gets spammed 50 times a day but less that one a week makes
>> it through the filter.
>
> I don't think that's good enough though. I'd like us to have a
> solution that gets rid of the problem completely, even if means a
> little bit of manual work.

Of course.  But we presumably want to keep the manual work to a
minimum.  Otherwise how is it any different to manually deleting the
spam posts as they appear?

Alex
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Wed Mar  2 07:40:32 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p226eAxj005666;
	Wed, 2 Mar 2011 07:40:29 +0100
Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com
	[209.85.210.182])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p226e6vM005020
	(version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Wed, 2 Mar 2011 07:40:08 +0100
Received: by iyj12 with SMTP id 12so5669325iyj.41
	for <libssh2-devel@cool.haxx.se>; Tue, 01 Mar 2011 22:40:02 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:reply-to:from:date:message-id
	:subject:to:content-type;
	bh=uEfkb/O9DuUPNSoxA2s2o9mjOKCKoBOhWWknqgF7+is=;
	b=UGALfJkwQEvJwLf1s+y5OmqYkelN/mfzCQIqZvxV9kodwehbmdq7Dc9HoeSg++Myps
	k5d/4dbhcTUzDjsy/7i+oEPKCz56RY/0UiMDqQyJywuz8gXXEftKKNgWLJG6Fah0Nca+
	pUiZZ2eC/F8KtIImpgOerYGopGkTh+VRhGgd8=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:reply-to:from:date:message-id:subject:to:content-type;
	b=FnQln2IEUrkpDioBj97bWN5Ke7TinmTR4S1BluS8Nd8ssBbRoHcDsQHIVOogjbFw0p
	i86f+ib/UDR3RrSmvluiilHjkHaS5D8z4QN2PqoiAfC1UNVL9F658/dx51/8qJMZxfpL
	nopSliRZvLEjvLSM5ewl46ASa2gdwkXkspYSM=
Received: by 10.42.176.202 with SMTP id bf10mr8018967icb.104.1299048002106;
	Tue, 01 Mar 2011 22:40:02 -0800 (PST)
MIME-Version: 1.0
Received: by 10.42.227.138 with HTTP; Tue, 1 Mar 2011 22:39:42 -0800 (PST)
From: Zhu Bicen <zhubicen@gmail.com>
Date: Wed, 2 Mar 2011 14:39:42 +0800
Message-ID: <AANLkTimu7K2cnru8GMA2wSMKzQ7coBypM_Lp813EJGRO@mail.gmail.com>
Subject: I want to know how to compile these source code under the
	libssh2/example?
To: libssh2-devel@cool.haxx.se
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Wed, 02 Mar 2011 07:40:32 +0100 (CET)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Wed, 02 Mar 2011 07:40:08 +0100 (CET)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: zhubicen@gmail.com, libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============0203972628=="
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

--===============0203972628==
Content-Type: multipart/alternative; boundary=90e6ba6e83e6b6355e049d7a2e56

--90e6ba6e83e6b6355e049d7a2e56
Content-Type: text/plain; charset=UTF-8

I'm newbie to use libssh2. I have installed the libssh2 by running the cygwin
setup.exe.
After that I found related files installed under dir /lib, and /usr/include.
and the source of libssh2 had been installed under
/usr/src/libssh2-1.2.5.tar.gz.

From the doc of libssh2 website, I know the some example code is in the src
tarball. so I extract the tarball.

*Now I want to know how to compile these source code under the
libssh2/example?*
-rw-r--r-- 1 bzhu Domain Users   439 Feb  4  2010 Makefile.am
-rw-r--r-- 1 bzhu Domain Users 22405 Mar 24  2010 Makefile.in
-rw-r--r-- 1 bzhu Domain Users  8246 Mar 24  2010 direct_tcpip.c
-rw-r--r-- 1 bzhu Domain Users  5997 Mar 24  2010 libssh2_config.h.in
-rw-r--r-- 1 bzhu Domain Users  4464 Mar 24  2010 scp.c
-rw-r--r-- 1 bzhu Domain Users  7373 Mar 24  2010 scp_nonblock.c
-rw-r--r-- 1 bzhu Domain Users  5647 Mar 24  2010 scp_write.c
-rw-r--r-- 1 bzhu Domain Users  6379 Mar 24  2010 scp_write_nonblock.c
-rw-r--r-- 1 bzhu Domain Users  6920 Mar 24  2010 sftp.c
-rw-r--r-- 1 bzhu Domain Users  8123 Mar 24  2010 sftp_RW_nonblock.c
-rw-r--r-- 1 bzhu Domain Users  4497 Mar 24  2010 sftp_mkdir.c
-rw-r--r-- 1 bzhu Domain Users  4685 Mar 24  2010 sftp_mkdir_nonblock.c
-rw-r--r-- 1 bzhu Domain Users  7639 Mar 24  2010 sftp_nonblock.c
-rw-r--r-- 1 bzhu Domain Users  5549 Mar 24  2010 sftp_write.c
-rw-r--r-- 1 bzhu Domain Users  6221 Mar 24  2010 sftp_write_nonblock.c
-rw-r--r-- 1 bzhu Domain Users  6193 Mar 24  2010 sftpdir.c
-rw-r--r-- 1 bzhu Domain Users  6725 Mar 24  2010 sftpdir_nonblock.c
-rw-r--r-- 1 bzhu Domain Users  7453 Mar 24  2010 ssh2.c
-rw-r--r-- 1 bzhu Domain Users  6554 Mar 24  2010 ssh2_agent.c
-rw-r--r-- 1 bzhu Domain Users  7866 Mar 24  2010 ssh2_exec.c

Although I don't want to build the whole library,
I have tried running the ./configure under the src top dir. But error
occurs:
 bzhu@5M42X2X  /usr/src/libssh2-1.2.5
$ ./configure
checking whether to enable maintainer-specific portions of Makefiles... no
checking for sed... /usr/bin/sed
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking libssh2 version... 1.2.5
checking build system type... i686-pc-cygwin
checking host system type... i686-pc-cygwin
configure: autobuild project... libssh2
configure: autobuild revision... 1.2.5
configure: autobuild hostname... 5M42X2X
configure: autobuild timestamp... 20110302-143722
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... configure: error: in
`/usr/src/libssh2-1.2.5':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.


Thanks in advance.

-- 
Best Regards
Bicen Zhu

--90e6ba6e83e6b6355e049d7a2e56
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

I&#39;m newbie to use libssh2. I have installed the libssh2 by running the =
<font class=3D"Apple-style-span" color=3D"#ff0000">cygwin </font>setup.exe.=
<div>After that I found related files installed under dir /lib, and /usr/in=
clude.</div>

<div>and the source of libssh2 had been installed under /usr/src/libssh2-1.=
2.5.tar.gz.</div><div><br></div><div>From the doc of libssh2 website, I kno=
w the some example code is in the src tarball. so I extract the tarball.</d=
iv>

<div><br></div><div><font class=3D"Apple-style-span" color=3D"#ff0000"><b>N=
ow I want to know how to compile these source code under the libssh2/exampl=
e?</b></font></div><div><div>-rw-r--r-- 1 bzhu Domain Users =C2=A0 439 Feb =
=C2=A04 =C2=A02010 Makefile.am</div>

<div>-rw-r--r-- 1 bzhu Domain Users 22405 Mar 24 =C2=A02010 Makefile.in</di=
v><div>-rw-r--r-- 1 bzhu Domain Users =C2=A08246 Mar 24 =C2=A02010 direct_t=
cpip.c</div><div>-rw-r--r-- 1 bzhu Domain Users =C2=A05997 Mar 24 =C2=A0201=
0 <a href=3D"http://libssh2_config.h.in">libssh2_config.h.in</a></div>

<div>-rw-r--r-- 1 bzhu Domain Users =C2=A04464 Mar 24 =C2=A02010 scp.c</div=
><div>-rw-r--r-- 1 bzhu Domain Users =C2=A07373 Mar 24 =C2=A02010 scp_nonbl=
ock.c</div><div>-rw-r--r-- 1 bzhu Domain Users =C2=A05647 Mar 24 =C2=A02010=
 scp_write.c</div><div>-rw-r--r-- 1 bzhu Domain Users =C2=A06379 Mar 24 =C2=
=A02010 scp_write_nonblock.c</div>

<div>-rw-r--r-- 1 bzhu Domain Users =C2=A06920 Mar 24 =C2=A02010 sftp.c</di=
v><div>-rw-r--r-- 1 bzhu Domain Users =C2=A08123 Mar 24 =C2=A02010 sftp_RW_=
nonblock.c</div><div>-rw-r--r-- 1 bzhu Domain Users =C2=A04497 Mar 24 =C2=
=A02010 sftp_mkdir.c</div><div>

-rw-r--r-- 1 bzhu Domain Users =C2=A04685 Mar 24 =C2=A02010 sftp_mkdir_nonb=
lock.c</div><div>-rw-r--r-- 1 bzhu Domain Users =C2=A07639 Mar 24 =C2=A0201=
0 sftp_nonblock.c</div><div>-rw-r--r-- 1 bzhu Domain Users =C2=A05549 Mar 2=
4 =C2=A02010 sftp_write.c</div>

<div>-rw-r--r-- 1 bzhu Domain Users =C2=A06221 Mar 24 =C2=A02010 sftp_write=
_nonblock.c</div><div>-rw-r--r-- 1 bzhu Domain Users =C2=A06193 Mar 24 =C2=
=A02010 sftpdir.c</div><div>-rw-r--r-- 1 bzhu Domain Users =C2=A06725 Mar 2=
4 =C2=A02010 sftpdir_nonblock.c</div>

<div>-rw-r--r-- 1 bzhu Domain Users =C2=A07453 Mar 24 =C2=A02010 ssh2.c</di=
v><div>-rw-r--r-- 1 bzhu Domain Users =C2=A06554 Mar 24 =C2=A02010 ssh2_age=
nt.c</div><div>-rw-r--r-- 1 bzhu Domain Users =C2=A07866 Mar 24 =C2=A02010 =
ssh2_exec.c</div><div><br>

</div><div>Although I don&#39;t want to build the whole library,=C2=A0</div=
><div>I have tried running the ./configure under the src top dir. But error=
 occurs:</div><div><div>=C2=A0bzhu@5M42X2X =C2=A0/usr/src/libssh2-1.2.5</di=
v><div>$ ./configure</div>

<div>checking whether to enable maintainer-specific portions of Makefiles..=
. no</div><div>checking for sed... /usr/bin/sed</div><div>checking for a BS=
D-compatible install... /usr/bin/install -c</div><div>checking whether buil=
d environment is sane... yes</div>

<div>checking for gawk... gawk</div><div>checking whether make sets $(MAKE)=
... yes</div><div>checking libssh2 version... 1.2.5</div><div>checking buil=
d system type... i686-pc-cygwin</div><div>checking host system type... i686=
-pc-cygwin</div>

<div>configure: autobuild project... libssh2</div><div>configure: autobuild=
 revision... 1.2.5</div><div>configure: autobuild hostname... 5M42X2X</div>=
<div>configure: autobuild timestamp... 20110302-143722</div><div>checking f=
or style of include used by make... GNU</div>

<div>checking for gcc... gcc</div><div>checking whether the C compiler work=
s... yes</div><div>checking for C compiler default output file name... a.ex=
e</div><div>checking for suffix of executables... .exe</div><div>checking w=
hether we are cross compiling... configure: error: in `/usr/src/libssh2-1.2=
.5&#39;:</div>

<div><font class=3D"Apple-style-span" color=3D"#ff0000">configure: error: c=
annot run C compiled programs.</font></div><div>If you meant to cross compi=
le, use `--host&#39;.</div><div>See `config.log&#39; for more details.</div=
>

</div><div><br></div><div><br></div><div>Thanks in advance.</div><div><br><=
/div>-- <br>Best Regards<br>Bicen Zhu<br>
</div>

--90e6ba6e83e6b6355e049d7a2e56--

--===============0203972628==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

--===============0203972628==--

From libssh2-devel-bounces@cool.haxx.se  Wed Mar  2 07:41:59 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p226fvrt007433;
	Wed, 2 Mar 2011 07:41:58 +0100
Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com
	[209.85.210.182])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p226frPf007317
	(version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Wed, 2 Mar 2011 07:41:54 +0100
Received: by iyj12 with SMTP id 12so5670436iyj.41
	for <libssh2-devel@cool.haxx.se>; Tue, 01 Mar 2011 22:41:49 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:reply-to:in-reply-to:references
	:from:date:message-id:subject:to:content-type;
	bh=WXQz60IJbVbcxNqCAfLDmJ/Uxaf64It32Aq7u/dE358=;
	b=YKkXEB+U1leIxC/20BsjEQIOzpsPzc2UFXI/OJPXQqvy6MLXgCuRTQGWM+L7U/VDjq
	FkBQ5mgRm/K4IiyCEDJ5bQGDwc8EPdBYjIQVVGyPQFFuS3vIyj9Onx0XEEVMI6DIRG5z
	Y+GCzo3Gnq5PAXbbO258nO7uKH/U3zCXxHoJc=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:reply-to:in-reply-to:references:from:date:message-id
	:subject:to:content-type;
	b=wkQ5yKJWxPSnssALweC+0e23pGIgnfHVANGTgdaCUFBkK+13EwMsDxeuwA6pgz6k8e
	quOvhtSX8N+o9ZSOWgvMsqYMpePgm2W/shXYCW1MlFqPOcvuDLpCZDH0cBeQQdV0lsdi
	kjf8ziTJt+/FfOj/K+EHqsrYu9yPB+QjZV15o=
Received: by 10.42.225.66 with SMTP id ir2mr1285078icb.372.1299048109064; Tue,
	01 Mar 2011 22:41:49 -0800 (PST)
MIME-Version: 1.0
Received: by 10.42.227.138 with HTTP; Tue, 1 Mar 2011 22:41:29 -0800 (PST)
In-Reply-To: <AANLkTimu7K2cnru8GMA2wSMKzQ7coBypM_Lp813EJGRO@mail.gmail.com>
References: <AANLkTimu7K2cnru8GMA2wSMKzQ7coBypM_Lp813EJGRO@mail.gmail.com>
From: Zhu Bicen <zhubicen@gmail.com>
Date: Wed, 2 Mar 2011 14:41:29 +0800
Message-ID: <AANLkTikMPeqeBniPBnXc2WU0xeauFp32iTOZaEEzt8yC@mail.gmail.com>
Subject: Re: I want to know how to compile these source code under the
	libssh2/example?
To: libssh2-devel@cool.haxx.se
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Wed, 02 Mar 2011 07:41:59 +0100 (CET)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Wed, 02 Mar 2011 07:41:55 +0100 (CET)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: zhubicen@gmail.com, libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============0932038934=="
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

--===============0932038934==
Content-Type: multipart/alternative; boundary=20cf30549b471643ea049d7a352f

--20cf30549b471643ea049d7a352f
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

And I also tried this:
 bzhu@5M42X2X  /usr/src/libssh2-1.2.5/example
$ gcc scp.c
scp.c:7:28: error: libssh2_config.h: No such file or directory
scp.c: In function =E2=80=98main=E2=80=99:
scp.c:39: error: storage size of =E2=80=98sin=E2=80=99 isn=E2=80=99t known
scp.c:81: error: =E2=80=98AF_INET=E2=80=99 undeclared (first use in this fu=
nction)
scp.c:81: error: (Each undeclared identifier is reported only once
scp.c:81: error: for each function it appears in.)
scp.c:81: error: =E2=80=98SOCK_STREAM=E2=80=99 undeclared (first use in thi=
s function)
scp.c:87: error: invalid application of =E2=80=98sizeof=E2=80=99 to incompl=
ete type =E2=80=98struct
sockaddr_in=E2=80=99


2011/3/2 Zhu Bicen <zhubicen@gmail.com>

> I'm newbie to use libssh2. I have installed the libssh2 by running the cy=
gwin
> setup.exe.
> After that I found related files installed under dir /lib, and
> /usr/include.
> and the source of libssh2 had been installed under
> /usr/src/libssh2-1.2.5.tar.gz.
>
> From the doc of libssh2 website, I know the some example code is in the s=
rc
> tarball. so I extract the tarball.
>
> *Now I want to know how to compile these source code under the
> libssh2/example?*
> -rw-r--r-- 1 bzhu Domain Users   439 Feb  4  2010 Makefile.am
> -rw-r--r-- 1 bzhu Domain Users 22405 Mar 24  2010 Makefile.in
> -rw-r--r-- 1 bzhu Domain Users  8246 Mar 24  2010 direct_tcpip.c
> -rw-r--r-- 1 bzhu Domain Users  5997 Mar 24  2010 libssh2_config.h.in
> -rw-r--r-- 1 bzhu Domain Users  4464 Mar 24  2010 scp.c
> -rw-r--r-- 1 bzhu Domain Users  7373 Mar 24  2010 scp_nonblock.c
> -rw-r--r-- 1 bzhu Domain Users  5647 Mar 24  2010 scp_write.c
> -rw-r--r-- 1 bzhu Domain Users  6379 Mar 24  2010 scp_write_nonblock.c
> -rw-r--r-- 1 bzhu Domain Users  6920 Mar 24  2010 sftp.c
> -rw-r--r-- 1 bzhu Domain Users  8123 Mar 24  2010 sftp_RW_nonblock.c
> -rw-r--r-- 1 bzhu Domain Users  4497 Mar 24  2010 sftp_mkdir.c
> -rw-r--r-- 1 bzhu Domain Users  4685 Mar 24  2010 sftp_mkdir_nonblock.c
> -rw-r--r-- 1 bzhu Domain Users  7639 Mar 24  2010 sftp_nonblock.c
> -rw-r--r-- 1 bzhu Domain Users  5549 Mar 24  2010 sftp_write.c
> -rw-r--r-- 1 bzhu Domain Users  6221 Mar 24  2010 sftp_write_nonblock.c
> -rw-r--r-- 1 bzhu Domain Users  6193 Mar 24  2010 sftpdir.c
> -rw-r--r-- 1 bzhu Domain Users  6725 Mar 24  2010 sftpdir_nonblock.c
> -rw-r--r-- 1 bzhu Domain Users  7453 Mar 24  2010 ssh2.c
> -rw-r--r-- 1 bzhu Domain Users  6554 Mar 24  2010 ssh2_agent.c
> -rw-r--r-- 1 bzhu Domain Users  7866 Mar 24  2010 ssh2_exec.c
>
> Although I don't want to build the whole library,
> I have tried running the ./configure under the src top dir. But error
> occurs:
>  bzhu@5M42X2X  /usr/src/libssh2-1.2.5
> $ ./configure
> checking whether to enable maintainer-specific portions of Makefiles... n=
o
> checking for sed... /usr/bin/sed
> checking for a BSD-compatible install... /usr/bin/install -c
> checking whether build environment is sane... yes
> checking for gawk... gawk
> checking whether make sets $(MAKE)... yes
> checking libssh2 version... 1.2.5
> checking build system type... i686-pc-cygwin
> checking host system type... i686-pc-cygwin
> configure: autobuild project... libssh2
> configure: autobuild revision... 1.2.5
> configure: autobuild hostname... 5M42X2X
> configure: autobuild timestamp... 20110302-143722
> checking for style of include used by make... GNU
> checking for gcc... gcc
> checking whether the C compiler works... yes
> checking for C compiler default output file name... a.exe
> checking for suffix of executables... .exe
> checking whether we are cross compiling... configure: error: in
> `/usr/src/libssh2-1.2.5':
> configure: error: cannot run C compiled programs.
> If you meant to cross compile, use `--host'.
> See `config.log' for more details.
>
>
> Thanks in advance.
>
> --
> Best Regards
> Bicen Zhu
>



--=20
Best Regards
Bicen Zhu

--20cf30549b471643ea049d7a352f
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

And I also tried this:<div><div>=C2=A0bzhu@5M42X2X =C2=A0/usr/src/libssh2-1=
.2.5/example</div><div><font class=3D"Apple-style-span" color=3D"#ff0000">$=
 gcc scp.c</font></div><div>scp.c:7:28: <font class=3D"Apple-style-span" co=
lor=3D"#ff0000">error: libssh2_config.h: No such file or directory</font></=
div>

<div>scp.c: In function =E2=80=98main=E2=80=99:</div><div>scp.c:39: error: =
storage size of =E2=80=98sin=E2=80=99 isn=E2=80=99t known</div><div>scp.c:8=
1: error: =E2=80=98AF_INET=E2=80=99 undeclared (first use in this function)=
</div><div>scp.c:81: error: (Each undeclared identifier is reported only on=
ce</div>

<div>scp.c:81: error: for each function it appears in.)</div><div>scp.c:81:=
 error: =E2=80=98SOCK_STREAM=E2=80=99 undeclared (first use in this functio=
n)</div><div>scp.c:87: error: invalid application of =E2=80=98sizeof=E2=80=
=99 to incomplete type =E2=80=98struct sockaddr_in=E2=80=99</div>

<div><br></div><br><div class=3D"gmail_quote">2011/3/2 Zhu Bicen <span dir=
=3D"ltr">&lt;<a href=3D"mailto:zhubicen@gmail.com">zhubicen@gmail.com</a>&g=
t;</span><br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;b=
order-left:1px #ccc solid;padding-left:1ex;">

I&#39;m newbie to use libssh2. I have installed the libssh2 by running the =
<font color=3D"#ff0000">cygwin </font>setup.exe.<div>After that I found rel=
ated files installed under dir /lib, and /usr/include.</div>
<div>and the source of libssh2 had been installed under /usr/src/libssh2-1.=
2.5.tar.gz.</div><div><br></div><div>From the doc of libssh2 website, I kno=
w the some example code is in the src tarball. so I extract the tarball.</d=
iv>


<div><br></div><div><font color=3D"#ff0000"><b>Now I want to know how to co=
mpile these source code under the libssh2/example?</b></font></div><div><di=
v>-rw-r--r-- 1 bzhu Domain Users =C2=A0 439 Feb =C2=A04 =C2=A02010 Makefile=
.am</div>
<div>-rw-r--r-- 1 bzhu Domain Users 22405 Mar 24 =C2=A02010 Makefile.in</di=
v><div>-rw-r--r-- 1 bzhu Domain Users =C2=A08246 Mar 24 =C2=A02010 direct_t=
cpip.c</div><div>-rw-r--r-- 1 bzhu Domain Users =C2=A05997 Mar 24 =C2=A0201=
0 <a href=3D"http://libssh2_config.h.in" target=3D"_blank">libssh2_config.h=
.in</a></div>


<div>-rw-r--r-- 1 bzhu Domain Users =C2=A04464 Mar 24 =C2=A02010 scp.c</div=
><div>-rw-r--r-- 1 bzhu Domain Users =C2=A07373 Mar 24 =C2=A02010 scp_nonbl=
ock.c</div><div>-rw-r--r-- 1 bzhu Domain Users =C2=A05647 Mar 24 =C2=A02010=
 scp_write.c</div><div>-rw-r--r-- 1 bzhu Domain Users =C2=A06379 Mar 24 =C2=
=A02010 scp_write_nonblock.c</div>


<div>-rw-r--r-- 1 bzhu Domain Users =C2=A06920 Mar 24 =C2=A02010 sftp.c</di=
v><div>-rw-r--r-- 1 bzhu Domain Users =C2=A08123 Mar 24 =C2=A02010 sftp_RW_=
nonblock.c</div><div>-rw-r--r-- 1 bzhu Domain Users =C2=A04497 Mar 24 =C2=
=A02010 sftp_mkdir.c</div><div>


-rw-r--r-- 1 bzhu Domain Users =C2=A04685 Mar 24 =C2=A02010 sftp_mkdir_nonb=
lock.c</div><div>-rw-r--r-- 1 bzhu Domain Users =C2=A07639 Mar 24 =C2=A0201=
0 sftp_nonblock.c</div><div>-rw-r--r-- 1 bzhu Domain Users =C2=A05549 Mar 2=
4 =C2=A02010 sftp_write.c</div>


<div>-rw-r--r-- 1 bzhu Domain Users =C2=A06221 Mar 24 =C2=A02010 sftp_write=
_nonblock.c</div><div>-rw-r--r-- 1 bzhu Domain Users =C2=A06193 Mar 24 =C2=
=A02010 sftpdir.c</div><div>-rw-r--r-- 1 bzhu Domain Users =C2=A06725 Mar 2=
4 =C2=A02010 sftpdir_nonblock.c</div>


<div>-rw-r--r-- 1 bzhu Domain Users =C2=A07453 Mar 24 =C2=A02010 ssh2.c</di=
v><div>-rw-r--r-- 1 bzhu Domain Users =C2=A06554 Mar 24 =C2=A02010 ssh2_age=
nt.c</div><div>-rw-r--r-- 1 bzhu Domain Users =C2=A07866 Mar 24 =C2=A02010 =
ssh2_exec.c</div><div><br>


</div><div>Although I don&#39;t want to build the whole library,=C2=A0</div=
><div>I have tried running the ./configure under the src top dir. But error=
 occurs:</div><div><div>=C2=A0bzhu@5M42X2X =C2=A0/usr/src/libssh2-1.2.5</di=
v><div>$ ./configure</div>


<div>checking whether to enable maintainer-specific portions of Makefiles..=
. no</div><div>checking for sed... /usr/bin/sed</div><div>checking for a BS=
D-compatible install... /usr/bin/install -c</div><div>checking whether buil=
d environment is sane... yes</div>


<div>checking for gawk... gawk</div><div>checking whether make sets $(MAKE)=
... yes</div><div>checking libssh2 version... 1.2.5</div><div>checking buil=
d system type... i686-pc-cygwin</div><div>checking host system type... i686=
-pc-cygwin</div>


<div>configure: autobuild project... libssh2</div><div>configure: autobuild=
 revision... 1.2.5</div><div>configure: autobuild hostname... 5M42X2X</div>=
<div>configure: autobuild timestamp... 20110302-143722</div><div>checking f=
or style of include used by make... GNU</div>


<div>checking for gcc... gcc</div><div>checking whether the C compiler work=
s... yes</div><div>checking for C compiler default output file name... a.ex=
e</div><div>checking for suffix of executables... .exe</div><div>checking w=
hether we are cross compiling... configure: error: in `/usr/src/libssh2-1.2=
.5&#39;:</div>


<div><font color=3D"#ff0000">configure: error: cannot run C compiled progra=
ms.</font></div><div>If you meant to cross compile, use `--host&#39;.</div>=
<div>See `config.log&#39; for more details.</div>
</div><div><br></div><div><br></div><div>Thanks in advance.</div><div><br><=
/div>-- <br>Best Regards<br>Bicen Zhu<br>
</div>
</blockquote></div><br><br clear=3D"all"><br>-- <br>Best Regards<br>Bicen Z=
hu<br>
</div>

--20cf30549b471643ea049d7a352f--

--===============0932038934==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

--===============0932038934==--

From libssh2-devel-bounces@cool.haxx.se  Wed Mar  2 08:26:05 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p227Psfd005098;
	Wed, 2 Mar 2011 08:26:04 +0100
Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com
	[209.85.216.175])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p227PqKM005047
	(version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Wed, 2 Mar 2011 08:25:53 +0100
Received: by qyk35 with SMTP id 35so3868729qyk.20
	for <libssh2-devel@cool.haxx.se>; Tue, 01 Mar 2011 23:25:46 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:content-type;
	bh=wtj2pznCjHh9QD8+CfFu97whBt4ueN+PHj5HJzpcyNs=;
	b=YiYAHQzrQr4nq7TVk0FML25GBpU7ZqAGe1DvRoQmNYfHQW1yeZU0GS1nA2L2aaxQ3I
	1vIH/2t5EXcNd03trMvvuiBRZckJ8bY+ZYtVYQwIvfFp4mFC1nBuz1SAQ3wp055ye0mG
	vQ4Avv5Sc7YG+s+0fgjgvn3Egpoj4U3Y/JMtg=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:content-type;
	b=AIoOq8LqcRaZV7oGZqfRh2FNeZNz30RxlyIoiZgGlBjaH/3n34JlCRL57Qft08zw3l
	ahFFe3ed0c1V6SxNUzQ/cq2UM+lvclsVaUqv7W9pZ6DmfrTijCN6rp0lCya8H71MwvFJ
	3x47XjR8sUaeVWCmZywR15pqC4Bw/Ehwf3EqU=
MIME-Version: 1.0
Received: by 10.229.130.106 with SMTP id r42mr4552562qcs.227.1299050746629;
	Tue, 01 Mar 2011 23:25:46 -0800 (PST)
Received: by 10.229.75.209 with HTTP; Tue, 1 Mar 2011 23:25:46 -0800 (PST)
In-Reply-To: <AANLkTi=Z6nFmia3AYRgKiQq_-ij2VJHtOGz-0g1Xfy59@mail.gmail.com>
References: <009401cbd851$59fa0820$0dee1860$@com>
	<20110301214122.19271.qmail@stuge.se>
	<AANLkTim7vboT9td-c2C1Rfv+Uh93Yt+xVK2Cy3U9mzYH@mail.gmail.com>
	<20110301220628.22929.qmail@stuge.se>
	<AANLkTi=Z6nFmia3AYRgKiQq_-ij2VJHtOGz-0g1Xfy59@mail.gmail.com>
Date: Wed, 2 Mar 2011 08:25:46 +0100
X-Google-Sender-Auth: kUCALPUYvSTeE58ShsxvqzUk7Lo
Message-ID: <AANLkTi=8vid6Yr=-62_nwvEfwoJEBoGzDjYkwfo9YyNj@mail.gmail.com>
Subject: Re: Spammers have discovered trac.libssh2.org
From: Tor Arntsen <tor@spacetec.no>
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Wed, 02 Mar 2011 08:26:05 +0100 (CET)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Wed, 02 Mar 2011 08:25:53 +0100 (CET)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

On Tue, Mar 1, 2011 at 23:49, Alexander Lamaison <swish@lammy.co.uk> wrote:
> On 1 March 2011 22:06, Peter Stuge <peter@stuge.se> wrote:
>> Alexander Lamaison wrote:
>>> > The spam thing is pretty much impossible to solve perfectly in an
>>> > automated way.

This is unfortunately true. Spamming has changed. A (normally) very
low-traffic wiki I visit and use was recently totally overflowed with
the most useless, pointless spam over a period of a month and a half,
until the admin was forced to totally disable account creation (now
it's a manual process - you mail him, talk to him, he learns who you
are, and he adds you).

The spammers were obviously human, not bots (if you deleted the
content of a newly created spam page they would notice and revert your
fix), captchas and email authentication tickets were duly answered,
and they created hundreds and hundreds of accounts at the rate the old
ones were blocked. They added mostly job listing pages, but what was
baffling was that every page was a new page, thus there were no links
there from anywhere inside the wiki (you could mass delete them just
by going to special:orphaned and look for them). So it looked utterly
pointless. If they just wanted free storage which could be linked to
from elsewhere there are free and easy legal ways to do that. Totally
baffling.

They started with A and went through the alphabet (Alabama jobs,
Christian Teacher jobs, and so on), and started over when they reached
the end of their spam job listings. To me it looked like a couple of
guys were paid to sit 16 hours a day doing this. And they used a
network of proxies so that IPs were always different. I can't see any
well-functioning automated way to handle spam done manually like that.

-Tor
(p.s. What I really want is a global task force with resources to
physically hunt down every spammer everywhere and do bad things to
them.)
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Wed Mar  2 10:29:31 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p229T3rs032536;
	Wed, 2 Mar 2011 10:29:26 +0100
Received: from ccsrelay02.in2p3.fr (ccsrelay02.in2p3.fr [134.158.66.52])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p229T0tN032429
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Wed, 2 Mar 2011 10:29:01 +0100
Received: from [134.158.71.82] (cceagle2.in2p3.fr [134.158.71.82])
	(authenticated bits=0)
	by ccsrelay02.in2p3.fr (8.14.2/8.14.2/IN2P3) with ESMTP id
	p229SuRI020446
	(version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO)
	for <libssh2-devel@cool.haxx.se>; Wed, 2 Mar 2011 10:28:56 +0100
X-Virus-Status: Clean
X-Virus-Scanned: clamav-milter 0.97 at ccsrelay02
Message-ID: <4D6E0DD8.1040206@cc.in2p3.fr>
Date: Wed, 02 Mar 2011 10:28:56 +0100
From: Pierre-Yves Fontaniere <pyf@cc.in2p3.fr>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US;
	rv:1.9.1.16) Gecko/20101227 Icedove/3.0.11
MIME-Version: 1.0
To: libssh2-devel@cool.haxx.se
Subject: Problem with known_hosts
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Wed, 02 Mar 2011 10:29:31 +0100 (CET)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Wed, 02 Mar 2011 10:29:01 +0100 (CET)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

Hello

I have a problem with libssh2_knownhost_check telling me that the host 
doesn't exist in known_hosts file.
It appears that when we have a known_hosts file with more than a name 
and an IP-addr like :

host_alias,hostname,hostname_FQDN,host_IPADDR KEY_TYPE KEY

The function hostline create a list of only two hosts strings containing :
  - "host_alias"
  - "hostname,hostname_FQDN,host_IPADDR"

That is to say that when i try to verify that hostname_FQDN matches the 
key, the function knownhost_check called by libssh2_knownhost_check will 
return : LIBSSH2_KNOWNHOST_CHECK_NOTFOUND

I'm using libssh2 1.2.7 on AIX 6.1 / 5.3

Is it a bug or am i doing something wrong ? Should i only call 
libssh2_knownhost_check with a not FQDN hostname ?

Thanks for all
Pierre-yves
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Wed Mar  2 10:48:25 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p229mJ2p013527;
	Wed, 2 Mar 2011 10:48:25 +0100
Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com
	[209.85.216.54])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p229mHlc013481
	(version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Wed, 2 Mar 2011 10:48:18 +0100
Received: by qwj8 with SMTP id 8so5081149qwj.41
	for <libssh2-devel@cool.haxx.se>; Wed, 02 Mar 2011 01:48:12 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=googlemail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:content-type
	:content-transfer-encoding;
	bh=69ZslAU6hvTbxwCMkyf0Ug4s9Jd9BRGg+kkVWq0AaoI=;
	b=B/EQ8t1lta02ohUllaaBd6WQh228VcfU/bhN/oCISQrPRxdDIldG60zl22vWCWialW
	4FS9sgiMRcFU6FYIXV+n1W+OJ29dxtTcSbHxAnxxvTivpFoZ42aDJBQVyRxRygncmdpN
	MlZIltK/E1dL76vsOYftuubB7UtGDdGjs1PUc=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:content-type
	:content-transfer-encoding;
	b=i9iG7ttwt6ljVmH2SgK5gbV80kXt+EPnW0NSZwkKU0j377p8DcxnmoCLZv7huJCdL6
	MzOAOCgLGGDbXZ+eLc92AeHKEoLyVnKrMOF4hlGQAnpDU2Nl9u5AZtISS8pkby8UqRYg
	kFm7tPAlYYF9Zc4NA2wr9EeKAuMp/Qiez9ZMs=
MIME-Version: 1.0
Received: by 10.224.69.221 with SMTP id a29mr6938165qaj.117.1299059292785;
	Wed, 02 Mar 2011 01:48:12 -0800 (PST)
Received: by 10.229.29.197 with HTTP; Wed, 2 Mar 2011 01:48:12 -0800 (PST)
In-Reply-To: <4D6E0DD8.1040206@cc.in2p3.fr>
References: <4D6E0DD8.1040206@cc.in2p3.fr>
Date: Wed, 2 Mar 2011 09:48:12 +0000
X-Google-Sender-Auth: Vf_cJ8nNYRj5j1NUzzQ44VlfQuM
Message-ID: <AANLkTin5qdBOQpG=Jsx5kSJbgZ=ma_kEmrwa=ku9xYTD@mail.gmail.com>
Subject: Re: Problem with known_hosts
From: Alexander Lamaison <swish@lammy.co.uk>
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Wed, 02 Mar 2011 10:48:25 +0100 (CET)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Wed, 02 Mar 2011 10:48:18 +0100 (CET)
X-MIME-Autoconverted: from quoted-printable to 8bit by giant.haxx.se id
	p229mHlc013481
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="iso-8859-1"
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by giant.haxx.se id p229mJ2p013527

On 2 March 2011 09:28, Pierre-Yves Fontaniere <pyf@cc.in2p3.fr> wrote:
> Hello
>
> I have a problem with libssh2_knownhost_check telling me that the host
> doesn't exist in known_hosts file.
> It appears that when we have a known_hosts file with more than a name and an
> IP-addr like :
>
> host_alias,hostname,hostname_FQDN,host_IPADDR KEY_TYPE KEY

I've never seen a knownhost entry that looks like this but I can
understand how it might be legal.  Knownhost entries created by
OpenSSH look like this:

hostname,host_IPADDR KEY_TYPE, KEY

libssh2 splits these into two entries when it writes back to the file
as it doesn't remember that the hostname and IP-address are associated
with each other.  This is something I'd like to change but haven't had
the time yet.

> The function hostline create a list of only two hosts strings containing :
>  - "host_alias"
>  - "hostname,hostname_FQDN,host_IPADDR"

I think what is happening here is that libssh2 expected at most two
'aliases' for the single key; one hostname, one IP-address.  As your
entry has many aliases, it blindly splits it at the first comma.

> I'm using libssh2 1.2.7 on AIX 6.1 / 5.3
>
> Is it a bug or am i doing something wrong ?

It's a bug.  There are two possible solutions.

The rougher, easier fix would be to modify libssh2 so that it can
process an arbitrary number of comma-separated aliases and creates a
new entry for each one.

The much nicer fix would be to modify the knownhost handling so that
it explicitly supports alias lists and doesn't split them into
separate entries.  This means libssh2 could read in and write out any
known_hosts file and there should be no difference between the before
and after.

Unfortunately, I'm snowed under with work and don't have time to look
at this.  Patches welcome :)

Alex

--
Easy SFTP for Windows Explorer (http://www.swish-sftp.org)

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Wed Mar  2 13:17:22 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p22CH6ld003014;
	Wed, 2 Mar 2011 13:17:21 +0100
Received: from ccsrelay02.in2p3.fr (ccsrelay02.in2p3.fr [134.158.66.52])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p22CH4ce002934
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Wed, 2 Mar 2011 13:17:05 +0100
Received: from [134.158.71.82] (cceagle2.in2p3.fr [134.158.71.82])
	(authenticated bits=0)
	by ccsrelay02.in2p3.fr (8.14.2/8.14.2/IN2P3) with ESMTP id
	p22CH03H031070
	(version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO)
	for <libssh2-devel@cool.haxx.se>; Wed, 2 Mar 2011 13:17:00 +0100
X-Virus-Status: Clean
X-Virus-Scanned: clamav-milter 0.97 at ccsrelay02
Message-ID: <4D6E353C.6050605@cc.in2p3.fr>
Date: Wed, 02 Mar 2011 13:17:00 +0100
From: Pierre-Yves Fontaniere <pyf@cc.in2p3.fr>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US;
	rv:1.9.1.16) Gecko/20101227 Icedove/3.0.11
MIME-Version: 1.0
To: libssh2-devel@cool.haxx.se
Subject: Re: Problem with known_hosts
References: <4D6E0DD8.1040206@cc.in2p3.fr>
	<AANLkTin5qdBOQpG=Jsx5kSJbgZ=ma_kEmrwa=ku9xYTD@mail.gmail.com>
In-Reply-To: <AANLkTin5qdBOQpG=Jsx5kSJbgZ=ma_kEmrwa=ku9xYTD@mail.gmail.com>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Wed, 02 Mar 2011 13:17:22 +0100 (CET)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Wed, 02 Mar 2011 13:17:06 +0100 (CET)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

On 03/02/2011 10:48 AM, Alexander Lamaison wrote:
>> I'm using libssh2 1.2.7 on AIX 6.1 / 5.3
>>
>> Is it a bug or am i doing something wrong ?
>>      
> It's a bug.  There are two possible solutions.
>
> The rougher, easier fix would be to modify libssh2 so that it can
> process an arbitrary number of comma-separated aliases and creates a
> new entry for each one.
>
> The much nicer fix would be to modify the knownhost handling so that
> it explicitly supports alias lists and doesn't split them into
> separate entries.  This means libssh2 could read in and write out any
> known_hosts file and there should be no difference between the before
> and after.
>
> Unfortunately, I'm snowed under with work and don't have time to look
> at this.  Patches welcome :)
>    
I'm already working on a patch :) , but if I try to follow the 
description i found here :
http://www.openbsd.org/cgi-bin/man.cgi?query=sshd&sektion=8
Wild cards, revoked keys ... I think it will take years before seeing it. :)

From what I see, it would require a complete overhaul of the 
libssh2_knownhost_readline function... And i dislike having to rewrite a 
big portion of code just to make a patch.

Anyway, I hope I could provide a patch soon.

Pierre-yves
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Wed Mar  2 14:11:47 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p22DBWhk008075;
	Wed, 2 Mar 2011 14:11:44 +0100
Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com
	[209.85.216.54])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p22DBTj8008056
	(version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Wed, 2 Mar 2011 14:11:30 +0100
Received: by qwj8 with SMTP id 8so5216695qwj.41
	for <libssh2-devel@cool.haxx.se>; Wed, 02 Mar 2011 05:11:25 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=googlemail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:content-type
	:content-transfer-encoding;
	bh=Z/wcFKS0++NFdQiRmEGX3YAaCERHhFW8rVbS+9zO0qs=;
	b=LVWI18xWuzU0Q/v63UjD3PSRuvfo2RYlNtl0XAQckl+0f0mrvF6xgqLwTwEvWVdvhd
	BOxj+MfsIMZUFPaYum9cP4zOaoH3ErlegQRpKh7ivEum3SDF0iHG2bbvihJVWiDyRsjE
	kmld1IaZpeHV0swew+4W4gSpFBj7paP9p2IOY=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:content-type
	:content-transfer-encoding;
	b=RQVSHPxl/9Wy19qqS8jRtR0T2cyEvQxjZhPD/rKGT4f2Ap9VRBbnszKZ0vAmcwV5F/
	LPvjMdADnXD6CSL+r8gpTj+f7Ab4fEumuAJBSQynINNNrW9J/SNDpkWJaqRveSCFrxZQ
	xCjH2o8tks+wZ5guvys7+UkcYGFGNtWiWB7sg=
MIME-Version: 1.0
Received: by 10.229.235.143 with SMTP id kg15mr6518540qcb.17.1299071484975;
	Wed, 02 Mar 2011 05:11:24 -0800 (PST)
Received: by 10.229.29.197 with HTTP; Wed, 2 Mar 2011 05:11:24 -0800 (PST)
In-Reply-To: <4D6E353C.6050605@cc.in2p3.fr>
References: <4D6E0DD8.1040206@cc.in2p3.fr>
	<AANLkTin5qdBOQpG=Jsx5kSJbgZ=ma_kEmrwa=ku9xYTD@mail.gmail.com>
	<4D6E353C.6050605@cc.in2p3.fr>
Date: Wed, 2 Mar 2011 13:11:24 +0000
X-Google-Sender-Auth: sV3EM2sBu0pqSWPuPatvSjk8bHY
Message-ID: <AANLkTikxK1iy-AbKpFn07VcvG=pg_hLeC1zVt3cbUUTQ@mail.gmail.com>
Subject: Re: Problem with known_hosts
From: Alexander Lamaison <swish@lammy.co.uk>
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Wed, 02 Mar 2011 14:11:47 +0100 (CET)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Wed, 02 Mar 2011 14:11:30 +0100 (CET)
X-MIME-Autoconverted: from quoted-printable to 8bit by giant.haxx.se id
	p22DBTj8008056
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="iso-8859-1"
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by giant.haxx.se id p22DBWhk008075

On 2 March 2011 12:17, Pierre-Yves Fontaniere <pyf@cc.in2p3.fr> wrote:
> On 03/02/2011 10:48 AM, Alexander Lamaison wrote:
>>>
>>> I'm using libssh2 1.2.7 on AIX 6.1 / 5.3
>>>
>>> Is it a bug or am i doing something wrong ?
>>>
>>
>> It's a bug.  There are two possible solutions.
>>
>> The rougher, easier fix would be to modify libssh2 so that it can
>> process an arbitrary number of comma-separated aliases and creates a
>> new entry for each one.
>>
>> The much nicer fix would be to modify the knownhost handling so that
>> it explicitly supports alias lists and doesn't split them into
>> separate entries.  This means libssh2 could read in and write out any
>> known_hosts file and there should be no difference between the before
>> and after.
>>
>> Unfortunately, I'm snowed under with work and don't have time to look
>> at this.  Patches welcome :)
>>
>
> I'm already working on a patch :) , but if I try to follow the description i
> found here :
> http://www.openbsd.org/cgi-bin/man.cgi?query=sshd&sektion=8
> Wild cards, revoked keys ... I think it will take years before seeing it. :)

Don't try to do it all at once!  OpenSSH didn't.  Why should you/we?
As you can see, the known_hosts support so far has been added
incrementally.

> From what I see, it would require a complete overhaul of the
> libssh2_knownhost_readline function... And i dislike having to rewrite a big
> portion of code just to make a patch.

Yes, this is one of the problems with the second approach I outlined;
I can't see a way to do it without an API change and we can't make
those changes willy-nilly.  We have to store them up and so them all
at once.

> Anyway, I hope I could provide a patch soon.

Great :)

Alex
--
Easy SFTP for Windows Explorer (http://www.swish-sftp.org)

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Wed Mar  2 15:04:37 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p22E4J69009133;
	Wed, 2 Mar 2011 15:04:35 +0100
Received: from mail.bassetglobal.com (mail.basset.se [193.13.246.197])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p22E4H6M009030
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Wed, 2 Mar 2011 15:04:17 +0100
Received: from [10.10.21.240] ([10.10.21.240])
	(authenticated user patrik.thunstrom@bassetglobal.com)
	by mail.bassetglobal.com
	(using TLSv1/SSLv3 with cipher AES256-SHA (256 bits))
	for libssh2-devel@cool.haxx.se; Wed, 2 Mar 2011 15:06:46 +0100
Message-ID: <4D6E4EF6.4040008@bassetglobal.com>
Date: Wed, 02 Mar 2011 15:06:46 +0100
From: =?ISO-8859-1?Q?Patrik_Thunstr=F6m?= <patrik.thunstrom@bassetglobal.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; sv-SE;
	rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: libssh2 development <libssh2-devel@cool.haxx.se>
Subject: Re: Spammers have discovered trac.libssh2.org
References: <009401cbd851$59fa0820$0dee1860$@com>	<20110301214122.19271.qmail@stuge.se>
	<AANLkTim7vboT9td-c2C1Rfv+Uh93Yt+xVK2Cy3U9mzYH@mail.gmail.com>
In-Reply-To: <AANLkTim7vboT9td-c2C1Rfv+Uh93Yt+xVK2Cy3U9mzYH@mail.gmail.com>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Wed, 02 Mar 2011 15:04:37 +0100 (CET)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Wed, 02 Mar 2011 15:04:17 +0100 (CET)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

Alexander Lamaison skrev 2011-03-01 22:54:
> On 1 March 2011 21:41, Peter Stuge<peter@stuge.se>  wrote:
>> Hey everyone,
>>
>> Mark Riordan wrote:
>>> Alas, it seems that bad guys have discovered a way to spam us.
>> Yeah. I've deleted the tickets, but they can of course create new.
>>
>> The spam thing is pretty much impossible to solve perfectly in an
>> automated way.
> To solve 100%, yes impossible.  To reduce greatly, no.
>
> ...
>
> Alex

With the risk of coming across as a spammer, this is what sprung to my 
mind:

http://xkcd.com/810/

And as always, the mouse over text on xkcd is half the point. :)

/ Patrik

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Wed Mar  2 16:22:32 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p22FMGIA021745;
	Wed, 2 Mar 2011 16:22:29 +0100
Received: from ccsrelay01.in2p3.fr (ccsrelay01.in2p3.fr [134.158.66.51])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p22FMEHH021620
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Wed, 2 Mar 2011 16:22:15 +0100
Received: from [134.158.71.82] (cceagle2.in2p3.fr [134.158.71.82])
	(authenticated bits=0)
	by ccsrelay01.in2p3.fr (8.14.2/8.14.2/IN2P3) with ESMTP id
	p22FM9Zn022002
	(version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO)
	for <libssh2-devel@cool.haxx.se>; Wed, 2 Mar 2011 16:22:11 +0100
X-Virus-Status: Clean
X-Virus-Scanned: clamav-milter 0.97 at ccsrelay01
Message-ID: <4D6E60A1.6050603@cc.in2p3.fr>
Date: Wed, 02 Mar 2011 16:22:09 +0100
From: Pierre-Yves Fontaniere <pyf@cc.in2p3.fr>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US;
	rv:1.9.1.16) Gecko/20101227 Icedove/3.0.11
MIME-Version: 1.0
To: libssh2-devel@cool.haxx.se
Subject: Re: Problem with known_hosts
References: <4D6E0DD8.1040206@cc.in2p3.fr>	<AANLkTin5qdBOQpG=Jsx5kSJbgZ=ma_kEmrwa=ku9xYTD@mail.gmail.com>	<4D6E353C.6050605@cc.in2p3.fr>
	<AANLkTikxK1iy-AbKpFn07VcvG=pg_hLeC1zVt3cbUUTQ@mail.gmail.com>
In-Reply-To: <AANLkTikxK1iy-AbKpFn07VcvG=pg_hLeC1zVt3cbUUTQ@mail.gmail.com>
Content-Type: multipart/mixed; boundary="------------080002030401090200060207"
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Wed, 02 Mar 2011 16:22:32 +0100 (CET)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Wed, 02 Mar 2011 16:22:15 +0100 (CET)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

This is a multi-part message in MIME format.
--------------080002030401090200060207
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

On 03/02/2011 02:11 PM, Alexander Lamaison wrote:
>> Anyway, I hope I could provide a patch soon.
>>      
> Great :)
>    
I'm not really used to provide patches, and i'm working on AIX also, so 
the way of doing a patch is somewhat different :)
File provided is from a "diff -c".

I added :
  - A little section to skip '@' begining lines instead of handling them 
as an hostname.
  - Some lines to really remove ending '\n' directly when reading lines 
from knownhosts file.
  - A section to handle correctly multiple hostnames, aliases, IP addr 
on the same line in knownhosts file.

Hope it will be OK for you.

Thanks
Pierre-yves

--------------080002030401090200060207
Content-Type: text/x-patch;
 name="libssh2_1.2.7_knownhost.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="libssh2_1.2.7_knownhost.patch"

*** knownhost.c	Wed Mar  2 16:00:13 2011
--- knownhost_patched.c	Wed Mar  2 15:59:41 2011
***************
*** 582,587 ****
--- 582,588 ----
  {
      const char *p;
      const char *orig = host;
+     const char *sechost = NULL;
      const char *salt = NULL;
      const char *comment = NULL;
      size_t commentlen = 0;
***************
*** 722,738 ****
      }
  
      if(sep) {
!         /* The second host after the comma, add this first. Copy it to the
!            temp buffer and zero terminate */
!         memcpy(hostbuf, sep, seplen);
!         hostbuf[seplen]=0;
  
!         rc = knownhost_add(hosts, hostbuf, salt, key, keylen,
!                            comment, commentlen,
!                            type | LIBSSH2_KNOWNHOST_KEYENC_BASE64,
!                            NULL);
!         if(rc)
!             return rc;
      }
  
      if (!salt)
--- 723,761 ----
      }
  
      if(sep) {
!         /* The other host names after the comma, add this first. Copy it 
!          * to the temp buffer and zero terminate */
!         size_t sechost_len;
!          
!         sechost = sep;
!         while ((sechost = memchr(sep, ',', seplen)) != NULL) {
!             sechost_len = sechost-sep+1;
!             memcpy(hostbuf, sep, sechost_len );
!             hostbuf[sechost_len-1] = 0;
!             rc = knownhost_add(hosts, hostbuf, salt, key, keylen,     
!                                 comment, commentlen,                   
!                                 type | LIBSSH2_KNOWNHOST_KEYENC_BASE64,
!                                 NULL);                                 
!             
!             if(rc)
!                 return rc;
  
!             sep = sechost +1;
!             seplen -= sechost_len;
!         }
!         if (sep && seplen>0) {
!             memcpy(hostbuf, sep,seplen);
!             hostbuf[seplen]=0;
!             rc = knownhost_add(hosts, hostbuf, salt, key, keylen,      
!                                 comment, commentlen,                   
!                                 type | LIBSSH2_KNOWNHOST_KEYENC_BASE64,
!                                 NULL);                                 
!                                                                        
!            if(rc)                                                     
!                return rc;                                             
! 
!         }
!         
      }
  
      if (!salt)
***************
*** 793,799 ****
                                "store");
  
      cp = line;
! 
      /* skip leading whitespaces */
      while(len && ((*cp==' ') || (*cp == '\t'))) {
          cp++;
--- 816,826 ----
                                "store");
  
      cp = line;
!     
!     /* Markers handle is not implemented yet */
!     if (*cp == '@')
!         return LIBSSH2_ERROR_NONE;
!     
      /* skip leading whitespaces */
      while(len && ((*cp==' ') || (*cp == '\t'))) {
          cp++;
***************
*** 829,844 ****
      keyp = cp; /* the key starts here */
      keylen = len;
  
-     /* check if the line (key) ends with a newline and if so kill it */
-     while(len && *cp && (*cp != '\n')) {
-         cp++;
-         len--;
-     }
- 
-     /* zero terminate where the newline is */
-     if(*cp == '\n')
-         keylen--; /* don't include this in the count */
- 
      /* deal with this one host+key line */
      rc = hostline(hosts, hostp, hostlen, keyp, keylen);
      if(rc)
--- 856,861 ----
***************
*** 863,868 ****
--- 880,886 ----
      FILE *file;
      int num = 0;
      char buf[2048];
+     char *lastnewline;
  
      if(type != LIBSSH2_KNOWNHOST_FILE_OPENSSH)
          return _libssh2_error(hosts->session,
***************
*** 873,878 ****
--- 891,902 ----
      file = fopen(filename, "r");
      if(file) {
          while(fgets(buf, sizeof(buf), file)) {
+             /* Search for an ending newline*/
+             lastnewline = strrchr(buf,'\n');
+             /* Replace it by a \0 if it exists */
+             if (lastnewline != NULL)
+                 *lastnewline = '\0';
+ 
              if(libssh2_knownhost_readline(hosts, buf, strlen(buf), type))
                  break;
              num++;

--------------080002030401090200060207
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

--------------080002030401090200060207--

From libssh2-devel-bounces@cool.haxx.se  Thu Mar  3 11:22:32 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p23AM6Br017827;
	Thu, 3 Mar 2011 11:22:28 +0100
Received: from mail-yi0-f54.google.com (mail-yi0-f54.google.com
	[209.85.218.54])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p23AM3Hj017595
	(version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Thu, 3 Mar 2011 11:22:04 +0100
Received: by yie12 with SMTP id 12so393317yie.41
	for <libssh2-devel@cool.haxx.se>; Thu, 03 Mar 2011 02:21:58 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:date:message-id:subject:from:to
	:content-type; bh=wYWMqXlyfaHZVx4Q/s6bI7swjLl/3a++cV2uE/lQNyM=;
	b=Jk5mTjL77B5KyN+YUNjg1StjiIbMSWoGkeM65SDw/sLn6/B9oJ2K0Slq/VZW8IyClV
	NAcrwOscfAjOP/9Bu6LBIHFD9fZUf5ZhTKyxqVCJeUlHQeyy62cmPLhTO9JAItZ0vJNY
	sT+nSufms/4UywBxE5fFodsaIyMmcUGk4wBCY=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:date:message-id:subject:from:to:content-type;
	b=g8O383hehgxeIeSpyRFM8eqH+ce6JEj2awI8Drby0P1EWW39mO1NpWjlZTS+FcT9Aw
	5vy4jCmit0UCmmt+wfnDgghgEdJTSdszTFq6oSjGXwQ1j6Nz8SasRrLm2H1qVjfXNH7z
	OVEKbL5JjVE6ZSL6UigXjscnkxA5Bb8qmDR2k=
MIME-Version: 1.0
Received: by 10.150.238.2 with SMTP id l2mr1493710ybh.364.1299147718193; Thu,
	03 Mar 2011 02:21:58 -0800 (PST)
Received: by 10.147.99.10 with HTTP; Thu, 3 Mar 2011 02:21:58 -0800 (PST)
Date: Thu, 3 Mar 2011 15:51:58 +0530
Message-ID: <AANLkTikWKvz9O8bjbKrdyNnH54ozetM_yWm0GmwiZr=8@mail.gmail.com>
Subject: Small binary files are getting transferred but not the larger ones in
	libssh2 SFTP
From: kali muthu <direct2kali@gmail.com>
To: libssh2-devel@cool.haxx.se
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Thu, 03 Mar 2011 11:22:32 +0100 (CET)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Thu, 03 Mar 2011 11:22:04 +0100 (CET)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============0656841578=="
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

--===============0656841578==
Content-Type: multipart/alternative; boundary=000e0cd34de440f463049d91663b

--000e0cd34de440f463049d91663b
Content-Type: text/plain; charset=ISO-8859-1

Hi,
I am using the libssh2_sftp_read() to read the remote server files which are
binary. I am using the session in non-blocking mode. I can able to transfer
text files and smaller binary files.

When I transfer a binary file of size of 2437 bytes, it gets transferred
completely. While another binary file of size around 36 MB, I am not able to
obtain the entire contents. The received file has bits and pieces of data
from the original file. The received file has a size of just around 3 KBs. I
am using the below sinppet for reading the contents.

do{
readStatus = libssh2_sftp_read(m_sftpHandle,buffer,1024);
}while(readStatus == LIBSSH2_ERROR_EAGAIN);

But the text files irrespective of their size are getting transferred
completely. The problem arises only for large binary files. Any pointers
regarding this are welcome.
-- 
Regards,
Kali

--000e0cd34de440f463049d91663b
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hi,<div>I am using the=A0libssh2_sftp_read() to read the remote server file=
s which are binary. I am using the session in non-blocking mode. I can able=
 to transfer text files and smaller binary files.</div><div><br></div><div>
When I transfer a binary file of size of 2437 bytes, it gets transferred co=
mpletely. While another binary file of size around 36 MB, I am not able to =
obtain the entire contents. The received file has bits and pieces of data f=
rom the original file. The received file has a size of just around 3 KBs. I=
 am using the below sinppet for reading the contents.</div>
<div><br></div><div>           do{<br>readStatus =3D libssh2_sftp_read(m_sf=
tpHandle,buffer,1024);<br>}while(readStatus =3D=3D LIBSSH2_ERROR_EAGAIN);</=
div><div><br></div><div>But the text files irrespective of their size are g=
etting transferred completely. The problem arises only for large binary fil=
es. Any pointers regarding this are welcome.<br>
-- <br>Regards,<br>Kali<br>
</div>

--000e0cd34de440f463049d91663b--

--===============0656841578==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

--===============0656841578==--

From libssh2-devel-bounces@cool.haxx.se  Thu Mar  3 11:41:25 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p23AfI2F028076;
	Thu, 3 Mar 2011 11:41:24 +0100
Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com
	[209.85.210.182])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p23AfFcI027963
	(version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Thu, 3 Mar 2011 11:41:16 +0100
Received: by iyj12 with SMTP id 12so954889iyj.41
	for <libssh2-devel@cool.haxx.se>; Thu, 03 Mar 2011 02:41:12 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:reply-to:in-reply-to:references
	:from:date:message-id:subject:to:content-type;
	bh=y+kpTuU+xiJx+313mnohx9++AQxt+zVRHeS2KFkTi40=;
	b=Gt90S7aYcyO4tDPV0uLdYIlQLyjLEXFMJMInBwy9+GzJ+9qvxCnLMX+jJETUmtfGMe
	XZ9Pvtc1Q5h6pyX0YnUCF5zVpf6u2zg0JneKLhQOnybc0CIugwFWHuVsjSdAQY9/eP4w
	MjANNs6+/pwgExTy6tBPx2kOkKTUSaW+eAsS0=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:reply-to:in-reply-to:references:from:date:message-id
	:subject:to:content-type;
	b=si+MxfXVIAIeRQD6ud4L3dFdI5y2TSYID0yzXyvbUY8EfH+yexOXssRNwe484a9314
	tX/Yj+gkL4q/CDH9M40XH4X+JIt4ah95gvxmK0i2NqIieHnmlK8q1sfkH2WDd57wEZLx
	o08o/a1CrV4HHPvnVgPDl6hOlkXzO6hMghR0E=
Received: by 10.42.19.130 with SMTP id c2mr1378899icb.96.1299148872323; Thu,
	03 Mar 2011 02:41:12 -0800 (PST)
MIME-Version: 1.0
Received: by 10.42.227.138 with HTTP; Thu, 3 Mar 2011 02:40:51 -0800 (PST)
In-Reply-To: <AANLkTikMPeqeBniPBnXc2WU0xeauFp32iTOZaEEzt8yC@mail.gmail.com>
References: <AANLkTimu7K2cnru8GMA2wSMKzQ7coBypM_Lp813EJGRO@mail.gmail.com>
	<AANLkTikMPeqeBniPBnXc2WU0xeauFp32iTOZaEEzt8yC@mail.gmail.com>
From: Zhu Bicen <zhubicen@gmail.com>
Date: Thu, 3 Mar 2011 18:40:52 +0800
Message-ID: <AANLkTi=dx3sj90G4p6ER8P2=W1u7=D2qv=dQeYo84r2m@mail.gmail.com>
Subject: Re: I want to know how to compile these source code under the
	libssh2/example?
To: libssh2-devel@cool.haxx.se
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Thu, 03 Mar 2011 11:41:25 +0100 (CET)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Thu, 03 Mar 2011 11:41:17 +0100 (CET)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: zhubicen@gmail.com, libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============1069367332=="
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

--===============1069367332==
Content-Type: multipart/alternative; boundary=20cf301d42280b9239049d91abab

--20cf301d42280b9239049d91abab
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

I want to say this error "configure: error: cannot run C compiled programs"
is caused by the incorrect version of cygwin1.dll.
Reinstall the base-cygwin solved this issue.

2011/3/2 Zhu Bicen <zhubicen@gmail.com>

> And I also tried this:
>  bzhu@5M42X2X  /usr/src/libssh2-1.2.5/example
> $ gcc scp.c
> scp.c:7:28: error: libssh2_config.h: No such file or directory
> scp.c: In function =E2=80=98main=E2=80=99:
> scp.c:39: error: storage size of =E2=80=98sin=E2=80=99 isn=E2=80=99t know=
n
> scp.c:81: error: =E2=80=98AF_INET=E2=80=99 undeclared (first use in this =
function)
> scp.c:81: error: (Each undeclared identifier is reported only once
> scp.c:81: error: for each function it appears in.)
> scp.c:81: error: =E2=80=98SOCK_STREAM=E2=80=99 undeclared (first use in t=
his function)
> scp.c:87: error: invalid application of =E2=80=98sizeof=E2=80=99 to incom=
plete type =E2=80=98struct
> sockaddr_in=E2=80=99
>
>
> 2011/3/2 Zhu Bicen <zhubicen@gmail.com>
>
> I'm newbie to use libssh2. I have installed the libssh2 by running the cy=
gwin
>> setup.exe.
>> After that I found related files installed under dir /lib, and
>> /usr/include.
>> and the source of libssh2 had been installed under
>> /usr/src/libssh2-1.2.5.tar.gz.
>>
>> From the doc of libssh2 website, I know the some example code is in the
>> src tarball. so I extract the tarball.
>>
>> *Now I want to know how to compile these source code under the
>> libssh2/example?*
>> -rw-r--r-- 1 bzhu Domain Users   439 Feb  4  2010 Makefile.am
>> -rw-r--r-- 1 bzhu Domain Users 22405 Mar 24  2010 Makefile.in
>> -rw-r--r-- 1 bzhu Domain Users  8246 Mar 24  2010 direct_tcpip.c
>> -rw-r--r-- 1 bzhu Domain Users  5997 Mar 24  2010 libssh2_config.h.in
>> -rw-r--r-- 1 bzhu Domain Users  4464 Mar 24  2010 scp.c
>> -rw-r--r-- 1 bzhu Domain Users  7373 Mar 24  2010 scp_nonblock.c
>> -rw-r--r-- 1 bzhu Domain Users  5647 Mar 24  2010 scp_write.c
>> -rw-r--r-- 1 bzhu Domain Users  6379 Mar 24  2010 scp_write_nonblock.c
>> -rw-r--r-- 1 bzhu Domain Users  6920 Mar 24  2010 sftp.c
>> -rw-r--r-- 1 bzhu Domain Users  8123 Mar 24  2010 sftp_RW_nonblock.c
>> -rw-r--r-- 1 bzhu Domain Users  4497 Mar 24  2010 sftp_mkdir.c
>> -rw-r--r-- 1 bzhu Domain Users  4685 Mar 24  2010 sftp_mkdir_nonblock.c
>> -rw-r--r-- 1 bzhu Domain Users  7639 Mar 24  2010 sftp_nonblock.c
>> -rw-r--r-- 1 bzhu Domain Users  5549 Mar 24  2010 sftp_write.c
>> -rw-r--r-- 1 bzhu Domain Users  6221 Mar 24  2010 sftp_write_nonblock.c
>> -rw-r--r-- 1 bzhu Domain Users  6193 Mar 24  2010 sftpdir.c
>> -rw-r--r-- 1 bzhu Domain Users  6725 Mar 24  2010 sftpdir_nonblock.c
>> -rw-r--r-- 1 bzhu Domain Users  7453 Mar 24  2010 ssh2.c
>> -rw-r--r-- 1 bzhu Domain Users  6554 Mar 24  2010 ssh2_agent.c
>> -rw-r--r-- 1 bzhu Domain Users  7866 Mar 24  2010 ssh2_exec.c
>>
>> Although I don't want to build the whole library,
>> I have tried running the ./configure under the src top dir. But error
>> occurs:
>>  bzhu@5M42X2X  /usr/src/libssh2-1.2.5
>> $ ./configure
>> checking whether to enable maintainer-specific portions of Makefiles... =
no
>> checking for sed... /usr/bin/sed
>> checking for a BSD-compatible install... /usr/bin/install -c
>> checking whether build environment is sane... yes
>> checking for gawk... gawk
>> checking whether make sets $(MAKE)... yes
>> checking libssh2 version... 1.2.5
>> checking build system type... i686-pc-cygwin
>> checking host system type... i686-pc-cygwin
>> configure: autobuild project... libssh2
>> configure: autobuild revision... 1.2.5
>> configure: autobuild hostname... 5M42X2X
>> configure: autobuild timestamp... 20110302-143722
>> checking for style of include used by make... GNU
>> checking for gcc... gcc
>> checking whether the C compiler works... yes
>> checking for C compiler default output file name... a.exe
>> checking for suffix of executables... .exe
>> checking whether we are cross compiling... configure: error: in
>> `/usr/src/libssh2-1.2.5':
>> configure: error: cannot run C compiled programs.
>> If you meant to cross compile, use `--host'.
>> See `config.log' for more details.
>>
>>
>> Thanks in advance.
>>
>> --
>> Best Regards
>> Bicen Zhu
>>
>
>
>
> --
> Best Regards
> Bicen Zhu
>



--=20
Best Regards
Bicen Zhu

--20cf301d42280b9239049d91abab
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<br><span class=3D"Apple-style-span" style=3D"border-collapse: collapse; co=
lor: rgb(255, 0, 0); font-family: &#39;Droid Sans&#39;, arial, sans-serif; =
font-size: 13px; ">I want to say this error &quot;configure: error: cannot =
run C compiled programs&quot; is caused by the incorrect version of cygwin1=
.dll.=C2=A0</span><div>

<font class=3D"Apple-style-span" color=3D"#FF0000" face=3D"&#39;Droid Sans&=
#39;, arial, sans-serif"><span class=3D"Apple-style-span" style=3D"border-c=
ollapse: collapse;">Reinstall the base-cygwin solved this issue.</span></fo=
nt></div>

<div><font class=3D"Apple-style-span" color=3D"#FF0000" face=3D"&#39;Droid =
Sans&#39;, arial, sans-serif"><span class=3D"Apple-style-span" style=3D"bor=
der-collapse: collapse;"><br></span></font></div><div><div class=3D"gmail_q=
uote">2011/3/2 Zhu Bicen <span dir=3D"ltr">&lt;<a href=3D"mailto:zhubicen@g=
mail.com">zhubicen@gmail.com</a>&gt;</span><br>

<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex;">And I also tried this:<div><div>=C2=A0bzhu@=
5M42X2X =C2=A0/usr/src/libssh2-1.2.5/example</div><div><font color=3D"#ff00=
00">$ gcc scp.c</font></div>

<div>scp.c:7:28: <font color=3D"#ff0000">error: libssh2_config.h: No such f=
ile or directory</font></div>
<div>scp.c: In function =E2=80=98main=E2=80=99:</div><div>scp.c:39: error: =
storage size of =E2=80=98sin=E2=80=99 isn=E2=80=99t known</div><div>scp.c:8=
1: error: =E2=80=98AF_INET=E2=80=99 undeclared (first use in this function)=
</div><div>scp.c:81: error: (Each undeclared identifier is reported only on=
ce</div>


<div>scp.c:81: error: for each function it appears in.)</div><div>scp.c:81:=
 error: =E2=80=98SOCK_STREAM=E2=80=99 undeclared (first use in this functio=
n)</div><div>scp.c:87: error: invalid application of =E2=80=98sizeof=E2=80=
=99 to incomplete type =E2=80=98struct sockaddr_in=E2=80=99</div>


<div><br></div><br><div class=3D"gmail_quote">2011/3/2 Zhu Bicen <span dir=
=3D"ltr">&lt;<a href=3D"mailto:zhubicen@gmail.com" target=3D"_blank">zhubic=
en@gmail.com</a>&gt;</span><div><div></div><div class=3D"h5"><br><blockquot=
e class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc sol=
id;padding-left:1ex">


I&#39;m newbie to use libssh2. I have installed the libssh2 by running the =
<font color=3D"#ff0000">cygwin </font>setup.exe.<div>After that I found rel=
ated files installed under dir /lib, and /usr/include.</div>
<div>and the source of libssh2 had been installed under /usr/src/libssh2-1.=
2.5.tar.gz.</div><div><br></div><div>From the doc of libssh2 website, I kno=
w the some example code is in the src tarball. so I extract the tarball.</d=
iv>



<div><br></div><div><font color=3D"#ff0000"><b>Now I want to know how to co=
mpile these source code under the libssh2/example?</b></font></div><div><di=
v>-rw-r--r-- 1 bzhu Domain Users =C2=A0 439 Feb =C2=A04 =C2=A02010 Makefile=
.am</div>
<div>-rw-r--r-- 1 bzhu Domain Users 22405 Mar 24 =C2=A02010 Makefile.in</di=
v><div>-rw-r--r-- 1 bzhu Domain Users =C2=A08246 Mar 24 =C2=A02010 direct_t=
cpip.c</div><div>-rw-r--r-- 1 bzhu Domain Users =C2=A05997 Mar 24 =C2=A0201=
0 <a href=3D"http://libssh2_config.h.in" target=3D"_blank">libssh2_config.h=
.in</a></div>



<div>-rw-r--r-- 1 bzhu Domain Users =C2=A04464 Mar 24 =C2=A02010 scp.c</div=
><div>-rw-r--r-- 1 bzhu Domain Users =C2=A07373 Mar 24 =C2=A02010 scp_nonbl=
ock.c</div><div>-rw-r--r-- 1 bzhu Domain Users =C2=A05647 Mar 24 =C2=A02010=
 scp_write.c</div><div>-rw-r--r-- 1 bzhu Domain Users =C2=A06379 Mar 24 =C2=
=A02010 scp_write_nonblock.c</div>



<div>-rw-r--r-- 1 bzhu Domain Users =C2=A06920 Mar 24 =C2=A02010 sftp.c</di=
v><div>-rw-r--r-- 1 bzhu Domain Users =C2=A08123 Mar 24 =C2=A02010 sftp_RW_=
nonblock.c</div><div>-rw-r--r-- 1 bzhu Domain Users =C2=A04497 Mar 24 =C2=
=A02010 sftp_mkdir.c</div><div>



-rw-r--r-- 1 bzhu Domain Users =C2=A04685 Mar 24 =C2=A02010 sftp_mkdir_nonb=
lock.c</div><div>-rw-r--r-- 1 bzhu Domain Users =C2=A07639 Mar 24 =C2=A0201=
0 sftp_nonblock.c</div><div>-rw-r--r-- 1 bzhu Domain Users =C2=A05549 Mar 2=
4 =C2=A02010 sftp_write.c</div>



<div>-rw-r--r-- 1 bzhu Domain Users =C2=A06221 Mar 24 =C2=A02010 sftp_write=
_nonblock.c</div><div>-rw-r--r-- 1 bzhu Domain Users =C2=A06193 Mar 24 =C2=
=A02010 sftpdir.c</div><div>-rw-r--r-- 1 bzhu Domain Users =C2=A06725 Mar 2=
4 =C2=A02010 sftpdir_nonblock.c</div>



<div>-rw-r--r-- 1 bzhu Domain Users =C2=A07453 Mar 24 =C2=A02010 ssh2.c</di=
v><div>-rw-r--r-- 1 bzhu Domain Users =C2=A06554 Mar 24 =C2=A02010 ssh2_age=
nt.c</div><div>-rw-r--r-- 1 bzhu Domain Users =C2=A07866 Mar 24 =C2=A02010 =
ssh2_exec.c</div><div><br>



</div><div>Although I don&#39;t want to build the whole library,=C2=A0</div=
><div>I have tried running the ./configure under the src top dir. But error=
 occurs:</div><div><div>=C2=A0bzhu@5M42X2X =C2=A0/usr/src/libssh2-1.2.5</di=
v><div>$ ./configure</div>



<div>checking whether to enable maintainer-specific portions of Makefiles..=
. no</div><div>checking for sed... /usr/bin/sed</div><div>checking for a BS=
D-compatible install... /usr/bin/install -c</div><div>checking whether buil=
d environment is sane... yes</div>



<div>checking for gawk... gawk</div><div>checking whether make sets $(MAKE)=
... yes</div><div>checking libssh2 version... 1.2.5</div><div>checking buil=
d system type... i686-pc-cygwin</div><div>checking host system type... i686=
-pc-cygwin</div>



<div>configure: autobuild project... libssh2</div><div>configure: autobuild=
 revision... 1.2.5</div><div>configure: autobuild hostname... 5M42X2X</div>=
<div>configure: autobuild timestamp... 20110302-143722</div><div>checking f=
or style of include used by make... GNU</div>



<div>checking for gcc... gcc</div><div>checking whether the C compiler work=
s... yes</div><div>checking for C compiler default output file name... a.ex=
e</div><div>checking for suffix of executables... .exe</div><div>checking w=
hether we are cross compiling... configure: error: in `/usr/src/libssh2-1.2=
.5&#39;:</div>



<div><font color=3D"#ff0000">configure: error: cannot run C compiled progra=
ms.</font></div><div>If you meant to cross compile, use `--host&#39;.</div>=
<div>See `config.log&#39; for more details.</div>
</div><div><br></div><div><br></div><div>Thanks in advance.</div><div><br><=
/div>-- <br>Best Regards<br>Bicen Zhu<br>
</div>
</blockquote></div></div></div><br><br clear=3D"all"><br>-- <br>Best Regard=
s<br>Bicen Zhu<br>
</div>
</blockquote></div><br><br clear=3D"all"><br>-- <br>Best Regards<br>Bicen Z=
hu<br>
</div>

--20cf301d42280b9239049d91abab--

--===============1069367332==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

--===============1069367332==--

From libssh2-devel-bounces@cool.haxx.se  Thu Mar  3 14:07:02 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p23D6k3v012060;
	Thu, 3 Mar 2011 14:07:00 +0100
Received: from mail-ew0-f54.google.com (mail-ew0-f54.google.com
	[209.85.215.54])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p23D6jMP012048
	(version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Thu, 3 Mar 2011 14:06:45 +0100
Received: by ewy28 with SMTP id 28so391964ewy.41
	for <libssh2-devel@cool.haxx.se>; Thu, 03 Mar 2011 05:06:42 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:in-reply-to:references:date
	:message-id:subject:from:to:cc:content-type
	:content-transfer-encoding;
	bh=39MNaIyZqAELF7rzhNSfjIiTpinkOZe2VvPsQWDJHBs=;
	b=P50IFshkdfUXcrIyzYQfxasuwOqyMYPbeh2HjfbNKDA0cQ43M1m7GiEqjuYCTKSWKM
	fIHZMPRaM13Zy1axNvUDUmVLPWX1zeD9/VwaEjg1cnfIG/NgYLn7BI4hHXJkeSRf+RUc
	XaVaSAR0MQY2vuO8H+IyU9A/1ZEUVNk1ycq7Y=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type:content-transfer-encoding;
	b=fn5yhzLcfOcDxGo30miBpxezGaaK/VB3ifL1+bfpyTCCKQpYzugyhHC09ff+PM+QzE
	13AcVv+2NZIiQXKrjY3ayzmqaADXqDYdCrqUEVAP32/EsJe416qegSlh/pOA8blmM+DR
	W//M276sgkrFF8b/ktwd86DgX+FOOcfo5bQAI=
MIME-Version: 1.0
Received: by 10.213.32.15 with SMTP id a15mr434794ebd.24.1299157601102; Thu,
	03 Mar 2011 05:06:41 -0800 (PST)
Received: by 10.213.7.16 with HTTP; Thu, 3 Mar 2011 05:06:41 -0800 (PST)
In-Reply-To: <20110301151550.25972.qmail@stuge.se>
References: <AANLkTi=-b1moZSRq7qdX8GbBiWSBeBZZeMnqkYTvgjcj@mail.gmail.com>
	<20110301151550.25972.qmail@stuge.se>
Date: Thu, 3 Mar 2011 18:36:41 +0530
Message-ID: <AANLkTin0KxWNLcvP_K4gxX-1sPCOiyALE2EUouQXsrjT@mail.gmail.com>
Subject: Re: Login problem - Power Broker Menu
From: Naveen Sharma <writetonsharma@gmail.com>
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Thu, 03 Mar 2011 14:07:02 +0100 (CET)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Thu, 03 Mar 2011 14:06:45 +0100 (CET)
X-MIME-Autoconverted: from quoted-printable to 8bit by giant.haxx.se id
	p23D6jMP012048
Cc: Peter Stuge <peter@stuge.se>
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="utf-8"
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by giant.haxx.se id p23D6k3v012060

On Tue, Mar 1, 2011 at 8:45 PM, Peter Stuge <peter@stuge.se> wrote:
> Naveen Sharma wrote:
>> This is the sequence of code I am trying:
>>
>> libssh2_channel_open_session()
>> libssh2_channel_request_pty()
>> libssh2_channel_shell()
>> libssh2_channel_read() Â  Â  Â  Â  Â  Â  Â  // This is reading this menu.
>>
>> I am trying, libssh2_channel_write(), but this is not working.
>> Please suggest a solution.
>
> You have not provided very much information, so it is difficult to
> suggest anything.
>
> For a start, please send the exact bytes that you receive from the
> server. You are clearly not having a problem with the SSH protocol
> here, I think it is more likely that your program is not emulating
> the terminal type you claimed to support in _request_pty() completely
> or that the terminal type is not compatible with the server.
>
> Of course full libssh2 debug output would also work. Recompile the
> library specifying --enable-debug during configure and call
> libssh2_trace(session, ~0); and your program should produce very
> verbose output that will help us find your problem.
>
>
> //Peter
> _______________________________________________
> libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
>

Thanks Peter for pointing me in some direction. I have tried
libssh2_trace(), but was not able to solve my problem.
Let me try to explain the problem in detail.

here is the relevant part of code which I am trying to use and is
taken from the examples of libssh2.


//Authentication is successful before this code.

/* Request a shell */
    if (!(channel = libssh2_channel_open_session(session))) {
        fprintf(stderr, "Unable to open a session\n");
        goto shutdown;
    }

/* Request a terminal with 'vanilla' terminal emulation
     * See /etc/termcap for more options
     */
    if (libssh2_channel_request_pty(channel, "ansi")) {
        fprintf(stderr, "Failed requesting pty\n");
        goto skip_shell;
    }

    /* Open a SHELL on that pty */
    if (libssh2_channel_shell(channel)) {
        fprintf(stderr, "Unable to request shell on allocated pty\n");
        goto shutdown;
    }

/* At this point the shell can be interacted with using
     * libssh2_channel_read()
     * libssh2_channel_read_stderr()
     * libssh2_channel_write()
     * libssh2_channel_write_stderr()
     *
     * Blocking mode may be (en|dis)abled with: libssh2_channel_set_blocking()
     * If the server send EOF, libssh2_channel_eof() will return non-0
     * To send EOF to the server use: libssh2_channel_send_eof()
     * A channel can be closed with: libssh2_channel_close()
     * A channel can be freed with: libssh2_channel_free()
     */	


	do
	{
in:
		memset(buff_read,0,sizeof(buff_read));
		rc == libssh2_channel_read(channel, buff_read, sizeof(buff_read));
		fprintf (stderr, "%s", buff_read);
                                  // this prints the whole menu like
below.
	} while (rc > 0);
	if( rc == LIBSSH2_ERROR_EAGAIN )
	{
		waitsocket(sock, session);
		goto in;
	}

At this point, I am able to read the menu which asks the user to give replies.
1) Power Broker Menu
2) Change Power Broker Password
3) Change Password on this server
0) Exit

Please enter choice:

In a typical ssh session, a user will give "1" and will press enter
and will enter the shell.
I have to somehow give a "1" from the code and read what comes next.
So what I am doing is:

rc = libssh2_channel_write(channel, "1", strlen("1"));
rc = libssh2_channel_send_eof(channel);

I am doing this to send a "1" to the shell but this is not sending a
"1". I have no idea how to do this. If this is successful, then I will
read what is returned, print on the console will enter the shell.

I hope this would be more clear, what I am trying to do.

Thanks,
Naveen.

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Thu Mar  3 15:05:10 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p23E4r0T013041;
	Thu, 3 Mar 2011 15:05:09 +0100
Received: from mail-qy0-f182.google.com (mail-qy0-f182.google.com
	[209.85.216.182])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p23E4oL3012852
	(version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Thu, 3 Mar 2011 15:04:51 +0100
Received: by qyk27 with SMTP id 27so964135qyk.20
	for <libssh2-devel@cool.haxx.se>; Thu, 03 Mar 2011 06:04:46 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=googlemail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:content-type
	:content-transfer-encoding;
	bh=e3BdnR0ExrZGk2XBPRMn9RVSkjdNUZjVQD+tblOuCno=;
	b=CDDu24HQKmLTVSXguQvNbCPsJDcxqsMIC56+U/bXOwOqCzQsYJoDFvbrSDW6wStT8D
	yE3qURj62NbucvxtKk0R0scM0ER8ZITzylg9XRhA0JSrIm1TcG9adWHwKjRvO2VRCBz8
	xCE15aPSapyFUBYyhM9GTE7TtEGygxKbEtH7E=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:content-type
	:content-transfer-encoding;
	b=kg4FpcUFXDCBEKFkGF+AXXhHU2mY7avm3Eta9MqMxj4Qws0F2PkKG3CDtBeQiTUPF9
	d/i7JcrxuH+kXyqFgA/T2eewT6EAtpMuuyBlQxP1B353qemm6ZN/E2+qgRJ3XVIK3jqt
	pD332NeomshRZOQVRc3uiEKuspbIpuwa3ktyk=
MIME-Version: 1.0
Received: by 10.224.60.206 with SMTP id q14mr1082314qah.182.1299161086184;
	Thu, 03 Mar 2011 06:04:46 -0800 (PST)
Received: by 10.229.29.197 with HTTP; Thu, 3 Mar 2011 06:04:46 -0800 (PST)
In-Reply-To: <4D6E60A1.6050603@cc.in2p3.fr>
References: <4D6E0DD8.1040206@cc.in2p3.fr>
	<AANLkTin5qdBOQpG=Jsx5kSJbgZ=ma_kEmrwa=ku9xYTD@mail.gmail.com>
	<4D6E353C.6050605@cc.in2p3.fr>
	<AANLkTikxK1iy-AbKpFn07VcvG=pg_hLeC1zVt3cbUUTQ@mail.gmail.com>
	<4D6E60A1.6050603@cc.in2p3.fr>
Date: Thu, 3 Mar 2011 14:04:46 +0000
X-Google-Sender-Auth: EgqiB-l_GtPfOxssg3uvuPgUQ90
Message-ID: <AANLkTimY+XS57+qyU4UZNPsXnXubqGcsHtAC577VSBmn@mail.gmail.com>
Subject: Re: Problem with known_hosts
From: Alexander Lamaison <swish@lammy.co.uk>
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Thu, 03 Mar 2011 15:05:10 +0100 (CET)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Thu, 03 Mar 2011 15:04:52 +0100 (CET)
X-MIME-Autoconverted: from quoted-printable to 8bit by giant.haxx.se id
	p23E4oL3012852
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="iso-8859-1"
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by giant.haxx.se id p23E4r0T013041

On 2 March 2011 15:22, Pierre-Yves Fontaniere <pyf@cc.in2p3.fr> wrote:
>
> I'm not really used to provide patches, and i'm working on AIX also, so the
> way of doing a patch is somewhat different :)
> File provided is from a "diff -c".

The best way to provide the patch is using git diff.  This preserves
the log and authorship information in a way that can simply be
comitted as-is.

Failing that, please provide the patch from `diff -u`.  Context diffs
can be hard to read for humans.

>  - Some lines to really remove ending '\n' directly when reading lines from
> knownhosts file.

Can you explain a bit more about this?  What was the code doing wrong before?

>  - A section to handle correctly multiple hostnames, aliases, IP addr on the
> same line in knownhosts file.

For my testing, can you send me an example of what one of these AIX
entries with multiple aliases contains?

Thanks for the patch!  What revision is that patch against?  The
current git head?

Alex

--
Easy SFTP for Windows Explorer (http://www.swish-sftp.org)

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Thu Mar  3 15:41:17 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p23Ef2an028780;
	Thu, 3 Mar 2011 15:41:16 +0100
Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com
	[209.85.216.175])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p23EexVp028573
	(version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Thu, 3 Mar 2011 15:41:01 +0100
Received: by qyk35 with SMTP id 35so5093559qyk.20
	for <libssh2-devel@cool.haxx.se>; Thu, 03 Mar 2011 06:40:57 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=googlemail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:content-type
	:content-transfer-encoding;
	bh=wfEw/0nuTzdPU81Di/ud9zZ9rOFUdXln2FNANirE48M=;
	b=c6L6X9/NiDnvV1PcwyfQfLljHrKqdPF/pPxAzWyJL/HmD9h3FaN8umE8A5nvMBgCkh
	AFSqFM+52+HwKTzdWMdYah1fTMKSAcRkkMRP2GA87XSfPXD16edPZxXI8Ou/xJpo16N1
	D17LAZ2rBB0H2kpyqRMgm/yNZ8w/o766xEqfA=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:content-type
	:content-transfer-encoding;
	b=uemRfeASAkEne/HZlysK9KyDPzZxyfSbMhG88jKByEGmWJk10+d5ro25gmsj/VqvS5
	k/96JkLi9Sa7GFkn+klLXrneoK1nI+3RY7NBwHgGJ+2EgvHvwgjV7nqVQ1kliFsLdwan
	0iw7Lbm37YNKYe/qcSRGMx7+yh4E7QFBuNylg=
MIME-Version: 1.0
Received: by 10.224.60.206 with SMTP id q14mr1132960qah.182.1299163256205;
	Thu, 03 Mar 2011 06:40:56 -0800 (PST)
Received: by 10.229.29.197 with HTTP; Thu, 3 Mar 2011 06:40:56 -0800 (PST)
In-Reply-To: <AANLkTimY+XS57+qyU4UZNPsXnXubqGcsHtAC577VSBmn@mail.gmail.com>
References: <4D6E0DD8.1040206@cc.in2p3.fr>
	<AANLkTin5qdBOQpG=Jsx5kSJbgZ=ma_kEmrwa=ku9xYTD@mail.gmail.com>
	<4D6E353C.6050605@cc.in2p3.fr>
	<AANLkTikxK1iy-AbKpFn07VcvG=pg_hLeC1zVt3cbUUTQ@mail.gmail.com>
	<4D6E60A1.6050603@cc.in2p3.fr>
	<AANLkTimY+XS57+qyU4UZNPsXnXubqGcsHtAC577VSBmn@mail.gmail.com>
Date: Thu, 3 Mar 2011 14:40:56 +0000
X-Google-Sender-Auth: wJOt0iLyl5Stn7yIESL4XA9X2AA
Message-ID: <AANLkTin+jP-bdO+T2__SWaUAAaGAYyTXR0r+oxc32y2t@mail.gmail.com>
Subject: Re: Problem with known_hosts
From: Alexander Lamaison <swish@lammy.co.uk>
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Thu, 03 Mar 2011 15:41:17 +0100 (CET)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Thu, 03 Mar 2011 15:41:01 +0100 (CET)
X-MIME-Autoconverted: from quoted-printable to 8bit by giant.haxx.se id
	p23EexVp028573
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="iso-8859-1"
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by giant.haxx.se id p23Ef2an028780

On 3 March 2011 14:04, Alexander Lamaison <swish@lammy.co.uk> wrote:
>
> Thanks for the patch!  What revision is that patch against?  The
> current git head?

Sorry.  I see now that that was in the filename.

Alex

--
Easy SFTP for Windows Explorer (http://www.swish-sftp.org)

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Thu Mar  3 16:34:20 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p23FXImr030871;
	Thu, 3 Mar 2011 16:34:18 +0100
Received: from ccsrelay02.in2p3.fr (ccsrelay02.in2p3.fr [134.158.66.52])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p23FXDOL030808
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Thu, 3 Mar 2011 16:33:16 +0100
Received: from [134.158.71.82] (cceagle2.in2p3.fr [134.158.71.82])
	(authenticated bits=0)
	by ccsrelay02.in2p3.fr (8.14.2/8.14.2/IN2P3) with ESMTP id
	p23FXFpO031006
	(version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO)
	for <libssh2-devel@cool.haxx.se>; Thu, 3 Mar 2011 16:33:16 +0100
X-Virus-Status: Clean
X-Virus-Scanned: clamav-milter 0.97 at ccsrelay02
Message-ID: <4D6FB4BB.8020302@cc.in2p3.fr>
Date: Thu, 03 Mar 2011 16:33:15 +0100
From: Pierre-Yves Fontaniere <pyf@cc.in2p3.fr>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US;
	rv:1.9.1.16) Gecko/20101227 Icedove/3.0.11
MIME-Version: 1.0
To: libssh2-devel@cool.haxx.se
Subject: Re: Problem with known_hosts
References: <4D6E0DD8.1040206@cc.in2p3.fr>	<AANLkTin5qdBOQpG=Jsx5kSJbgZ=ma_kEmrwa=ku9xYTD@mail.gmail.com>	<4D6E353C.6050605@cc.in2p3.fr>	<AANLkTikxK1iy-AbKpFn07VcvG=pg_hLeC1zVt3cbUUTQ@mail.gmail.com>	<4D6E60A1.6050603@cc.in2p3.fr>
	<AANLkTimY+XS57+qyU4UZNPsXnXubqGcsHtAC577VSBmn@mail.gmail.com>
In-Reply-To: <AANLkTimY+XS57+qyU4UZNPsXnXubqGcsHtAC577VSBmn@mail.gmail.com>
Content-Type: multipart/mixed; boundary="------------060408010202080102040901"
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Thu, 03 Mar 2011 16:34:19 +0100 (CET)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Thu, 03 Mar 2011 16:33:17 +0100 (CET)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

This is a multi-part message in MIME format.
--------------060408010202080102040901
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

On 03/03/2011 03:04 PM, Alexander Lamaison wrote:
> On 2 March 2011 15:22, Pierre-Yves Fontaniere<pyf@cc.in2p3.fr>  wrote:
>    
>> I'm not really used to provide patches, and i'm working on AIX also, so the
>> way of doing a patch is somewhat different :)
>> File provided is from a "diff -c".
>>      
> The best way to provide the patch is using git diff.  This preserves
> the log and authorship information in a way that can simply be
> comitted as-is.
>
> Failing that, please provide the patch from `diff -u`.  Context diffs
> can be hard to read for humans.
>    
Yep I know, but there's no option -u in "AIX genuine diff" and AIX patch 
doesn't work with unified context patch... I will install GNU diff and 
patch tools . :)
I attached a diff -u patch to this mail
>>   - Some lines to really remove ending '\n' directly when reading lines from
>> knownhosts file.
>>      
> Can you explain a bit more about this?  What was the code doing wrong before?
>    
In fact, the code wasn't doing something wrong. But when i was 
debugging, i saw (with simple printf) keys with leading '\n'. So I 
thought first the problem was here. I saw later that was not the case 
but even if i know that there's no use of function like strlen in the 
code, i prefer having a '\n' leading free and zero terminated string.

libssh2_knownhost_readfile is the only place where we use something else 
than const char *. So this is the place to format every line and have 
zero terminated string without leading '\n'.
I used strrchr which take the buffer from the end and doesn't browse all 
the key from the beginning (like it is done later in 
libssh2_knownhost_readline).

I let you decide if it is an interesting modification or not. :)
>>   - A section to handle correctly multiple hostnames, aliases, IP addr on the
>> same line in knownhosts file.
>>      
> For my testing, can you send me an example of what one of these AIX
> entries with multiple aliases contains?
>    
This is not specific to AIX :) we use this kind of knownhosts entries on 
Linux, Solaris and AIX.

Entry like :

ccsmurf,ccsvli05,ccsvli05.in2p3.fr,ccsmurf.in2p3.fr,134.158.104.140 
ssh-rsa 
AAAAB3NzaC1yc2EAAAABIwAAAIEAq1iiPKlBbyw3I+wC76ugwt7DGnseVNjzjZf8y7vO+2oiuBkRMdoqh9K3oHzkiloTeAHOZH4V89nUt/WLTqKG4j4/sSwaCD9gRKwFS4me/Pnvi8zqwmF8YrLwQdTGtDZo2iz0Dt4KqAE6fQ9mQ/iTlJMFUKOed8luDDfX6Ba0lBE=

Pierre-yves

--------------060408010202080102040901
Content-Type: text/x-patch;
 name="libssh2_1.2.7_knownhost.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="libssh2_1.2.7_knownhost.patch"

--- knownhost.c	2011-03-03 16:15:33 +0100
+++ knownhost_patched.c	2011-03-02 15:59:41 +0100
@@ -582,6 +582,7 @@
 {
     const char *p;
     const char *orig = host;
+    const char *sechost = NULL;
     const char *salt = NULL;
     const char *comment = NULL;
     size_t commentlen = 0;
@@ -722,17 +723,39 @@
     }
 
     if(sep) {
-        /* The second host after the comma, add this first. Copy it to the
-           temp buffer and zero terminate */
-        memcpy(hostbuf, sep, seplen);
-        hostbuf[seplen]=0;
-
-        rc = knownhost_add(hosts, hostbuf, salt, key, keylen,
-                           comment, commentlen,
-                           type | LIBSSH2_KNOWNHOST_KEYENC_BASE64,
-                           NULL);
-        if(rc)
-            return rc;
+        /* The other host names after the comma, add this first. Copy it 
+         * to the temp buffer and zero terminate */
+        size_t sechost_len;
+         
+        sechost = sep;
+        while ((sechost = memchr(sep, ',', seplen)) != NULL) {
+            sechost_len = sechost-sep+1;
+            memcpy(hostbuf, sep, sechost_len );
+            hostbuf[sechost_len-1] = 0;
+            rc = knownhost_add(hosts, hostbuf, salt, key, keylen,     
+                                comment, commentlen,                   
+                                type | LIBSSH2_KNOWNHOST_KEYENC_BASE64,
+                                NULL);                                 
+            
+            if(rc)
+                return rc;
+
+            sep = sechost +1;
+            seplen -= sechost_len;
+        }
+        if (sep && seplen>0) {
+            memcpy(hostbuf, sep,seplen);
+            hostbuf[seplen]=0;
+            rc = knownhost_add(hosts, hostbuf, salt, key, keylen,      
+                                comment, commentlen,                   
+                                type | LIBSSH2_KNOWNHOST_KEYENC_BASE64,
+                                NULL);                                 
+                                                                       
+           if(rc)                                                     
+               return rc;                                             
+
+        }
+        
     }
 
     if (!salt)
@@ -793,7 +816,11 @@
                               "store");
 
     cp = line;
-
+    
+    /* Markers handle is not implemented yet */
+    if (*cp == '@')
+        return LIBSSH2_ERROR_NONE;
+    
     /* skip leading whitespaces */
     while(len && ((*cp==' ') || (*cp == '\t'))) {
         cp++;
@@ -829,16 +856,6 @@
     keyp = cp; /* the key starts here */
     keylen = len;
 
-    /* check if the line (key) ends with a newline and if so kill it */
-    while(len && *cp && (*cp != '\n')) {
-        cp++;
-        len--;
-    }
-
-    /* zero terminate where the newline is */
-    if(*cp == '\n')
-        keylen--; /* don't include this in the count */
-
     /* deal with this one host+key line */
     rc = hostline(hosts, hostp, hostlen, keyp, keylen);
     if(rc)
@@ -863,6 +880,7 @@
     FILE *file;
     int num = 0;
     char buf[2048];
+    char *lastnewline;
 
     if(type != LIBSSH2_KNOWNHOST_FILE_OPENSSH)
         return _libssh2_error(hosts->session,
@@ -873,6 +891,12 @@
     file = fopen(filename, "r");
     if(file) {
         while(fgets(buf, sizeof(buf), file)) {
+            /* Search for an ending newline*/
+            lastnewline = strrchr(buf,'\n');
+            /* Replace it by a \0 if it exists */
+            if (lastnewline != NULL)
+                *lastnewline = '\0';
+
             if(libssh2_knownhost_readline(hosts, buf, strlen(buf), type))
                 break;
             num++;

--------------060408010202080102040901
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

--------------060408010202080102040901--

From libssh2-devel-bounces@cool.haxx.se  Thu Mar  3 20:57:21 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p23Jv5os016523;
	Thu, 3 Mar 2011 20:57:18 +0100
Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com
	[209.85.214.54])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p23Jv1hk016444
	(version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Thu, 3 Mar 2011 20:57:02 +0100
Received: by bwz12 with SMTP id 12so1692493bwz.41
	for <libssh2-devel@cool.haxx.se>; Thu, 03 Mar 2011 11:57:00 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=peut.org; s=google;
	h=domainkey-signature:message-id:date:from:user-agent:mime-version:to
	:subject:references:in-reply-to:content-type;
	bh=RlrL1K1b2ttfouObTcC5aq2qVWNL8QDLqEUGKj0uZc4=;
	b=XETolAny2CHwwpItwgbLx60+gmWbcfoCqMJ3DIMG2BKuqM6OvNVdexu7aK/mo5AQDr
	AOhYulHBfNZ9Oay3GC2FuBzDrECipUFngMqERAhlkAtDdbPeToYGXOTxiYeS1/FhmFb2
	Swebgk4LH4dMkINB7faZPgNPkdg/RhvkN0dYE=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=peut.org; s=google;
	h=message-id:date:from:user-agent:mime-version:to:subject:references
	:in-reply-to:content-type;
	b=UZSVpKCBLFH0kJdajahkAxe1aTDwgq1pV4FgXaT3rGpSnhHZbP+094LiCqlmd58wAi
	s8z0R5vvxPaMgfYPmattMmFO2EKDWd63Yqo7eWGJQDFDVXQok1LvjRIU9ee4KXPKoBpv
	VjiP3yHfBdrHhyoUjZ3f/uHRUeipAFQXv4zJY=
Received: by 10.204.99.77 with SMTP id t13mr1842716bkn.164.1299182220509;
	Thu, 03 Mar 2011 11:57:00 -0800 (PST)
Received: from [192.168.0.35] (96-160.ftth.onsbrabantnet.nl [88.159.160.96])
	by mx.google.com with ESMTPS id u23sm1027614bkw.21.2011.03.03.11.56.58
	(version=SSLv3 cipher=OTHER); Thu, 03 Mar 2011 11:56:58 -0800 (PST)
Message-ID: <4D6FF287.6010402@peut.org>
Date: Thu, 03 Mar 2011 20:56:55 +0100
From: Jose Baars <peut@peut.org>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; nl;
	rv:1.9.2.14) Gecko/20110221 Thunderbird/3.1.8
MIME-Version: 1.0
To: libssh2 development <libssh2-devel@cool.haxx.se>
Subject: Re: Login problem - Power Broker Menu
References: <AANLkTi=-b1moZSRq7qdX8GbBiWSBeBZZeMnqkYTvgjcj@mail.gmail.com>	<20110301151550.25972.qmail@stuge.se>
	<AANLkTin0KxWNLcvP_K4gxX-1sPCOiyALE2EUouQXsrjT@mail.gmail.com>
In-Reply-To: <AANLkTin0KxWNLcvP_K4gxX-1sPCOiyALE2EUouQXsrjT@mail.gmail.com>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Thu, 03 Mar 2011 20:57:21 +0100 (CET)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Thu, 03 Mar 2011 20:57:02 +0100 (CET)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============0457215492=="
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

This is a cryptographically signed message in MIME format.

--===============0457215492==
Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha1; boundary="------------ms020600080804090707030108"

This is a cryptographically signed message in MIME format.

--------------ms020600080804090707030108
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable

Op 3/3/2011 2:06 PM, Naveen Sharma schreef:

>In a typical ssh session, a user will give "1" and will press enter
>and will enter the shell.

 >rc =3D libssh2_channel_write(channel, "1", strlen("1"));

Where is the 'enter'? Wouldn't you want to write "1\n" or "1\r\n"?

rc =3D libssh2_channel_send_eof(channel);

Why close the channel? Do just want to press 1 and then stop doing anythi=
ng useful?

I must admit I didn't try this out myself, but this just doesn't look
right from your description.

Jos=C3=A9






--------------ms020600080804090707030108
Content-Type: application/pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIRtDCC
BV0wggRFoAMCAQICEBUPxTeUYVibM15V7SdI4YcwDQYJKoZIhvcNAQEFBQAwgd0xCzAJBgNV
BAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjEfMB0GA1UECxMWVmVyaVNpZ24gVHJ1
c3QgTmV0d29yazE7MDkGA1UECxMyVGVybXMgb2YgdXNlIGF0IGh0dHBzOi8vd3d3LnZlcmlz
aWduLmNvbS9ycGEgKGMpMDkxHjAcBgNVBAsTFVBlcnNvbmEgTm90IFZhbGlkYXRlZDE3MDUG
A1UEAxMuVmVyaVNpZ24gQ2xhc3MgMSBJbmRpdmlkdWFsIFN1YnNjcmliZXIgQ0EgLSBHMzAe
Fw0xMDExMTIwMDAwMDBaFw0xMTExMTIyMzU5NTlaMIIBCjEXMBUGA1UEChMOVmVyaVNpZ24s
IEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdvcmsxRjBEBgNVBAsTPXd3dy52
ZXJpc2lnbi5jb20vcmVwb3NpdG9yeS9SUEEgSW5jb3JwLiBieSBSZWYuLExJQUIuTFREKGMp
OTgxHjAcBgNVBAsTFVBlcnNvbmEgTm90IFZhbGlkYXRlZDEzMDEGA1UECxMqRGlnaXRhbCBJ
RCBDbGFzcyAxIC0gTmV0c2NhcGUgRnVsbCBTZXJ2aWNlMRMwEQYDVQQDFApKb3NlIEJhYXJz
MRwwGgYJKoZIhvcNAQkBFg1wZXV0QHBldXQub3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
MIIBCgKCAQEAr/QJrg4jLwhCrNdHOzbC5HFzjE/FoklGXizIWpmW/bQOf6UQCVmJIPK7dsaJ
Dz2zytkbrrre5s/qfPcNkSScKSOguxyBmnQ/tW6Y0OnlYzv0ZrYyC0J8zzntDfZ5mLOzBTCY
rGS0Pqy8n7vRScDT927/62dEfgHiA3ceWbc+NCIJYdgupDjByypHgmi2H6JAiv6N16U2LRfM
2ZNBu4RYgWHQp31Y9cX/a/CHEv1rG/5MPVDQP6t45saHKJN/gcH4oXeCfHINZ7iUJhIWpk9i
pGEjwPLpgRAsGJFRHrZTBgOjrwrdzfrDgnKWkB2RY+IAYQ7z+8+KJGHwfuWvsH2EbQIDAQAB
o4HoMIHlMAkGA1UdEwQCMAAwRAYDVR0gBD0wOzA5BgtghkgBhvhFAQcXATAqMCgGCCsGAQUF
BwIBFhxodHRwczovL3d3dy52ZXJpc2lnbi5jb20vcnBhMAsGA1UdDwQEAwIFoDAdBgNVHSUE
FjAUBggrBgEFBQcDBAYIKwYBBQUHAwIwFAYKYIZIAYb4RQEGBwQGFgROb25lMFAGA1UdHwRJ
MEcwRaBDoEGGP2h0dHA6Ly9pbmRjMWRpZ2l0YWxpZC1nMy1jcmwudmVyaXNpZ24uY29tL0lu
ZEMxRGlnaXRhbElELUczLmNybDANBgkqhkiG9w0BAQUFAAOCAQEA5nI96tQkbCelTz4bLtnc
6uCIfbmE0slYOMLfmjwgXm0qJAMYCiBlhdBkBeROwP9JkqIRHMOnPAGB/i9nz/6KeIJQEBKT
ClJMeU9NZ4VvIsmaTnEmL86fuDQygCYJXf7+9PfIbK2BDQ9AsJtvLPfQXfMkATYEAP/dozXX
ZLiZ3p5sex3DzevIX8/TNjV4Vdt7S8rYXfLz+yZh5bJVliScankYwcScVh/0kn0DLdq47DxO
ZANPISNkOF0yvfT/cTFMnLykCwtZiGGfRGl5KAl6DSN0vn49B+M0QuvGAN/5itaGx4YCLMl1
0iganL8H2SHFW4a+BeKZ7t+1JG9l/YUGdTCCBV0wggRFoAMCAQICEBUPxTeUYVibM15V7SdI
4YcwDQYJKoZIhvcNAQEFBQAwgd0xCzAJBgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwg
SW5jLjEfMB0GA1UECxMWVmVyaVNpZ24gVHJ1c3QgTmV0d29yazE7MDkGA1UECxMyVGVybXMg
b2YgdXNlIGF0IGh0dHBzOi8vd3d3LnZlcmlzaWduLmNvbS9ycGEgKGMpMDkxHjAcBgNVBAsT
FVBlcnNvbmEgTm90IFZhbGlkYXRlZDE3MDUGA1UEAxMuVmVyaVNpZ24gQ2xhc3MgMSBJbmRp
dmlkdWFsIFN1YnNjcmliZXIgQ0EgLSBHMzAeFw0xMDExMTIwMDAwMDBaFw0xMTExMTIyMzU5
NTlaMIIBCjEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRy
dXN0IE5ldHdvcmsxRjBEBgNVBAsTPXd3dy52ZXJpc2lnbi5jb20vcmVwb3NpdG9yeS9SUEEg
SW5jb3JwLiBieSBSZWYuLExJQUIuTFREKGMpOTgxHjAcBgNVBAsTFVBlcnNvbmEgTm90IFZh
bGlkYXRlZDEzMDEGA1UECxMqRGlnaXRhbCBJRCBDbGFzcyAxIC0gTmV0c2NhcGUgRnVsbCBT
ZXJ2aWNlMRMwEQYDVQQDFApKb3NlIEJhYXJzMRwwGgYJKoZIhvcNAQkBFg1wZXV0QHBldXQu
b3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAr/QJrg4jLwhCrNdHOzbC5HFz
jE/FoklGXizIWpmW/bQOf6UQCVmJIPK7dsaJDz2zytkbrrre5s/qfPcNkSScKSOguxyBmnQ/
tW6Y0OnlYzv0ZrYyC0J8zzntDfZ5mLOzBTCYrGS0Pqy8n7vRScDT927/62dEfgHiA3ceWbc+
NCIJYdgupDjByypHgmi2H6JAiv6N16U2LRfM2ZNBu4RYgWHQp31Y9cX/a/CHEv1rG/5MPVDQ
P6t45saHKJN/gcH4oXeCfHINZ7iUJhIWpk9ipGEjwPLpgRAsGJFRHrZTBgOjrwrdzfrDgnKW
kB2RY+IAYQ7z+8+KJGHwfuWvsH2EbQIDAQABo4HoMIHlMAkGA1UdEwQCMAAwRAYDVR0gBD0w
OzA5BgtghkgBhvhFAQcXATAqMCgGCCsGAQUFBwIBFhxodHRwczovL3d3dy52ZXJpc2lnbi5j
b20vcnBhMAsGA1UdDwQEAwIFoDAdBgNVHSUEFjAUBggrBgEFBQcDBAYIKwYBBQUHAwIwFAYK
YIZIAYb4RQEGBwQGFgROb25lMFAGA1UdHwRJMEcwRaBDoEGGP2h0dHA6Ly9pbmRjMWRpZ2l0
YWxpZC1nMy1jcmwudmVyaXNpZ24uY29tL0luZEMxRGlnaXRhbElELUczLmNybDANBgkqhkiG
9w0BAQUFAAOCAQEA5nI96tQkbCelTz4bLtnc6uCIfbmE0slYOMLfmjwgXm0qJAMYCiBlhdBk
BeROwP9JkqIRHMOnPAGB/i9nz/6KeIJQEBKTClJMeU9NZ4VvIsmaTnEmL86fuDQygCYJXf7+
9PfIbK2BDQ9AsJtvLPfQXfMkATYEAP/dozXXZLiZ3p5sex3DzevIX8/TNjV4Vdt7S8rYXfLz
+yZh5bJVliScankYwcScVh/0kn0DLdq47DxOZANPISNkOF0yvfT/cTFMnLykCwtZiGGfRGl5
KAl6DSN0vn49B+M0QuvGAN/5itaGx4YCLMl10iganL8H2SHFW4a+BeKZ7t+1JG9l/YUGdTCC
Bu4wggXWoAMCAQICEHEVZgVK5JEhTem8RPms09wwDQYJKoZIhvcNAQEFBQAwgcoxCzAJBgNV
BAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjEfMB0GA1UECxMWVmVyaVNpZ24gVHJ1
c3QgTmV0d29yazE6MDgGA1UECxMxKGMpIDE5OTkgVmVyaVNpZ24sIEluYy4gLSBGb3IgYXV0
aG9yaXplZCB1c2Ugb25seTFFMEMGA1UEAxM8VmVyaVNpZ24gQ2xhc3MgMSBQdWJsaWMgUHJp
bWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEczMB4XDTA5MDUwMTAwMDAwMFoXDTE5
MDQzMDIzNTk1OVowgd0xCzAJBgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjEf
MB0GA1UECxMWVmVyaVNpZ24gVHJ1c3QgTmV0d29yazE7MDkGA1UECxMyVGVybXMgb2YgdXNl
IGF0IGh0dHBzOi8vd3d3LnZlcmlzaWduLmNvbS9ycGEgKGMpMDkxHjAcBgNVBAsTFVBlcnNv
bmEgTm90IFZhbGlkYXRlZDE3MDUGA1UEAxMuVmVyaVNpZ24gQ2xhc3MgMSBJbmRpdmlkdWFs
IFN1YnNjcmliZXIgQ0EgLSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAO3E
R98qKB18Bmu71yEyyWwTj+mxjUFONPfaC+Nq+mWIIAsRE+mb4ElOi2/VAdBfDUeRilpMdD4/
xpEJu0w0no1uoYJRYvdpdliWB6+eFBgHT1q9n9IxslQZc0ZqGUIR7BJzIY313DDN5dlWCjHF
Nm0pFJe9LdqJRxmI2EsEPeu2PGcedAATDdCG2pNn+DMDrho8a2l49sAsjuGDP3f5mf/+n1Ja
wrSHCthsqUfBVCllQz5KwJYfwa33d69ssQRevsG2lC2XkC0n0rse6YNqhPbEsq4jBmUmpSdY
KwcitG+mYkgad/LVUCeaKdOW+yj1uiR2YuOMWev7btVCxL5Bx/UCAwEAAaOCArkwggK1MDQG
CCsGAQUFBwEBBCgwJjAkBggrBgEFBQcwAYYYaHR0cDovL29jc3AudmVyaXNpZ24uY29tMBIG
A1UdEwEB/wQIMAYBAf8CAQAwcAYDVR0gBGkwZzBlBgtghkgBhvhFAQcXATBWMCgGCCsGAQUF
BwIBFhxodHRwczovL3d3dy52ZXJpc2lnbi5jb20vY3BzMCoGCCsGAQUFBwICMB4aHGh0dHBz
Oi8vd3d3LnZlcmlzaWduLmNvbS9ycGEwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL2NybC52
ZXJpc2lnbi5jb20vcGNhMS1nMy5jcmwwDgYDVR0PAQH/BAQDAgEGMG4GCCsGAQUFBwEMBGIw
YKFeoFwwWjBYMFYWCWltYWdlL2dpZjAhMB8wBwYFKw4DAhoEFEtruSiWBgy70FI4mymsSweL
IQUYMCYWJGh0dHA6Ly9sb2dvLnZlcmlzaWduLmNvbS92c2xvZ28xLmdpZjAuBgNVHREEJzAl
pCMwITEfMB0GA1UEAxMWUHJpdmF0ZUxhYmVsNC0yMDQ4LTExODAdBgNVHQ4EFgQUeUdhCEH9
OASiS+e1zPVD9kkrEfgwgfEGA1UdIwSB6TCB5qGB0KSBzTCByjELMAkGA1UEBhMCVVMxFzAV
BgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3Jr
MTowOAYDVQQLEzEoYykgMTk5OSBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVz
ZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAxIFB1YmxpYyBQcmltYXJ5IENlcnRp
ZmljYXRpb24gQXV0aG9yaXR5IC0gRzOCEQCLW3VWhFSFCwDPrzhIzrGkMA0GCSqGSIb3DQEB
BQUAA4IBAQA5Tc9BmYG1qQW1UjjpOYSJbOQ0qFrn2GwJTCQaulmkhztzIfGTgc+/aGNaZ/41
hSuhw12jSsI6Gd0w1sxN7/HSgZfKVFpDvzeLeo4ZjQ9DqIzyr2CzFYqzlZw84J6zJ5ikNXIX
5fwqXYfTig3C0UUq+MD0rCqTOtWuEnAI6/s74nfs6CtkNXbNutrg0csU1nFYm77VPn222egk
xSRmTF2RH3azFz5/DcYhiS+zN7ih/1yybUneZVJC+w6I0u1KHb9L4/jMcvpIDmWOScjW+JmY
O7eUPjFxBof6bFlTLtffK+1fYwCsFe0DuFUWjMZoA+ciqHMLsbyg2lJY3QoOf8GCMYIE7DCC
BOgCAQEwgfIwgd0xCzAJBgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjEfMB0G
A1UECxMWVmVyaVNpZ24gVHJ1c3QgTmV0d29yazE7MDkGA1UECxMyVGVybXMgb2YgdXNlIGF0
IGh0dHBzOi8vd3d3LnZlcmlzaWduLmNvbS9ycGEgKGMpMDkxHjAcBgNVBAsTFVBlcnNvbmEg
Tm90IFZhbGlkYXRlZDE3MDUGA1UEAxMuVmVyaVNpZ24gQ2xhc3MgMSBJbmRpdmlkdWFsIFN1
YnNjcmliZXIgQ0EgLSBHMwIQFQ/FN5RhWJszXlXtJ0jhhzAJBgUrDgMCGgUAoIICzjAYBgkq
hkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0xMTAzMDMxOTU2NTVaMCMG
CSqGSIb3DQEJBDEWBBQPKF4FqLMFLoYOrsNIOM764aRxeTBfBgkqhkiG9w0BCQ8xUjBQMAsG
CWCGSAFlAwQBAjAKBggqhkiG9w0DBzAOBggqhkiG9w0DAgICAIAwDQYIKoZIhvcNAwICAUAw
BwYFKw4DAgcwDQYIKoZIhvcNAwICASgwggEDBgkrBgEEAYI3EAQxgfUwgfIwgd0xCzAJBgNV
BAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjEfMB0GA1UECxMWVmVyaVNpZ24gVHJ1
c3QgTmV0d29yazE7MDkGA1UECxMyVGVybXMgb2YgdXNlIGF0IGh0dHBzOi8vd3d3LnZlcmlz
aWduLmNvbS9ycGEgKGMpMDkxHjAcBgNVBAsTFVBlcnNvbmEgTm90IFZhbGlkYXRlZDE3MDUG
A1UEAxMuVmVyaVNpZ24gQ2xhc3MgMSBJbmRpdmlkdWFsIFN1YnNjcmliZXIgQ0EgLSBHMwIQ
FQ/FN5RhWJszXlXtJ0jhhzCCAQUGCyqGSIb3DQEJEAILMYH1oIHyMIHdMQswCQYDVQQGEwJV
UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5l
dHdvcmsxOzA5BgNVBAsTMlRlcm1zIG9mIHVzZSBhdCBodHRwczovL3d3dy52ZXJpc2lnbi5j
b20vcnBhIChjKTA5MR4wHAYDVQQLExVQZXJzb25hIE5vdCBWYWxpZGF0ZWQxNzA1BgNVBAMT
LlZlcmlTaWduIENsYXNzIDEgSW5kaXZpZHVhbCBTdWJzY3JpYmVyIENBIC0gRzMCEBUPxTeU
YVibM15V7SdI4YcwDQYJKoZIhvcNAQEBBQAEggEAHcqtq7YhCTyF7SSX0XQd3mdcQUuDp7vq
YzdAiDSpSMPoGsxsBmpGatNoD753tJx/QeV6ylIO6MZsONDEXZyWF5/8nRX0TfSgF2zx9iJQ
ZuasYTLaTpXTTecwoSEDPDaYIjc5rnhkshc+IJKZ9xiVDbDefm4/qJvrAh4pjBtUbFPyT93V
LApjAWueiqS5nBZEBcRG5NfGHAxOF0TXaX3mjmIG6Nb6+wNpTO9SyWBpgVn79QU91GytdYAJ
1SkfE7QpUWw9kxAl+heR+VE8hxnzlP+wh5QuN2OYz6t6C4okuqyoh7KFz7pzO7yBcFXeCJ6Z
hCApILFnGYRGigp5GAqumQAAAAAAAA==
--------------ms020600080804090707030108--

--===============0457215492==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

--===============0457215492==--

From libssh2-devel-bounces@cool.haxx.se  Fri Mar  4 05:25:36 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p244PBXm003634;
	Fri, 4 Mar 2011 05:25:33 +0100
Received: from mail-ww0-f54.google.com (mail-ww0-f54.google.com [74.125.82.54])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p244PArt003556
	(version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Fri, 4 Mar 2011 05:25:10 +0100
Received: by wwi18 with SMTP id 18so2111104wwi.11
	for <libssh2-devel@cool.haxx.se>; Thu, 03 Mar 2011 20:25:05 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:in-reply-to:references:date
	:message-id:subject:from:to:cc:content-type;
	bh=bH3Hnfn04rzL6qsPTznzCg3GTj30zDzlKUDQtSSCYS8=;
	b=HkPmEh1xfotZcOpCYYHPfgyWr8sR00lspZBamu1S8sxUutPWzErj2PhoRlvSn2uMPn
	o4IvyFjzHJdrOyN2IwJj/X1H+TzPFy5e1HV+7cTwsjjjS3OfdZDI4M7atMMnbkGLwg/h
	mtnebinfJRsrHfZ58U1AUtzyamVU5MNk7a5cM=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type;
	b=kHj+E1DIPk4mTTD0WjTSq2rO842dKeJB2/mTdypgbbib7jLpSgFoX2TdSuuOEJ3GBi
	z3GHytvdnx7YLvWTqzbtNov3XGAwFxB92AybfJSEjJvgaIhzyWtp8sS8afXLuNh3oDun
	NScsfLrbl8QAxxvF6mfMJRPOqEqrThXMayWlA=
MIME-Version: 1.0
Received: by 10.227.30.164 with SMTP id u36mr126811wbc.118.1299212705764; Thu,
	03 Mar 2011 20:25:05 -0800 (PST)
Received: by 10.227.13.140 with HTTP; Thu, 3 Mar 2011 20:25:05 -0800 (PST)
In-Reply-To: <4D6FF287.6010402@peut.org>
References: <AANLkTi=-b1moZSRq7qdX8GbBiWSBeBZZeMnqkYTvgjcj@mail.gmail.com>
	<20110301151550.25972.qmail@stuge.se>
	<AANLkTin0KxWNLcvP_K4gxX-1sPCOiyALE2EUouQXsrjT@mail.gmail.com>
	<4D6FF287.6010402@peut.org>
Date: Fri, 4 Mar 2011 09:55:05 +0530
Message-ID: <AANLkTikkeZ30MX0Cc-mJnZP5gu6f_DDgJdzB1dx+aEZ2@mail.gmail.com>
Subject: Re: Login problem - Power Broker Menu
From: Naveen Sharma <writetonsharma@gmail.com>
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Fri, 04 Mar 2011 05:25:36 +0100 (CET)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Fri, 04 Mar 2011 05:25:10 +0100 (CET)
Cc: Jose Baars <peut@peut.org>
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

On Fri, Mar 4, 2011 at 1:26 AM, Jose Baars <peut@peut.org> wrote:
> Op 3/3/2011 2:06 PM, Naveen Sharma schreef:
>
>> In a typical ssh session, a user will give "1" and will press enter
>> and will enter the shell.
>
>>rc = libssh2_channel_write(channel, "1", strlen("1"));
>
> Where is the 'enter'? Wouldn't you want to write "1\n" or "1\r\n"?
>
> rc = libssh2_channel_send_eof(channel);
>
> Why close the channel? Do just want to press 1 and then stop doing anything
> useful?
>
> I must admit I didn't try this out myself, but this just doesn't look
> right from your description.
>

Hi Jose,

That worked for me. :)

Actually previously I was trying libssh2_channel_exec() and was giving "1\n",
but then I realized that this will not work for me and I stared using
a libssh2_channel_shell() and libssh2_channel_write() to interact with
the shell.

And I never tried "1\n" in this case. Its been a week I tried several
combination but this one.  :(


Anyway, you guys are great!!!

Thanks Jose and Peter for helping me out.


Naveen.
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Fri Mar  4 13:00:59 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p24C0aWs008660;
	Fri, 4 Mar 2011 13:00:56 +0100
Received: from earth.stuge.se (earth.stuge.se [212.116.89.126])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p24C0ZYl008654
	for <libssh2-devel@cool.haxx.se>; Fri, 4 Mar 2011 13:00:35 +0100
Received: (qmail 8244 invoked from network); 4 Mar 2011 12:00:34 -0000
Received: from unknown (HELO earth.stuge.se) (127.0.0.1)
	by localhost with SMTP; 4 Mar 2011 12:00:34 -0000
MIME-Version: 1.0
From: "libssh2 Trac" <trac@libssh2.stuge.se>
X-Trac-Version: 0.12
Precedence: bulk
Cc: libssh2-devel@cool.haxx.se
Auto-Submitted: auto-generated
X-Mailer: Trac 0.12, by Edgewall Software
X-Trac-Project: libssh2
Date: Fri, 04 Mar 2011 12:00:34 -0000
X-URL: http://trac.libssh2.org/
Subject: Re: [libssh2] #212: Win32 access violation reading beyond module's
	executable address space
X-Trac-Ticket-URL: http://trac.libssh2.org/ticket/212#comment:2
Message-ID: <100.8d5dac50e13ac29dc1a807ed2885fb3f@libssh2.stuge.se>
References: <085.75fcd2f2729a1c4fe91d486bf364da18@libssh2.stuge.se>
X-Trac-Ticket-ID: 212
In-Reply-To: <085.75fcd2f2729a1c4fe91d486bf364da18@libssh2.stuge.se>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Fri, 04 Mar 2011 13:00:59 +0100 (CET)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Fri, 04 Mar 2011 13:00:35 +0100 (CET)
X-MIME-Autoconverted: from base64 to 8bit by giant.haxx.se id p24C0ZYl008654
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Reply-To: trac@libssh2.stuge.se,
        libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

#212: Win32 access violation reading beyond module's executable address space
----------------------------------------------------------------+-----------
  Reporter:  me.yahoo.com/a/zb4rfgwuv_ft.mggqltssk.ndw--#37f15  |        Owner:  bagder
      Type:  defect                                             |       Status:  closed
  Priority:  normal                                             |    Milestone:  1.2.8 
 Component:  SFTP                                               |      Version:  1.2.7 
Resolution:  fixed                                              |     Keywords:        
    Blocks:                                                     |   Blocked By:        
----------------------------------------------------------------+-----------
Changes (by me.yahoo.com/a/zb4rfgwuv_ft.mggqltssk.ndw--#37f15):

  * status:  assigned => closed
  * resolution:  => fixed


Comment:

 Thanks for the pointer, adding the init code in the attachment does indeed
 resolve this problem; marking as resolved.

-- 
Ticket URL: <http://trac.libssh2.org/ticket/212#comment:2>
libssh2 <http://trac.libssh2.org/>
C library for writing portable SSH2 clients

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Fri Mar  4 18:49:53 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p24HnWtd023598;
	Fri, 4 Mar 2011 18:49:49 +0100
Received: from earth.stuge.se (earth.stuge.se [212.116.89.126])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p24HnUIT023585
	for <libssh2-devel@cool.haxx.se>; Fri, 4 Mar 2011 18:49:30 +0100
Received: (qmail 20327 invoked from network); 4 Mar 2011 17:49:32 -0000
Received: from unknown (HELO earth.stuge.se) (127.0.0.1)
	by localhost with SMTP; 4 Mar 2011 17:49:32 -0000
MIME-Version: 1.0
From: "libssh2 Trac" <trac@libssh2.stuge.se>
X-Trac-Version: 0.12
Precedence: bulk
Cc: libssh2-devel@cool.haxx.se
Auto-Submitted: auto-generated
X-Mailer: Trac 0.12, by Edgewall Software
X-Trac-Project: libssh2
Date: Fri, 04 Mar 2011 17:49:32 -0000
X-URL: http://trac.libssh2.org/
Subject: [libssh2] #214: Hcg Drops - How The HCG Hormone Is Used For Weight
	Loss
X-Trac-Ticket-URL: http://trac.libssh2.org/ticket/214
Message-ID: <046.c0b4154da382cc14bd47d237264a507d@libssh2.stuge.se>
X-Trac-Ticket-ID: 214
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Fri, 04 Mar 2011 18:49:52 +0100 (CET)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Fri, 04 Mar 2011 18:49:30 +0100 (CET)
X-MIME-Autoconverted: from base64 to 8bit by giant.haxx.se id p24HnUIT023585
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Reply-To: trac@libssh2.stuge.se,
        libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

#214: Hcg Drops - How The HCG Hormone Is Used For Weight Loss
-------------------------------+--------------------------------------------
  Reporter:  hcgdrops15        |       Owner:  Almarie
      Type:  defect            |      Status:  new    
  Priority:  normal            |   Milestone:  1.2.8  
 Component:  crypto            |     Version:  1.2.6  
  Keywords:  Hcg, Diet, Drops  |      Blocks:         
Blocked By:                    |  
-------------------------------+--------------------------------------------
 [[Image(http://hcgfordiet.net/wp-content/uploads/2010/11/wpid-
 31atKKvxOdLSL500.jpg)]]

 The '''[http://absguru.net/hcg-drops-diet/ Hcg drops]''' is a stimulant
 which activates the HCG hormone that you have in your body.This is a
 '''hormone''' that is responsible for the extra fats on your body.Without
 exercise,there is a great chance that your body will be damaged.That is
 why '''HCG drops''' are made to help you change the fats that you have
 into calories which will serve as the energy on your body.Not just that,
 you have to know what are the chemical components of your supplement plus
 the doctors subscription which is also important.

 [[Image(http://www.slimmingresources.com/wp-content/uploads/2011/01/hcg-
 diet-drops.png)]]

 The '''[http://absguru.net/hcg-drops-diet/ Hcg diet drops]''' is also
 created to help or aid people for those who are having a hard time loosing
 there weight.This would explain why it is called '''Diet drops''' because
 you are going to take it in through the dropper and in a small
 amount.Aside from that, '''hgc drops''' will trigger the hormone in your
 body which is your HCG to convert the fats that you have into energy plus
 the help of the food that you eat with proper exercise.

-- 
Ticket URL: <http://trac.libssh2.org/ticket/214>
libssh2 <http://trac.libssh2.org/>
C library for writing portable SSH2 clients

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Sat Mar  5 19:07:03 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p25I6b8o030705;
	Sat, 5 Mar 2011 19:06:59 +0100
Received: from earth.stuge.se (earth.stuge.se [212.116.89.126])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p25I6a0F030700
	for <libssh2-devel@cool.haxx.se>; Sat, 5 Mar 2011 19:06:36 +0100
Received: (qmail 31778 invoked from network); 5 Mar 2011 18:06:37 -0000
Received: from unknown (HELO earth.stuge.se) (127.0.0.1)
	by localhost with SMTP; 5 Mar 2011 18:06:37 -0000
MIME-Version: 1.0
From: "libssh2 Trac" <trac@libssh2.stuge.se>
X-Trac-Version: 0.12
Precedence: bulk
Cc: libssh2-devel@cool.haxx.se
Auto-Submitted: auto-generated
X-Mailer: Trac 0.12, by Edgewall Software
X-Trac-Project: libssh2
Date: Sat, 05 Mar 2011 18:06:37 -0000
X-URL: http://trac.libssh2.org/
Subject: [libssh2] #215: Car Games- How Give Race Car Games to Kids
X-Trac-Ticket-URL: http://trac.libssh2.org/ticket/215
Message-ID: <046.52e803f25587bbe511ace58ae6be5001@libssh2.stuge.se>
X-Trac-Ticket-ID: 215
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Sat, 05 Mar 2011 19:07:03 +0100 (CET)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Sat, 05 Mar 2011 19:06:36 +0100 (CET)
X-MIME-Autoconverted: from base64 to 8bit by giant.haxx.se id p25I6a0F030700
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Reply-To: trac@libssh2.stuge.se,
        libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

#215: Car Games- How Give Race Car Games to Kids
------------------------------+---------------------------------------------
  Reporter:  cargames23       |       Owner:  Alyra Nirvan
      Type:  defect           |      Status:  new         
  Priority:  normal           |   Milestone:  1.2.8       
 Component:  tests            |     Version:  1.2.6       
  Keywords:  Car, Fun, Games  |      Blocks:              
Blocked By:                   |  
------------------------------+---------------------------------------------
 [[Image(http://www.itreviews.co.uk/graphics/normal/games/g302.jpg)]]

 When you have internet connection at home, your kids can easily access to
 '''[http://blackpenguin.net/ Car Games]'''. You can select the race '''car
 games''' for kids that you want your children to play. You can choose from
 a wide range of games, starting from simple car race games till more
 complicated strategy '''games''', in which your children have to involve
 and think about the way they should act in order to continue the game.

 [[Image(http://www.gamersjar.com/images/age-of-speed1.jpg)]]

 When you access these free kids '''[http://blackpenguin.net/ Fun
 Games]''', you'll be given some explanations and instructions of the game
 you can even check how it works. This kind of '''games''' involves
 strategies so you can expect that your kids can earn knowledge because
 these games are educational. By going online to play these race '''car
 games''' for kids, the children can compete with other users and actually
 join a real competition, which is a highly challenging activity for a
 youngster.

-- 
Ticket URL: <http://trac.libssh2.org/ticket/215>
libssh2 <http://trac.libssh2.org/>
C library for writing portable SSH2 clients

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Sun Mar  6 22:46:24 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p26Lk2rT010292;
	Sun, 6 Mar 2011 22:46:19 +0100
Received: from giant.haxx.se (giant.haxx.se [80.67.6.50])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p26Lk1mi010272
	for <libssh2-devel@cool.haxx.se>; Sun, 6 Mar 2011 22:46:01 +0100
Date: Sun, 6 Mar 2011 22:46:01 +0100 (CET)
From: Daniel Stenberg <daniel@haxx.se>
X-X-Sender: dast@giant.haxx.se
To: libssh2 development <libssh2-devel@cool.haxx.se>
Subject: Re: Small binary files are getting transferred but not the larger
	ones in libssh2 SFTP
In-Reply-To: <AANLkTikWKvz9O8bjbKrdyNnH54ozetM_yWm0GmwiZr=8@mail.gmail.com>
Message-ID: <alpine.DEB.2.00.1103062245120.28357@tvnag.unkk.fr>
References: <AANLkTikWKvz9O8bjbKrdyNnH54ozetM_yWm0GmwiZr=8@mail.gmail.com>
User-Agent: Alpine 2.00 (DEB 1167 2008-08-23)
X-fromdanielhimself: yes
MIME-Version: 1.0
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Sun, 06 Mar 2011 22:46:24 +0100 (CET)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Sun, 06 Mar 2011 22:46:01 +0100 (CET)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

On Thu, 3 Mar 2011, kali muthu wrote:

> I am using the libssh2_sftp_read() to read the remote server files which are 
> binary. I am using the session in non-blocking mode. I can able to transfer 
> text files and smaller binary files.

Can you show us a full source code of your app that doesn't work? We do 
provide the sftp_nonblock.c example that shows a SFTP download using the 
non-blocking API...

-- 

  / daniel.haxx.se
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Mon Mar  7 03:11:43 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p272BMVP020570;
	Mon, 7 Mar 2011 03:11:40 +0100
Received: from mail-qy0-f182.google.com (mail-qy0-f182.google.com
	[209.85.216.182])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p272BJOC020556
	(version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Mon, 7 Mar 2011 03:11:20 +0100
Received: by qyk27 with SMTP id 27so3419599qyk.20
	for <libssh2-devel@cool.haxx.se>; Sun, 06 Mar 2011 18:11:19 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:content-type
	:content-transfer-encoding;
	bh=beW2OrZHJpVbXeduuxVQZGTg8sjnG5RchetOp/8mhu4=;
	b=dLHc/SYjYSO/bAADnOTfxcbJZ1LE/O1rikKPSYkG+vLRuUrX9k3tTsd23gEJGLqCXy
	cSg2Zim3nDvaq+lrh89HR0cd84Ig2nZz5o2oTXyDAnRLGYWTSd+VulMP+iTdcms3DxGI
	MuxrdgiQOYkcF3s4oOV2bThtC52s5YYFyWRK4=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:content-type
	:content-transfer-encoding;
	b=kNRXMLMxlTC+mZ8hF3vPw0WSGeTmbttjWXKJqo0XKs/XMHN/8v4O2xyFv6Ic42P/Mr
	Mkjw+jAPyZbmQEn3Owfou4iw6pzrBlZO2MdDEVDFirZg45lP0oYgYeR+eAEIiKl+tgPo
	TeeaKzW+Vvfj5TkpTI1M5GEUvsFjLG3HmyETk=
MIME-Version: 1.0
Received: by 10.229.136.208 with SMTP id s16mr2495437qct.134.1299463879149;
	Sun, 06 Mar 2011 18:11:19 -0800 (PST)
Received: by 10.229.29.197 with HTTP; Sun, 6 Mar 2011 18:11:19 -0800 (PST)
In-Reply-To: <4D6FB4BB.8020302@cc.in2p3.fr>
References: <4D6E0DD8.1040206@cc.in2p3.fr>
	<AANLkTin5qdBOQpG=Jsx5kSJbgZ=ma_kEmrwa=ku9xYTD@mail.gmail.com>
	<4D6E353C.6050605@cc.in2p3.fr>
	<AANLkTikxK1iy-AbKpFn07VcvG=pg_hLeC1zVt3cbUUTQ@mail.gmail.com>
	<4D6E60A1.6050603@cc.in2p3.fr>
	<AANLkTimY+XS57+qyU4UZNPsXnXubqGcsHtAC577VSBmn@mail.gmail.com>
	<4D6FB4BB.8020302@cc.in2p3.fr>
Date: Mon, 7 Mar 2011 02:11:19 +0000
X-Google-Sender-Auth: QEQm8IEuSJtXoFZIxyBy7PqR2S0
Message-ID: <AANLkTimHf6mq=BKZZ2LuoW9KkE7wMZh+C=NeOEhLEiA7@mail.gmail.com>
Subject: Re: Problem with known_hosts
From: Alexander Lamaison <swish@lammy.co.uk>
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Mon, 07 Mar 2011 03:11:43 +0100 (CET)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Mon, 07 Mar 2011 03:11:20 +0100 (CET)
X-MIME-Autoconverted: from quoted-printable to 8bit by giant.haxx.se id
	p272BJOC020556
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="iso-8859-1"
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by giant.haxx.se id p272BMVP020570

On 3 March 2011 15:33, Pierre-Yves Fontaniere <pyf@cc.in2p3.fr> wrote:
> On 03/03/2011 03:04 PM, Alexander Lamaison wrote:
>>
>> On 2 March 2011 15:22, Pierre-Yves Fontaniere<pyf@cc.in2p3.fr>  wrote:
>>>
>>>  - Some lines to really remove ending '\n' directly when reading lines
>>> from
>>> knownhosts file.
>>>
>>
>> Can you explain a bit more about this?  What was the code doing wrong
>> before?
>>
>
> In fact, the code wasn't doing something wrong. But when i was debugging, i
> saw (with simple printf) keys with leading '\n'. So I thought first the
> problem was here. I saw later that was not the case but even if i know that
> there's no use of function like strlen in the code, i prefer having a '\n'
> leading free and zero terminated string.

I still don't understand what you mean.  Where are you seeing these
leading '\n's?  The existing code extracts the key from the file
without including any '\n'.  What has strlen got to do with it?

> libssh2_knownhost_readfile is the only place where we use something else
> than const char *. So this is the place to format every line and have zero
> terminated string without leading '\n'.

I'm lost.  What is the relevance of const char*?
libssh2_knownhost_readline doesn't change the contents of the line so
it doesn't matter that it's const char*.

> I used strrchr which take the buffer from the end and doesn't browse all the
> key from the beginning (like it is done later in
> libssh2_knownhost_readline).

Your code tries to replace '\n' with '\0' before reading the entry but
this isn't necessary as hostline takes a key and a keylength.  It
doesn't treat the key as a terminated string.  You can terminate it
with anything you like and, as long as the length is correct, it will
work.

> I let you decide if it is an interesting modification or not. :)

I'm afraid not.  It does extra work and breaks the behaviour of
libssh2_knownhost_readline, a public API function.  When passed a line
that ends in '\n', libssh2_knownhost_readline now adds the key to the
collection with the newline still present.  This is wrong.

>> For my testing, can you send me an example of what one of these AIX
>> entries with multiple aliases contains?
>>
>
> This is not specific to AIX :) we use this kind of knownhosts entries on
> Linux, Solaris and AIX.
>
> Entry like :
>
> ccsmurf,ccsvli05,ccsvli05.in2p3.fr,ccsmurf.in2p3.fr,134.158.104.140 ssh-rsa
> AAAAB3NzaC1yc2EAAAABIwAAAIEAq1iiPKlBbyw3I+wC76ugwt7DGnseVNjzjZf8y7vO+2oiuBkRMdoqh9K3oHzkiloTeAHOZH4V89nUt/WLTqKG4j4/sSwaCD9gRKwFS4me/Pnvi8zqwmF8YrLwQdTGtDZo2iz0Dt4KqAE6fQ9mQ/iTlJMFUKOed8luDDfX6Ba0lBE=

Thanks.  I will do some more testing using this entry at some point this week.

Alex

--
Swish - Easy SFTP for Windows Explorer (http://www.swish-sftp.org)

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Mon Mar  7 18:13:44 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p27HDICZ012421;
	Mon, 7 Mar 2011 18:13:40 +0100
Received: from earth.stuge.se (earth.stuge.se [212.116.89.126])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p27HDIfT012417
	for <libssh2-devel@cool.haxx.se>; Mon, 7 Mar 2011 18:13:18 +0100
Received: (qmail 7746 invoked from network); 7 Mar 2011 17:13:18 -0000
Received: from unknown (HELO earth.stuge.se) (127.0.0.1)
	by localhost with SMTP; 7 Mar 2011 17:13:18 -0000
MIME-Version: 1.0
From: "libssh2 Trac" <trac@libssh2.stuge.se>
X-Trac-Version: 0.12
Precedence: bulk
Cc: libssh2-devel@cool.haxx.se
Auto-Submitted: auto-generated
X-Mailer: Trac 0.12, by Edgewall Software
X-Trac-Project: libssh2
Date: Mon, 07 Mar 2011 17:13:18 -0000
X-URL: http://trac.libssh2.org/
Subject: [libssh2] #216: PPI Claims - How To Sell Mortgage Protection Insurance
X-Trac-Ticket-URL: http://trac.libssh2.org/ticket/216
Message-ID: <046.9aa7116d7687297e9570af5723875d50@libssh2.stuge.se>
X-Trac-Ticket-ID: 216
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Mon, 07 Mar 2011 18:13:44 +0100 (CET)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Mon, 07 Mar 2011 18:13:18 +0100 (CET)
X-MIME-Autoconverted: from base64 to 8bit by giant.haxx.se id p27HDIfT012417
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.14
Reply-To: trac@libssh2.stuge.se,
        libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: libssh2-devel-bounces@cool.haxx.se
Sender: libssh2-devel-bounces@cool.haxx.se

#216: PPI Claims - How To Sell Mortgage Protection Insurance
--------------------------+-------------------------------------------------
  Reporter:  ppiclaims3   |       Owner:  Almavi Cuneta
      Type:  defect       |      Status:  new          
  Priority:  normal       |   Milestone:  1.2.8        
 Component:  SCP          |     Version:  1.2.6        
  Keywords:  ppi, claims  |      Blocks:               
Blocked By:               |  
--------------------------+-------------------------------------------------
 [[Image(http://i.ehow.com/images/a05/d1/t5/mortgage-insurance-leads-
 200X200.jpg)]]

 When you like to sell '''[http://www.ukppiclaims.org/ ppi claims]'''
 because of the reason that you wanted people to have the '''protection'''
 when it comes on their mortgages, credit card and many more then i can say
 that you are making your decision right. Of coarse there are so many
 services that you can see now in the market and there are so many
 companies that really give you the help for your assurances and for your
 '''claims''' but the more important is hat you able to choose the one that
 is right for your self.

 [[Image(http://kstsedgwick.com/DNN/Portals/2/mpis_pic2.jpg)]]

 If you finalize your decision that you will going to sell the
 '''[http://dev.drobilla.net/ticket/653 ppi claims]''' then i can say that
 being educated and have the authorization from the government authority
 should be your first priorities for your '''payment protection
 insurance'''. There are so many thing that you will be able to have the
 best as you wish for having a business about '''PPI Claims'''.

-- 
Ticket URL: <http://trac.libssh2.org/ticket/216>
libssh2 <http://trac.libssh2.org/>
C library for writing portable SSH2 clients

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Tue Mar  8 02:39:24 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p281d0aX021693;
	Tue, 8 Mar 2011 02:39:21 +0100
Received: from bxwall.lpma.nsw.gov.au (bxwall.lpma.nsw.gov.au [203.57.8.11])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p281ctdk021663
	for <libssh2-devel@cool.haxx.se>; Tue, 8 Mar 2011 02:38:58 +0100
Received: from SRV-QS-MAIL6.lands.nsw (srv-qs-mail6.lands.nsw [10.4.100.151]) 
	by bxwall.lpma.nsw.gov.au (8.14.1/8.14.1) with ESMTP id 
	p281cqiP030734 for <libssh2-devel@cool.haxx.se>; Tue, 8 Mar 2011 
	12:38:53 +1100
Received: from SRV-QS-MAIL6.lands.nsw ([fe80::d546:5904:a1f4:4f5d]) by 
	SRV-QS-MAIL6.lands.nsw ([fe80::d546:5904:a1f4:4f5d%12]) with mapi; 
	Tue, 8 Mar 2011 12:38:52 +1100
From: Phillip Wu <Phillip.Wu@lpma.nsw.gov.au>
To: "libssh2-devel@cool.haxx.se" <libssh2-devel@cool.haxx.se>
Date: Tue, 8 Mar 2011 12:38:52 +1100
Subject: libssh2_channel_read hangs when no data to read
Thread-Topic: libssh2_channel_read hangs when no data to read
Thread-Index: AcvdMZSP7+8gPRGhQd2G1nhHLA5QIQ==
Message-ID: <137CA4FE5CCDB7449ED3CD4445077AC305D3F370F3@SRV-QS-MAIL6.lands.nsw>
Accept-Language: en-US, en-AU
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
acceptlanguage: en-US, en-AU
MIME-Version: 1.0
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Tue, 08 Mar 2011 02:39:24 +0100 (CET)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Tue, 08 Mar 2011 02:39:00 +0100 (CET)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============0623813966=="
Errors-To: libssh2-devel-bounces@cool.haxx.se
Sender: libssh2-devel-bounces@cool.haxx.se

--===============0623813966==
Content-Language: en-US
Content-Type: multipart/alternative; 
    boundary="_000_137CA4FE5CCDB7449ED3CD4445077AC305D3F370F3SRVQSMAIL6lan_"

--_000_137CA4FE5CCDB7449ED3CD4445077AC305D3F370F3SRVQSMAIL6lan_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hi,

I having a problem with libssh2_channel_read hanging when there is no data =
to read.

I am using visual c++ 2010 Express and the libssh2 1.2.7 compiled using min=
gw.

This is what I have done:
1. Created a socket to the host (socket is blocked I/O)
2. Start a session
3. Authenticate user
4. Start a channel
5. Request pty (vanilla)
6. libssh2_channel_exec("passwd")
Read from the channel(after changing to non-block)  as follows (I got most =
of the code from ssh2_exec example):

static int waitsocket(int socket_fd, LIBSSH2_SESSION *sessioni, int timetow=
ait)
{
    struct timeval timeout;
    int rc;
    fd_set fd;
    fd_set *writefd =3D NULL;
    fd_set *readfd =3D NULL;
    int dir;
    timeout.tv_sec =3D timetowait;
    timeout.tv_usec =3D 0;
    FD_ZERO(&fd);
    FD_SET(socket_fd, &fd);
    /* now make sure we wait in the correct direction */
    dir =3D libssh2_session_block_directions(session);
    if(dir & LIBSSH2_SESSION_BLOCK_INBOUND)
        readfd =3D &fd;
    if(dir & LIBSSH2_SESSION_BLOCK_OUTBOUND)
        writefd =3D &fd;
    rc =3D select(socket_fd + 1, readfd, writefd, NULL, &timeout);
    return rc;
}

int ssh2_read(SOCKET sock, LIBSSH2_SESSION *session, LIBSSH2_CHANNEL *chann=
el, char *buffer, int bufsize, int timeout) {
  int rc;
  char *p;
  u_long mode =3D 1;
  int status;
  int size;

  /* non blocking */
  status=3Dioctlsocket (sock, FIONBIO, &mode);
  if (status!=3D0) return -1;
  p=3Dbuffer;
  size=3Dbufsize;
  *p=3D0;
  for( ;; )
  {

   do
   {
     rc =3D libssh2_channel_read( channel, p, size);
     if( rc > 0 )
     {
       p+=3Drc;
       size-=3Drc;
     }
     else {
       fprintf(stderr, "libssh2_channel_read returned %d\n", rc);
       if (rc!=3D0) return -2;
     }
   }
   while( rc > 0 );

   if( rc =3D=3D LIBSSH2_ERROR_EAGAIN ) rc=3Dwaitsocket(sock, session, time=
out);
   else break;
  }
  /* non blocking */
  mode=3D0;
  status=3Dioctlsocket (sock, FIONBIO, &mode);
  if (status!=3D0) return -1;
  *p=3D0;
  return 0;
}

Using trace code I found out that I have got from the remote host a prompt =
to key in the
exisiting password. The code is hanging at libssh2_channel_read(). I am exp=
ecting that the read
should come back with 0 bytes read. The waitsocket() code never gets run.

Can someone please help me and tell me how I can fix this problem?
ps. I did try to turn on debugging:
      ./configure -enable_debugging
     and make a call to libssh2_trace(session,~0);
    but nothing came out on stderr

***************************************************************
This message is intended for the addressee named and may contain confidenti=
al information. If you are not the intended recipient, please delete it and=
 notify the sender. Views expressed in this message are those of the indivi=
dual sender, and are not necessarily the views of the Land and Property Man=
agement Authority. This email message has been swept by MIMEsweeper for the=
 presence of computer viruses.
***************************************************************
Please consider the environment before printing this email.

--_000_137CA4FE5CCDB7449ED3CD4445077AC305D3F370F3SRVQSMAIL6lan_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:x=3D"urn:schemas-microsoft-com:office:excel" xmlns:p=3D"urn:schemas-m=
icrosoft-com:office:powerpoint" xmlns:a=3D"urn:schemas-microsoft-com:office=
:access" xmlns:dt=3D"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s=3D"=
uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs=3D"urn:schemas-microsof=
t-com:rowset" xmlns:z=3D"#RowsetSchema" xmlns:b=3D"urn:schemas-microsoft-co=
m:office:publisher" xmlns:ss=3D"urn:schemas-microsoft-com:office:spreadshee=
t" xmlns:c=3D"urn:schemas-microsoft-com:office:component:spreadsheet" xmlns=
:odc=3D"urn:schemas-microsoft-com:office:odc" xmlns:oa=3D"urn:schemas-micro=
soft-com:office:activation" xmlns:html=3D"http://www.w3.org/TR/REC-html40" =
xmlns:q=3D"http://schemas.xmlsoap.org/soap/envelope/" xmlns:rtc=3D"http://m=
icrosoft.com/officenet/conferencing" xmlns:D=3D"DAV:" xmlns:Repl=3D"http://=
schemas.microsoft.com/repl/" xmlns:mt=3D"http://schemas.microsoft.com/share=
point/soap/meetings/" xmlns:x2=3D"http://schemas.microsoft.com/office/excel=
/2003/xml" xmlns:ppda=3D"http://www.passport.com/NameSpace.xsd" xmlns:ois=
=3D"http://schemas.microsoft.com/sharepoint/soap/ois/" xmlns:dir=3D"http://=
schemas.microsoft.com/sharepoint/soap/directory/" xmlns:ds=3D"http://www.w3=
.org/2000/09/xmldsig#" xmlns:dsp=3D"http://schemas.microsoft.com/sharepoint=
/dsp" xmlns:udc=3D"http://schemas.microsoft.com/data/udc" xmlns:xsd=3D"http=
://www.w3.org/2001/XMLSchema" xmlns:sub=3D"http://schemas.microsoft.com/sha=
repoint/soap/2002/1/alerts/" xmlns:ec=3D"http://www.w3.org/2001/04/xmlenc#"=
 xmlns:sp=3D"http://schemas.microsoft.com/sharepoint/" xmlns:sps=3D"http://=
schemas.microsoft.com/sharepoint/soap/" xmlns:xsi=3D"http://www.w3.org/2001=
/XMLSchema-instance" xmlns:udcs=3D"http://schemas.microsoft.com/data/udc/so=
ap" xmlns:udcxf=3D"http://schemas.microsoft.com/data/udc/xmlfile" xmlns:udc=
p2p=3D"http://schemas.microsoft.com/data/udc/parttopart" xmlns:wf=3D"http:/=
/schemas.microsoft.com/sharepoint/soap/workflow/" xmlns:dsss=3D"http://sche=
mas.microsoft.com/office/2006/digsig-setup" xmlns:dssi=3D"http://schemas.mi=
crosoft.com/office/2006/digsig" xmlns:mdssi=3D"http://schemas.openxmlformat=
s.org/package/2006/digital-signature" xmlns:mver=3D"http://schemas.openxmlf=
ormats.org/markup-compatibility/2006" xmlns:m=3D"http://schemas.microsoft.c=
om/office/2004/12/omml" xmlns:mrels=3D"http://schemas.openxmlformats.org/pa=
ckage/2006/relationships" xmlns:spwp=3D"http://microsoft.com/sharepoint/web=
partpages" xmlns:ex12t=3D"http://schemas.microsoft.com/exchange/services/20=
06/types" xmlns:ex12m=3D"http://schemas.microsoft.com/exchange/services/200=
6/messages" xmlns:pptsl=3D"http://schemas.microsoft.com/sharepoint/soap/Sli=
deLibrary/" xmlns:spsl=3D"http://microsoft.com/webservices/SharePointPortal=
Server/PublishedLinksService" xmlns:Z=3D"urn:schemas-microsoft-com:" xmlns:=
st=3D"&#1;" xmlns=3D"http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUI=
V=3D"Content-Type" CONTENT=3D"text/html; charset=3Dus-ascii"><meta name=3DG=
enerator content=3D"Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Consolas;
	panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Calibri","sans-serif";
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;}
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body lang=3DEN-AU link=3Dblue vli=
nk=3Dpurple><div class=3DWordSection1><p class=3DMsoNormal>Hi,<o:p></o:p></=
p><p class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>I having a=
 problem with libssh2_channel_read hanging when there is no data to read.<o=
:p></o:p></p><p class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal=
>I am using visual c++ 2010 Express and the libssh2 1.2.7 compiled using mi=
ngw.<o:p></o:p></p><p class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMso=
Normal>This is what I have done:<o:p></o:p></p><p class=3DMsoNormal>1. Crea=
ted a socket to the host (socket is blocked I/O)<o:p></o:p></p><p class=3DM=
soNormal>2. Start a session <o:p></o:p></p><p class=3DMsoNormal>3. Authenti=
cate user<o:p></o:p></p><p class=3DMsoNormal>4. Start a channel<o:p></o:p><=
/p><p class=3DMsoNormal>5. Request pty (vanilla)<o:p></o:p></p><p class=3DM=
soNormal>6. libssh2_channel_exec(&quot;passwd&quot;)<o:p></o:p></p><p class=
=3DMsoNormal> <o:p></o:p></p><p class=3DMsoNormal>Read from the channel(aft=
er changing to non-block) &nbsp;as follows (I got most of the code from ssh=
2_exec example):<o:p></o:p></p><p class=3DMsoNormal><o:p>&nbsp;</o:p></p><p=
 class=3DMsoNormal>static int waitsocket(int socket_fd, LIBSSH2_SESSION *se=
ssioni, int timetowait)<o:p></o:p></p><p class=3DMsoNormal>{<o:p></o:p></p>=
<p class=3DMsoNormal>&nbsp;&nbsp;&nbsp; struct timeval timeout;<o:p></o:p><=
/p><p class=3DMsoNormal>&nbsp;&nbsp;&nbsp; int rc;<o:p></o:p></p><p class=
=3DMsoNormal>&nbsp;&nbsp;&nbsp; fd_set fd;<o:p></o:p></p><p class=3DMsoNorm=
al>&nbsp;&nbsp;&nbsp; fd_set *writefd =3D NULL;<o:p></o:p></p><p class=3DMs=
oNormal>&nbsp;&nbsp;&nbsp; fd_set *readfd =3D NULL;<o:p></o:p></p><p class=
=3DMsoNormal>&nbsp;&nbsp;&nbsp; int dir;<o:p></o:p></p><p class=3DMsoNormal=
> <o:p></o:p></p><p class=3DMsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;timeout.tv_se=
c =3D timetowait;<o:p></o:p></p><p class=3DMsoNormal>&nbsp;&nbsp;&nbsp; tim=
eout.tv_usec =3D 0;<o:p></o:p></p><p class=3DMsoNormal>&nbsp;&nbsp;&nbsp; F=
D_ZERO(&amp;fd);<o:p></o:p></p><p class=3DMsoNormal>&nbsp;&nbsp;&nbsp; FD_S=
ET(socket_fd, &amp;fd);<o:p></o:p></p><p class=3DMsoNormal>&nbsp;&nbsp;&nbs=
p; /* now make sure we wait in the correct direction */ <o:p></o:p></p><p c=
lass=3DMsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;dir =3D libssh2_session_block_dire=
ctions(session);<o:p></o:p></p><p class=3DMsoNormal>&nbsp;&nbsp;&nbsp; if(d=
ir &amp; LIBSSH2_SESSION_BLOCK_INBOUND)<o:p></o:p></p><p class=3DMsoNormal>=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; readfd =3D &amp;fd;<o:p></o:p></=
p><p class=3DMsoNormal>&nbsp;&nbsp;&nbsp; if(dir &amp; LIBSSH2_SESSION_BLOC=
K_OUTBOUND)<o:p></o:p></p><p class=3DMsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; writefd =3D &amp;fd;<o:p></o:p></p><p class=3DMsoNormal>&nbs=
p;&nbsp;&nbsp; rc =3D select(socket_fd + 1, readfd, writefd, NULL, &amp;tim=
eout);<o:p></o:p></p><p class=3DMsoNormal>&nbsp;&nbsp;&nbsp; return rc;<o:p=
></o:p></p><p class=3DMsoNormal>}<o:p></o:p></p><p class=3DMsoNormal><o:p>&=
nbsp;</o:p></p><p class=3DMsoNormal>int ssh2_read(SOCKET sock, LIBSSH2_SESS=
ION *session, LIBSSH2_CHANNEL *channel, char *buffer, int bufsize, int time=
out) {<o:p></o:p></p><p class=3DMsoNormal>&nbsp; int rc;<o:p></o:p></p><p c=
lass=3DMsoNormal>&nbsp; char *p;<o:p></o:p></p><p class=3DMsoNormal>&nbsp; =
u_long mode =3D 1;<o:p></o:p></p><p class=3DMsoNormal>&nbsp; int status;<o:=
p></o:p></p><p class=3DMsoNormal>&nbsp; int size;<o:p></o:p></p><p class=3D=
MsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>&nbsp; /* non blocking =
*/<o:p></o:p></p><p class=3DMsoNormal>&nbsp; status=3Dioctlsocket (sock, FI=
ONBIO, &amp;mode);<o:p></o:p></p><p class=3DMsoNormal>&nbsp; if (status!=3D=
0) return -1;<o:p></o:p></p><p class=3DMsoNormal>&nbsp; p=3Dbuffer;<o:p></o=
:p></p><p class=3DMsoNormal>&nbsp; size=3Dbufsize;<o:p></o:p></p><p class=
=3DMsoNormal>&nbsp; *p=3D0;<o:p></o:p></p><p class=3DMsoNormal>&nbsp; for( =
;; )<o:p></o:p></p><p class=3DMsoNormal>&nbsp; {<o:p></o:p></p><p class=3DM=
soNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>&nbsp;&nbsp; do<o:p></o:=
p></p><p class=3DMsoNormal>&nbsp;&nbsp; {<o:p></o:p></p><p class=3DMsoNorma=
l>&nbsp;&nbsp;&nbsp;&nbsp; rc =3D libssh2_channel_read( channel, p, size);<=
o:p></o:p></p><p class=3DMsoNormal>&nbsp;&nbsp;&nbsp;&nbsp; if( rc &gt; 0 )=
<o:p></o:p></p><p class=3DMsoNormal>&nbsp;&nbsp;&nbsp;&nbsp; {<o:p></o:p></=
p><p class=3DMsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; p+=3Drc;<o:p></=
o:p></p><p class=3DMsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; size-=3Dr=
c;<o:p></o:p></p><p class=3DMsoNormal>&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p>=
</p><p class=3DMsoNormal>&nbsp;&nbsp;&nbsp;&nbsp; else {<o:p></o:p></p><p c=
lass=3DMsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fprintf(stderr, &quot=
;libssh2_channel_read returned %d\n&quot;, rc);<o:p></o:p></p><p class=3DMs=
oNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (rc!=3D0) return -2;<o:p></=
o:p></p><p class=3DMsoNormal>&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p></p><p cl=
ass=3DMsoNormal>&nbsp;&nbsp; }<o:p></o:p></p><p class=3DMsoNormal>&nbsp;&nb=
sp; while( rc &gt; 0 );<o:p></o:p></p><p class=3DMsoNormal>&nbsp;&nbsp;&nbs=
p;&nbsp; <o:p></o:p></p><p class=3DMsoNormal>&nbsp;&nbsp;&nbsp;if( rc =3D=
=3D LIBSSH2_ERROR_EAGAIN ) rc=3Dwaitsocket(sock, session, timeout);<o:p></o=
:p></p><p class=3DMsoNormal>&nbsp;&nbsp; else break;<o:p></o:p></p><p class=
=3DMsoNormal>&nbsp; }<o:p></o:p></p><p class=3DMsoNormal>&nbsp; /* non bloc=
king */<o:p></o:p></p><p class=3DMsoNormal>&nbsp; mode=3D0;<o:p></o:p></p><=
p class=3DMsoNormal>&nbsp; status=3Dioctlsocket (sock, FIONBIO, &amp;mode);=
<o:p></o:p></p><p class=3DMsoNormal>&nbsp; if (status!=3D0) return -1;<o:p>=
</o:p></p><p class=3DMsoNormal>&nbsp; *p=3D0;<o:p></o:p></p><p class=3DMsoN=
ormal>&nbsp; return 0;<o:p></o:p></p><p class=3DMsoNormal>}<o:p></o:p></p><=
p class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>Using trace c=
ode I found out that I have got from the remote host a prompt to key in the=
 <o:p></o:p></p><p class=3DMsoNormal>exisiting password. The code is hangin=
g at libssh2_channel_read(). I am expecting that the read<o:p></o:p></p><p =
class=3DMsoNormal>should come back with 0 bytes read. The waitsocket() code=
 never gets run.<o:p></o:p></p><p class=3DMsoNormal><o:p>&nbsp;</o:p></p><p=
 class=3DMsoNormal>Can someone please help me and tell me how I can fix thi=
s problem?<o:p></o:p></p><p class=3DMsoNormal>ps. I did try to turn on debu=
gging:<o:p></o:p></p><p class=3DMsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ./=
configure &#8211;enable_debugging<o:p></o:p></p><p class=3DMsoNormal style=
=3D'text-autospace:none'>&nbsp;&nbsp;&nbsp;&nbsp; and make a call to <span =
style=3D'font-size:9.5pt;font-family:Consolas'>libssh2_trace(session,~0);<o=
:p></o:p></span></p><p class=3DMsoNormal>&nbsp;&nbsp;&nbsp; but nothing cam=
e out on stderr<o:p></o:p></p></div><font size=3D"1"><font size=3D"2"><p />=
<hr /><p /><p>This message is intended for the addressee named and may cont=
ain confidential information. If you are not the <font size=3D"2">intended =
recipient, please delete it and notify the sender. </font><font size=3D"2">=
Views expressed in this message are those of the </font><font size=3D"2">in=
dividual sender, and are not necessarily the views of </font><font size=3D"=
2">the Land and Property Management Authority. </font><font size=3D"2">This=
 email message has been swept by MIMEsweeper </font><font size=3D"2">for th=
e presence of computer viruses.</font> </p><p /><hr /><p><font face=3D"Helv=
etica-Bold" color=3D"#003200" size=3D"2"></font></p><p align=3D"left"><font=
 face=3D"arial,helvetica,sans-serif"><strong>Please consider the environmen=
t before printing this email.</strong></font></p></font></font>
</body></html>

--_000_137CA4FE5CCDB7449ED3CD4445077AC305D3F370F3SRVQSMAIL6lan_--

--===============0623813966==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

--===============0623813966==--

From libssh2-devel-bounces@cool.haxx.se  Tue Mar  8 08:58:09 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p287voGQ026047;
	Tue, 8 Mar 2011 08:58:07 +0100
Received: from giant.haxx.se (giant.haxx.se [80.67.6.50])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p287vn41026040
	for <libssh2-devel@cool.haxx.se>; Tue, 8 Mar 2011 08:57:49 +0100
Date: Tue, 8 Mar 2011 08:57:49 +0100 (CET)
From: Daniel Stenberg <daniel@haxx.se>
X-X-Sender: dast@giant.haxx.se
To: libssh2 development <libssh2-devel@cool.haxx.se>
Subject: Re: libssh2_channel_read hangs when no data to read
In-Reply-To: <137CA4FE5CCDB7449ED3CD4445077AC305D3F370F3@SRV-QS-MAIL6.lands.nsw>
Message-ID: <alpine.DEB.2.00.1103080854200.6320@tvnag.unkk.fr>
References: <137CA4FE5CCDB7449ED3CD4445077AC305D3F370F3@SRV-QS-MAIL6.lands.nsw>
User-Agent: Alpine 2.00 (DEB 1167 2008-08-23)
X-fromdanielhimself: yes
MIME-Version: 1.0
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Tue, 08 Mar 2011 08:58:09 +0100 (CET)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Tue, 08 Mar 2011 08:57:49 +0100 (CET)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Errors-To: libssh2-devel-bounces@cool.haxx.se
Sender: libssh2-devel-bounces@cool.haxx.se

On Tue, 8 Mar 2011, Phillip Wu wrote:

>  /* non blocking */
>  status=ioctlsocket (sock, FIONBIO, &mode);

I advice against changing the mode of the socket "behind libssh2's back". The 
way to change the mode of the API is like this:

   http://www.libssh2.org/libssh2_session_set_blocking.html

> ps. I did try to turn on debugging:
>      ./configure -enable_debugging
>     and make a call to libssh2_trace(session,~0);
>    but nothing came out on stderr

"./configure --help" is your friend, it lists all options. It says:

   --enable-debug          Enable pedantic and debug options

-- 

  / daniel.haxx.se
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Thu Mar 10 09:08:01 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2A87V4l018062;
	Thu, 10 Mar 2011 09:07:57 +0100
Received: from foo.stuge.se (qmailr@foo.stuge.se [213.88.146.6])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with SMTP id p2A87Vq5018058
	for <libssh2-devel@cool.haxx.se>; Thu, 10 Mar 2011 09:07:31 +0100
Received: (qmail 28493 invoked by uid 501); 10 Mar 2011 08:07:32 -0000
Message-ID: <20110310080732.28492.qmail@stuge.se>
Date: Thu, 10 Mar 2011 09:07:32 +0100
From: Peter Stuge <peter@stuge.se>
To: libssh2-devel@cool.haxx.se
Subject: Trac moderation
Mail-Followup-To: libssh2-devel@cool.haxx.se
MIME-Version: 1.0
Content-Disposition: inline
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Thu, 10 Mar 2011 09:08:00 +0100 (CET)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Thu, 10 Mar 2011 09:07:31 +0100 (CET)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: libssh2-devel-bounces@cool.haxx.se
Sender: libssh2-devel-bounces@cool.haxx.se

I've set up moderation for changes made by unknown users in Trac, so
that we avoid spam sticking.

Someone needs to moderate.

Currently I'm the only moderator. Please let me know if you would be
willing to help with this task.

As you know there is not very high load on our tracker so this will
not require much attention.

If you agree and you get picked as moderator by the plugin, your
registered name (but not email) will be shown to the ticket (comment)
submitter with a note that we try to review within a few days. You
are then sent an email with a link to a page where you can accept or
reject. There is also a "Moderator" link top right when logged in to
Trac.

So, no more spam now. I've also deleted some old spam. This means we'll
see new tickets with lower numbers than the highest currently valid
ticket, but that's technically no problem since nothing refers to the
spam tickets anyway.

Many thanks to everyone who has helped clean up spam so far!


//Peter
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Thu Mar 10 09:34:23 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2A8YJtu031727;
	Thu, 10 Mar 2011 09:34:22 +0100
Received: from giant.haxx.se (giant.haxx.se [80.67.6.50])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2A8YHQM031720
	for <libssh2-devel@cool.haxx.se>; Thu, 10 Mar 2011 09:34:17 +0100
Date: Thu, 10 Mar 2011 09:34:17 +0100 (CET)
From: Daniel Stenberg <daniel@haxx.se>
X-X-Sender: dast@giant.haxx.se
To: libssh2 development <libssh2-devel@cool.haxx.se>
Subject: Release time on April 5
Message-ID: <alpine.DEB.2.00.1102141636180.14361@tvnag.unkk.fr>
User-Agent: Alpine 2.00 (DEB 1167 2008-08-23)
X-fromdanielhimself: yes
MIME-Version: 1.0
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Thu, 10 Mar 2011 09:34:23 +0100 (CET)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Thu, 10 Mar 2011 09:34:17 +0100 (CET)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Errors-To: libssh2-devel-bounces@cool.haxx.se
Sender: libssh2-devel-bounces@cool.haxx.se

Hi friends,

There are still some pending problems with the current git code if we judge by 
the bug reports at http://trac.libssh2.org/

But we've also fixed a lot of bugs and improved things all over, which makes 
me determined to still persue with a release of what we have.

This is a call for help and an urge that everyone gives the bug reports an 
extra glance in order to see if something can be fixed, closed or commented to 
bring us forward.

Barring no new major problems appear, I have my eyes fixed on April 5th as a 
release date for version 1.2.8. That's almost a month from now.

-- 

  / daniel.haxx.se
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Thu Mar 10 12:50:22 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2ABo1AC008044;
	Thu, 10 Mar 2011 12:50:19 +0100
Received: from mail-gw0-f54.google.com (mail-gw0-f54.google.com [74.125.83.54])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2ABnwiE008012
	(version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Thu, 10 Mar 2011 12:49:59 +0100
Received: by gwb15 with SMTP id 15so471190gwb.41
	for <libssh2-devel@cool.haxx.se>; Thu, 10 Mar 2011 03:49:59 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:in-reply-to:references:date
	:message-id:subject:from:to:cc:content-type;
	bh=LRkDpPsePv3opIZ8HFU2xluhUicV2fmgz0O+4K4GTZ8=;
	b=kosuMDc1sot2k3rkIYOWGaCCjZkVmWpIRLbK78opEax3ASZ2Fex38CMXaxYyhOZf7I
	d8POrk0fqy6rO7cALdvd5dn1vPO8FpwpOB0mBuV2wH39wudBEdVdWp8bFgZTOQhprAIa
	ThT3Yc/2PR7/dcSJH/5mjtUwVNLmYSfABPJOw=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type;
	b=kXPRaO0a8J+OcLaPLuxiOtTdbdulglRWAprxae095vCwyv//IOoXUse03Ac9V2LRGV
	jDMe4SlOahYgEd087V6sYxjVImN+jIpt/gVV+Sz4X42/524Fo/HmtYatTjYybfnWBWbm
	jA0ZE1Al2l/q68bfAevVjQkTr1z9nXSXwrKRM=
MIME-Version: 1.0
Received: by 10.236.76.134 with SMTP id b6mr1103140yhe.109.1299757796015; Thu,
	10 Mar 2011 03:49:56 -0800 (PST)
Received: by 10.147.182.16 with HTTP; Thu, 10 Mar 2011 03:49:55 -0800 (PST)
In-Reply-To: <alpine.DEB.2.00.1103062245120.28357@tvnag.unkk.fr>
References: <AANLkTikWKvz9O8bjbKrdyNnH54ozetM_yWm0GmwiZr=8@mail.gmail.com>
	<alpine.DEB.2.00.1103062245120.28357@tvnag.unkk.fr>
Date: Thu, 10 Mar 2011 17:19:55 +0530
Message-ID: <AANLkTin1sK=R9kzwKVFQNuUMPkyQPW3f6TifwM6CFqiS@mail.gmail.com>
Subject: Re: Small binary files are getting transferred but not the larger
	ones in libssh2 SFTP
From: kali muthu <direct2kali@gmail.com>
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Thu, 10 Mar 2011 12:50:22 +0100 (CET)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Thu, 10 Mar 2011 12:50:00 +0100 (CET)
Cc: Daniel Stenberg <daniel@haxx.se>
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============0067909270=="
Errors-To: libssh2-devel-bounces@cool.haxx.se
Sender: libssh2-devel-bounces@cool.haxx.se

--===============0067909270==
Content-Type: multipart/alternative; boundary=20cf300fb069b9bfa6049e1f71d3

--20cf300fb069b9bfa6049e1f71d3
Content-Type: text/plain; charset=ISO-8859-1

This is my C++ code for transferring the files..

int sshInitStatus = libssh2_init(0);
    if(sshInitStatus != 0)
    {
        return;
    }

    WSADATA wsaData;
    int startupStatus = WSAStartup(MAKEWORD(1,1),&wsaData);
    if(startupStatus != 0)
    {
        return;
    }

    /// Socket Creation
    m_socketID = socket(AF_INET,SOCK_STREAM,0);
    struct sockaddr_in sin;
    sin.sin_family = AF_INET;
    sin.sin_port = htons(22);
    sin.sin_addr.s_addr = inet_addr(m_SFTPServerIP.toAscii().data());


    /// Socket Connection
    int connectionStatus = ::connect(m_socketID,(struct sockaddr*)(&sin),
                                   sizeof(struct sockaddr_in));
    if(connectionStatus != 0)
    {
        return;
    }

    /// Session Initialization
    m_sshSession = libssh2_session_init();
    if(!m_sshSession)
    {
        //std::cout<<"Unable to initialize a session.";
    }
    libssh2_session_set_blocking(m_sshSession,0);

    /// Session Startup
    int handshakeStatus = -37;

    while(handshakeStatus == LIBSSH2_ERROR_EAGAIN)
    {
        handshakeStatus = libssh2_session_startup(m_sshSession,m_socketID);
    }

    if(handshakeStatus != 0)
    {
        return;
    }
int authenticationStatus = -37;

    while(authenticationStatus == LIBSSH2_ERROR_EAGAIN)
    {
        authenticationStatus =
libssh2_userauth_password(m_sshSession,m_username.toAscii().data(),

 m_password.toAscii().data());
    }
    if(authenticationStatus != 0)
    {
        return;
    }

    do
    {
        /// Init SFTP Session
        m_sftpSession = libssh2_sftp_init(m_sshSession);
        if(m_sftpSession == NULL)
        {
            int lLastSFTPError = libssh2_session_last_errno(m_sshSession);
            if( lLastSFTPError == LIBSSH2_ERROR_EAGAIN)
            {
                waitSocket();
            }
        }
    }while(m_sftpSession == NULL);
 do
        {
            m_sftpHandle =
libssh2_sftp_open(m_sftpSession,"/usr/LongBinaryFile",

 LIBSSH2_FXF_READ,LIBSSH2_SFTP_OPENFILE);
            if(m_sftpHandle == NULL)
            {
                int lLastSFTPError =
libssh2_session_last_errno(m_sshSession);
                if( lLastSFTPError == LIBSSH2_ERROR_EAGAIN)
                {
                    waitSocket();
                }
            }
        }while(m_sftpHandle == NULL);

        int readStatus = LIBSSH2_ERROR_EAGAIN;

        std::ofstream
lTargetFile("transferredOne",std::ios::out|std::ios::binary);

        if(lTargetFile.is_open())
        {
            do
            {
                char buffer[1024]={'\0'};
                do
                {
                    readStatus =
libssh2_sftp_read(m_sftpHandle,buffer,1024);
                }while(readStatus == LIBSSH2_ERROR_EAGAIN);

                if(buffer[0] == '\0')
                {
                    std::cout<<"Empty Buffer";
                }

                if(readStatus>0)
                {
lTargetFile<<buffer;
                }
                else
                {
                    break;
                }
            }while(true);
        }
        lTargetFile.close();
        libssh2_sftp_close(m_sftpHandle);


And I could see that most of the time the execution goes to the
block  if(buffer[0] == '\0') and that is the reason for the resulting binary
files has less size than the original.

I tried your example also and still the resulting files has lesser size than
the original.

On Mon, Mar 7, 2011 at 3:16 AM, Daniel Stenberg <daniel@haxx.se> wrote:

> On Thu, 3 Mar 2011, kali muthu wrote:
>
>  I am using the libssh2_sftp_read() to read the remote server files which
>> are binary. I am using the session in non-blocking mode. I can able to
>> transfer text files and smaller binary files.
>>
>
> Can you show us a full source code of your app that doesn't work? We do
> provide the sftp_nonblock.c example that shows a SFTP download using the
> non-blocking API...
>
> --
>
>  / daniel.haxx.se
> _______________________________________________
> libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
>



-- 
Regards,
Kali

--20cf300fb069b9bfa6049e1f71d3
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

This is my C++ code for transferring the files..<div><br></div><div><div><s=
pan class=3D"Apple-tab-span" style=3D"white-space:pre">	</span>int sshInitS=
tatus =3D libssh2_init(0);</div><div>=A0 =A0 if(sshInitStatus !=3D 0)</div>=
<div>=A0 =A0 {</div>
<div>=A0 =A0 =A0 =A0 return;</div><div>=A0 =A0 }</div><div><br></div><div>=
=A0 =A0 WSADATA wsaData;</div><div>=A0 =A0 int startupStatus =3D WSAStartup=
(MAKEWORD(1,1),&amp;wsaData);</div><div>=A0 =A0 if(startupStatus !=3D 0)</d=
iv><div>=A0 =A0 {</div><div>=A0 =A0 =A0 =A0 return;</div>
<div>=A0 =A0 }</div><div><br></div><div>=A0 =A0 /// Socket Creation</div><d=
iv>=A0 =A0 m_socketID =3D socket(AF_INET,SOCK_STREAM,0);</div><div>=A0 =A0 =
struct sockaddr_in sin;</div><div>=A0 =A0 sin.sin_family =3D AF_INET;</div>=
<div>=A0 =A0 sin.sin_port =3D htons(22);</div>
<div>=A0 =A0 sin.sin_addr.s_addr =3D inet_addr(m_SFTPServerIP.toAscii().dat=
a());</div><div><br></div><div><br></div><div>=A0 =A0 /// Socket Connection=
</div><div>=A0 =A0 int connectionStatus =3D ::connect(m_socketID,(struct so=
ckaddr*)(&amp;sin),</div>
<div>=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0sizeof(struct sockaddr_in));</div><div>=A0 =A0 if(connectionStatus !=3D =
0)</div><div>=A0 =A0 {</div><div>=A0 =A0 =A0 =A0 return;</div><div>=A0 =A0 =
}</div><div><br></div><div>=A0 =A0 /// Session Initialization</div>
<div>=A0 =A0 m_sshSession =3D libssh2_session_init();</div><div>=A0 =A0 if(=
!m_sshSession)</div><div>=A0 =A0 {</div><div>=A0 =A0 =A0 =A0 //std::cout&lt=
;&lt;&quot;Unable to initialize a session.&quot;;</div><div>=A0 =A0 }</div>=
<div>=A0 =A0 libssh2_session_set_blocking(m_sshSession,0);</div>
<div><br></div><div>=A0 =A0 /// Session Startup</div><div>=A0 =A0 int hands=
hakeStatus =3D -37;</div><div><br></div><div>=A0 =A0 while(handshakeStatus =
=3D=3D LIBSSH2_ERROR_EAGAIN)</div><div>=A0 =A0 {</div><div>=A0 =A0 =A0 =A0 =
handshakeStatus =3D libssh2_session_startup(m_sshSession,m_socketID);</div>
<div>=A0 =A0 }</div><div><br></div><div>=A0 =A0 if(handshakeStatus !=3D 0)<=
/div><div>=A0 =A0 {</div><div>=A0 =A0 =A0 =A0 return;</div><div>=A0 =A0 }</=
div><div><span class=3D"Apple-tab-span" style=3D"white-space:pre">	</span>i=
nt authenticationStatus =3D -37;</div>
<div><br></div><div>=A0 =A0 while(authenticationStatus =3D=3D LIBSSH2_ERROR=
_EAGAIN)</div><div>=A0 =A0 {</div><div>=A0 =A0 =A0 =A0 authenticationStatus=
 =3D libssh2_userauth_password(m_sshSession,m_username.toAscii().data(),</d=
iv><div>=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0m_password.toAscii().data()=
);</div>
<div>=A0 =A0 }</div><div>=A0 =A0 if(authenticationStatus !=3D 0)</div><div>=
=A0 =A0 {</div><div>=A0 =A0 =A0 =A0 return;</div><div>=A0 =A0 }</div><div><=
br></div><div>=A0 =A0 do</div><div>=A0 =A0 {</div><div>=A0 =A0 =A0 =A0 /// =
Init SFTP Session</div><div>=A0 =A0 =A0 =A0 m_sftpSession =3D libssh2_sftp_=
init(m_sshSession);</div>
<div>=A0 =A0 =A0 =A0 if(m_sftpSession =3D=3D NULL)</div><div>=A0 =A0 =A0 =
=A0 {</div><div>=A0 =A0 =A0 =A0 =A0 =A0 int lLastSFTPError =3D libssh2_sess=
ion_last_errno(m_sshSession);</div><div>=A0 =A0 =A0 =A0 =A0 =A0 if( lLastSF=
TPError =3D=3D LIBSSH2_ERROR_EAGAIN)</div><div>=A0 =A0 =A0 =A0 =A0 =A0 {</d=
iv>
<div>=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 waitSocket();</div><div>=A0 =A0 =A0 =
=A0 =A0 =A0 }</div><div>=A0 =A0 =A0 =A0 }</div><div>=A0 =A0 }while(m_sftpSe=
ssion =3D=3D NULL);</div><div><span class=3D"Apple-tab-span" style=3D"white=
-space:pre">	</span></div><div><span class=3D"Apple-tab-span" style=3D"whit=
e-space:pre">	</span>do</div>
<div>=A0 =A0 =A0 =A0 {</div><div>=A0 =A0 =A0 =A0 =A0 =A0 m_sftpHandle =3D l=
ibssh2_sftp_open(m_sftpSession,&quot;/usr/LongBinaryFile&quot;,</div><div>=
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A0 =A0 =A0 =A0LIBSSH2_FXF_READ,LIBSSH2_SFTP_OPENFILE);</div><div>
=A0 =A0 =A0 =A0 =A0 =A0 if(m_sftpHandle =3D=3D NULL)</div><div>=A0 =A0 =A0 =
=A0 =A0 =A0 {</div><div>=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 int lLastSFTPError =
=3D libssh2_session_last_errno(m_sshSession);</div><div>=A0 =A0 =A0 =A0 =A0=
 =A0 =A0 =A0 if( lLastSFTPError =3D=3D LIBSSH2_ERROR_EAGAIN)</div>
<div>=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 {</div><div>=A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 waitSocket();</div><div>=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 }</=
div><div>=A0 =A0 =A0 =A0 =A0 =A0 }</div><div>=A0 =A0 =A0 =A0 }while(m_sftpH=
andle =3D=3D NULL);</div><div><br></div><div>=A0 =A0 =A0 =A0 int readStatus=
 =3D LIBSSH2_ERROR_EAGAIN;</div>
<div><br></div><div>=A0 =A0 =A0 =A0 std::ofstream lTargetFile(&quot;transfe=
rredOne&quot;,std::ios::out|std::ios::binary);</div><div><br></div><div>=A0=
 =A0 =A0 =A0 if(lTargetFile.is_open())</div><div>=A0 =A0 =A0 =A0 {</div><di=
v>=A0 =A0 =A0 =A0 =A0 =A0 do</div>
<div>=A0 =A0 =A0 =A0 =A0 =A0 {</div><div>=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ch=
ar buffer[1024]=3D{&#39;\0&#39;};</div><div>=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 do</div><div>=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 {</div><div>=A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 readStatus =3D libssh2_sftp_read(m_sftpHandle,buffe=
r,1024);</div>
<div>=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 }while(readStatus =3D=3D LIBSSH2_ERROR=
_EAGAIN);</div><div><br></div><div>=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if(buffe=
r[0] =3D=3D &#39;\0&#39;)</div><div>=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 {</div>=
<div>=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 std::cout&lt;&lt;&quot;Empty B=
uffer&quot;;</div>
<div>=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 }</div><div><br></div><div>=A0 =A0 =A0=
 =A0 =A0 =A0 =A0 =A0 if(readStatus&gt;0)</div><div>=A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 {</div><div><span class=3D"Apple-tab-span" style=3D"white-space:pre=
">					</span>lTargetFile&lt;&lt;buffer;</div><div>
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 }</div><div>=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 else</div><div>=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 {</div><div>=A0 =A0 =A0 =A0=
 =A0 =A0 =A0 =A0 =A0 =A0 break;</div><div>=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 }=
</div><div>=A0 =A0 =A0 =A0 =A0 =A0 }while(true);</div><div>=A0 =A0 =A0 =A0 =
}</div><div>=A0 =A0 =A0 =A0 lTargetFile.close();</div>
<div>=A0 =A0 =A0 =A0 libssh2_sftp_close(m_sftpHandle);</div><div><br></div>=
<div><br></div><div>And I could see that most of the time the execution goe=
s to the block=A0=A0if(buffer[0] =3D=3D &#39;\0&#39;) and that is the reaso=
n for the resulting binary files has less size than the original.</div>
<div><br></div><div>I tried your example also and still the resulting files=
 has lesser size than the original.</div><br><div class=3D"gmail_quote">On =
Mon, Mar 7, 2011 at 3:16 AM, Daniel Stenberg <span dir=3D"ltr">&lt;<a href=
=3D"mailto:daniel@haxx.se">daniel@haxx.se</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex;"><div class=3D"im">On Thu, 3 Mar 2011, kali =
muthu wrote:<br>
<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
I am using the libssh2_sftp_read() to read the remote server files which ar=
e binary. I am using the session in non-blocking mode. I can able to transf=
er text files and smaller binary files.<br>
</blockquote>
<br></div>
Can you show us a full source code of your app that doesn&#39;t work? We do=
 provide the sftp_nonblock.c example that shows a SFTP download using the n=
on-blocking API...<br><font color=3D"#888888">
<br>
-- <br>
<br>
=A0/ <a href=3D"http://daniel.haxx.se" target=3D"_blank">daniel.haxx.se</a>=
<br>
_______________________________________________<br>
libssh2-devel <a href=3D"http://cool.haxx.se/cgi-bin/mailman/listinfo/libss=
h2-devel" target=3D"_blank">http://cool.haxx.se/cgi-bin/mailman/listinfo/li=
bssh2-devel</a><br>
</font></blockquote></div><br><br clear=3D"all"><br>-- <br>Regards,<br>Kali=
<br>
</div>

--20cf300fb069b9bfa6049e1f71d3--

--===============0067909270==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

--===============0067909270==--

From libssh2-devel-bounces@cool.haxx.se  Thu Mar 10 13:16:06 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2ACFtXl022332;
	Thu, 10 Mar 2011 13:16:04 +0100
Received: from mail-qy0-f182.google.com (mail-qy0-f182.google.com
	[209.85.216.182])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2ACFr7W022307
	(version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Thu, 10 Mar 2011 13:15:54 +0100
Received: by qyk27 with SMTP id 27so1331426qyk.20
	for <libssh2-devel@cool.haxx.se>; Thu, 10 Mar 2011 04:15:54 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:content-type;
	bh=FcX70mBt9Sxzlrt/Tzv2IdYG0XntdniE55NjNcMVbCU=;
	b=feuFqlo59mvuxZdJG1Fk1JUuAEY7Oi1I/r1FkT55JjlMcPrwjITl9ar+Ktk/tc6Bzu
	A+Wq1HjTrYvGVpfN9PBFIbP6yQchn58CFotGzHIwqzoLVrh6I4m83xxmZhKnk85MwBTH
	DeIlZVohGw/LevRTpA3ksMHBCwUEeX2JTLtR4=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:content-type;
	b=s1Btb9u/SqYEzkIDQWhEPdoO1QKHHex7xDnkwYwv1a2gX3x7GcsHpHHPWyoSquilH3
	LZuIQiRL/P/EYkOuNfXgC0VHyVSzFsskxeKGckVlHVsymq+btgfuMrIckqO1d1sDacOV
	Mmr3MV+EtUY1ekdyZXgw6bWyMRIH5fzWu3D7A=
MIME-Version: 1.0
Received: by 10.229.136.208 with SMTP id s16mr1231956qct.134.1299759354145;
	Thu, 10 Mar 2011 04:15:54 -0800 (PST)
Received: by 10.229.29.197 with HTTP; Thu, 10 Mar 2011 04:15:54 -0800 (PST)
In-Reply-To: <20110310080732.28492.qmail@stuge.se>
References: <20110310080732.28492.qmail@stuge.se>
Date: Thu, 10 Mar 2011 12:15:54 +0000
X-Google-Sender-Auth: h-6WcI13hm4SbBcTMJJn1ej4W6U
Message-ID: <AANLkTikLrszEBwtG2J3=0wAuxcjF-ipstQjGWw_h=m0G@mail.gmail.com>
Subject: Re: Trac moderation
From: Alexander Lamaison <swish@lammy.co.uk>
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Thu, 10 Mar 2011 13:16:06 +0100 (CET)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Thu, 10 Mar 2011 13:15:54 +0100 (CET)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: libssh2-devel-bounces@cool.haxx.se
Sender: libssh2-devel-bounces@cool.haxx.se

On 10 March 2011 08:07, Peter Stuge <peter@stuge.se> wrote:
> I've set up moderation for changes made by unknown users in Trac, so
> that we avoid spam sticking.
>
> Someone needs to moderate.
>
> Currently I'm the only moderator. Please let me know if you would be
> willing to help with this task.

I'm happy to moderate.

Alex

--
Swish: Easy SFTP for Windows Explorer (http://www.swish-sftp.org)
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Fri Mar 11 17:28:54 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2BGSPk3004108;
	Fri, 11 Mar 2011 17:28:50 +0100
Received: from f1wall.ipetronik.com (f1wall.ipetronik.com [217.25.129.2])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2BGSNo4004089
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Fri, 11 Mar 2011 17:28:23 +0100
Received: from [10.1.1.108] (port=43130 helo=oesmail.ipetronik.de)
	by f1wall.ipetronik.com with esmtp (Exim 4.69)
	(envelope-from <Sebastien.Fricker@ipetronik.com>) id 1Py5CF-0005Jk-1A
	for libssh2-devel@cool.haxx.se; Fri, 11 Mar 2011 17:28:11 +0100
Received: from IPE_DOM-MTA by oesmail.ipetronik.de
	with Novell_GroupWise; Fri, 11 Mar 2011 17:28:11 +0100
X-CTCH-RefID: str=0001.0A0B0205.4D7A4D9B.011C,ss=1,fgs=0
Message-Id: <4D7A5BA70200003F0000D143@oesmail.ipetronik.de>
X-Mailer: Novell GroupWise Internet Agent 8.0.2 
Date: Fri, 11 Mar 2011 17:28:07 +0100
From: "Sebastien Fricker" <Sebastien.Fricker@ipetronik.com>
To: <libssh2-devel@cool.haxx.se>
Subject: Usage of errno and thread-safety
Mime-Version: 1.0
Content-Disposition: inline
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Fri, 11 Mar 2011 17:28:54 +0100 (CET)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Fri, 11 Mar 2011 17:28:23 +0100 (CET)
X-MIME-Autoconverted: from quoted-printable to 8bit by giant.haxx.se id
	p2BGSNo4004089
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="utf-8"
Errors-To: libssh2-devel-bounces@cool.haxx.se
Sender: libssh2-devel-bounces@cool.haxx.se
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by giant.haxx.se id p2BGSPk3004108

Hi,
I saw in the daily snapshot that errno is only used in _libssh2_send()
and _libssh2_recv().
That's good because it permits to better adapt libssh2 to other
platforms.

But I'm guessing if it is not possible to get rid of errno:
errno is a global error information that contain an error code but not
systematically from the actual socket.
Using this variable makes libssh2 not thread safe.

In fact _libssh2_send()/_libssh2_recv() returns only 3 values:
 1) >=0: number of bytes transmitted/received
 2) -EAGAIN: special error which indicates that the read/write
operation should be re-executed.
 3) <0 (but not -EAGAIN): real error.

Would it not be possible to use select to generate such error code?
This would made the _libssh2_send()/_libssh2_recv() thread safe.

For example:
ssize_t _libssh2_recv(libssh2_socket_t sock, void *buffer, size_t
length, int flags)
{
    ssize_t rc = recv(sock, buffer, length, flags);
    if (rc < 0 )
        return -errno;
    return rc;
}

would be rewritten something like:
ssize_t _libssh2_recv(libssh2_socket_t sock, void *buffer, size_t
length, int flags)
{
    ssize_t rc = recv(sock, buffer, length, flags);
    if (rc < 0 )
    {
      int             res; 
      fd_set          sready; 
      struct timeval  nowait; 

      FD_ZERO(&sready); 
      FD_SET((unsigned int)sock,&sready); 
      memset((char *)&nowait,0,sizeof(nowait)); 

      res = select(sock+1,&sready,NULL,NULL,&nowait); /* select without
timeout */
      if (res<0)
        return -EIO; /* Select gives an error */
      else if( FD_ISSET(sock,&sready) ) 
        return -EAGAIN; /* this should not occurs often: recv does not
receive, but just after it does */
      else 
        return -EAGAIN; /* socket not ready */ 
    }
    return rc;
}

I'm not sure if this code works. 

I'm waiting for comments.
SÃ©bastien

 

-- 

------------------------------------------------------------
Ipetronik GmbH & Co.KG
Jaegerweg 1
D-76532 Baden-Baden
 
Phone-No. +49 - (0)7221/9922-467
Fax-No. +49 - (0)7221/9922-153
 
mailto: sebastien.fricker@ipetronik.com
web: http://www.ipetronik.com 
 
------------------------------------------------------------
Kommanditgesellschaft mit Sitz in Baden-Baden, Registergericht HRA
Nr.201313
Persoenlich haftende Gesellschaft ist die IPETRONIK Verwaltungs GmbH 
mit Sitz in Baden-Baden, Registergericht Mannheim HRB Nr.202089, 
GeschÃ¤ftsfÃ¼hrer: J.Abromeit, E.Rudolf, A. Wocke
-------------------------------------------------------------
 
 


_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Fri Mar 11 19:02:40 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2BI2Qjd026099;
	Fri, 11 Mar 2011 19:02:39 +0100
Received: from giant.haxx.se (giant.haxx.se [80.67.6.50])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2BI2Osd026049
	for <libssh2-devel@cool.haxx.se>; Fri, 11 Mar 2011 19:02:24 +0100
Date: Fri, 11 Mar 2011 19:02:24 +0100 (CET)
From: Daniel Stenberg <daniel@haxx.se>
X-X-Sender: dast@giant.haxx.se
To: libssh2 development <libssh2-devel@cool.haxx.se>
Subject: Re: Usage of errno and thread-safety
In-Reply-To: <4D7A5BA70200003F0000D143@oesmail.ipetronik.de>
Message-ID: <alpine.DEB.2.00.1103111858080.30016@tvnag.unkk.fr>
References: <4D7A5BA70200003F0000D143@oesmail.ipetronik.de>
User-Agent: Alpine 2.00 (DEB 1167 2008-08-23)
X-fromdanielhimself: yes
MIME-Version: 1.0
Content-ID: <alpine.DEB.2.00.1103111901411.30016@tvnag.unkk.fr>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Fri, 11 Mar 2011 19:02:40 +0100 (CET)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Fri, 11 Mar 2011 19:02:24 +0100 (CET)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Errors-To: libssh2-devel-bounces@cool.haxx.se
Sender: libssh2-devel-bounces@cool.haxx.se

On Fri, 11 Mar 2011, Sebastien Fricker wrote:

> But I'm guessing if it is not possible to get rid of errno: errno is a 
> global error information that contain an error code but not systematically 
> from the actual socket.

What are you talking about?

First, why would removing errno be a priority at all? errno is defined by 
POSIX to be thread-safe *and* recv and send both are documented (and proven) 
to provide additional error information in that variable after a failure.

> Using this variable makes libssh2 not thread safe.

What platform do you claim this is true for?

> I'm not sure if this code works.

So you're suggesting we introduce code you don't know if it works? (and yes, 
it will buffer overflow on many systems if the socket descriptor is above 
1024)

-- 

  / daniel.haxx.se
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Sun Mar 13 01:49:28 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2D0n4qD016790;
	Sun, 13 Mar 2011 01:49:23 +0100
Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com
	[209.85.216.175])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2D0n1J6016709
	(version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Sun, 13 Mar 2011 01:49:02 +0100
Received: by qyk35 with SMTP id 35so542380qyk.20
	for <libssh2-devel@cool.haxx.se>; Sat, 12 Mar 2011 16:48:58 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:content-type
	:content-transfer-encoding;
	bh=9EzoTfvV28yrker+8T77/9iDV617ZAbxhUQFrkagVW0=;
	b=cWhT9KgvpeWIc3ACGR1xf7lUb18bqeAb8qVVH3NIBFFS3A2kKpQYPhbdM0QR214N8X
	Ir8c9JROunSOU0VrtrCzzh3xSs6/EG/I0Vc1HBailywT8dOXRVjhcualV+eVLi0HZI2w
	mvzgNv3JwOXuJ40qsmSuwddvmf3+nKIFPZ72k=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:content-type
	:content-transfer-encoding;
	b=AdME0qqpDNXv9cWk4Ccg63PvWDfTnXgPJJ4CGbhRgwGokUEQT+LoTdHwWLh9eFUA+C
	QYbNT9MTZxKsuNRH6E30xfewtYkoilyUwPocNWeL42MOS1YTPrBAHuWPUlOPm62/kIuk
	9lxDFcvmrOi8wK6SDiaWeoBEyJ7kqmO422VoM=
MIME-Version: 1.0
Received: by 10.229.141.71 with SMTP id l7mr8969806qcu.44.1299977338479; Sat,
	12 Mar 2011 16:48:58 -0800 (PST)
Received: by 10.229.127.15 with HTTP; Sat, 12 Mar 2011 16:48:58 -0800 (PST)
In-Reply-To: <AANLkTimHf6mq=BKZZ2LuoW9KkE7wMZh+C=NeOEhLEiA7@mail.gmail.com>
References: <4D6E0DD8.1040206@cc.in2p3.fr>
	<AANLkTin5qdBOQpG=Jsx5kSJbgZ=ma_kEmrwa=ku9xYTD@mail.gmail.com>
	<4D6E353C.6050605@cc.in2p3.fr>
	<AANLkTikxK1iy-AbKpFn07VcvG=pg_hLeC1zVt3cbUUTQ@mail.gmail.com>
	<4D6E60A1.6050603@cc.in2p3.fr>
	<AANLkTimY+XS57+qyU4UZNPsXnXubqGcsHtAC577VSBmn@mail.gmail.com>
	<4D6FB4BB.8020302@cc.in2p3.fr>
	<AANLkTimHf6mq=BKZZ2LuoW9KkE7wMZh+C=NeOEhLEiA7@mail.gmail.com>
Date: Sun, 13 Mar 2011 00:48:58 +0000
X-Google-Sender-Auth: aVxRU5erok7IvVFW58oBIJMrDcM
Message-ID: <AANLkTikXkiCpC5zAKNER06x4vdjHX6j5N2NY_wf2JRAE@mail.gmail.com>
Subject: Re: Problem with known_hosts
From: Alexander Lamaison <swish@lammy.co.uk>
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Sun, 13 Mar 2011 01:49:27 +0100 (CET)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Sun, 13 Mar 2011 01:49:03 +0100 (CET)
X-MIME-Autoconverted: from quoted-printable to 8bit by giant.haxx.se id
	p2D0n1J6016709
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="iso-8859-1"
Errors-To: libssh2-devel-bounces@cool.haxx.se
Sender: libssh2-devel-bounces@cool.haxx.se
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by giant.haxx.se id p2D0n4qD016790

On 7 March 2011 02:11, Alexander Lamaison <swish@lammy.co.uk> wrote:
> On 3 March 2011 15:33, Pierre-Yves Fontaniere <pyf@cc.in2p3.fr> wrote:
>> On 03/03/2011 03:04 PM, Alexander Lamaison wrote:
>>>
>>> For my testing, can you send me an example of what one of these AIX
>>> entries with multiple aliases contains?
>>>
>>
>> This is not specific to AIX :) we use this kind of knownhosts entries on
>> Linux, Solaris and AIX.
>>
>> Entry like :
>>
>> ccsmurf,ccsvli05,ccsvli05.in2p3.fr,ccsmurf.in2p3.fr,134.158.104.140 ssh-rsa
>> AAAAB3NzaC1yc2EAAAABIwAAAIEAq1iiPKlBbyw3I+wC76ugwt7DGnseVNjzjZf8y7vO+2oiuBkRMdoqh9K3oHzkiloTeAHOZH4V89nUt/WLTqKG4j4/sSwaCD9gRKwFS4me/Pnvi8zqwmF8YrLwQdTGtDZo2iz0Dt4KqAE6fQ9mQ/iTlJMFUKOed8luDDfX6Ba0lBE=
>
> Thanks.  I will do some more testing using this entry at some point this week.

I've just committed a change that should solve this.  In the end I
went with something very different from your patch so that one
hostname isn't processed by different code from the others.

Please try it out and let me know if you have any problems.

Alex
--
Swish: Easy SFTP for Windows (http://www.swish-sftp.org)

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Mon Mar 14 10:23:21 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2E9Mxh2004615;
	Mon, 14 Mar 2011 10:23:17 +0100
Received: from f1wall.ipetronik.com (f1wall.ipetronik.com [217.25.129.2])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2E9MvLt004486
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Mon, 14 Mar 2011 10:22:57 +0100
Received: from [10.1.1.108] (port=43732 helo=oesmail.ipetronik.de)
	by f1wall.ipetronik.com with esmtp (Exim 4.69)
	(envelope-from <Sebastien.Fricker@ipetronik.com>) id 1Pz3yx-0003BT-1Q
	for libssh2-devel@cool.haxx.se; Mon, 14 Mar 2011 10:22:31 +0100
Received: from IPE_DOM-MTA by oesmail.ipetronik.de
	with Novell_GroupWise; Mon, 14 Mar 2011 10:22:31 +0100
X-CTCH-RefID: str=0001.0A0B0204.4D7DDE57.01B2,ss=1,fgs=0
Message-Id: <4D7DEC600200003F0000D15F@oesmail.ipetronik.de>
X-Mailer: Novell GroupWise Internet Agent 8.0.2 
Date: Mon, 14 Mar 2011 10:22:24 +0100
From: "Sebastien Fricker" <Sebastien.Fricker@ipetronik.com>
To: "libssh2 development" <libssh2-devel@cool.haxx.se>
Subject: Antw: Re: Usage of errno and thread-safety
References: <4D7A5BA70200003F0000D143@oesmail.ipetronik.de>
	<alpine.DEB.2.00.1103111858080.30016@tvnag.unkk.fr>
In-Reply-To: <alpine.DEB.2.00.1103111858080.30016@tvnag.unkk.fr>
Mime-Version: 1.0
Content-Disposition: inline
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Mon, 14 Mar 2011 10:23:21 +0100 (CET)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Mon, 14 Mar 2011 10:22:57 +0100 (CET)
X-MIME-Autoconverted: from quoted-printable to 8bit by giant.haxx.se id
	p2E9MvLt004486
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="utf-8"
Errors-To: libssh2-devel-bounces@cool.haxx.se
Sender: libssh2-devel-bounces@cool.haxx.se
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by giant.haxx.se id p2E9Mxh2004615

Daniel,
in fact in POSIX.1 errno is thread safe (see below).
So the thread safety issue that I'm taking about is not relevant.
I forget that errno is no more a global variable, but a special
function which store the error code per thread.
Regards
SÃ©bastien 

Redefinition of errno

In POSIX.1, errno is defined as an external global variable. But this
definition is unacceptable in a multithreaded environment, because its
use can result in nondeterministic results. The problem is that two or
more threads can encounter errors, all causing the same errno to be set.
Under these circumstances, a thread might end up checking errno after it
has already been updated by another thread.

To circumvent the resulting nondeterminism, POSIX.1c redefines errno as
a service that can access the per-thread error number as follows
(ISO/IEC 9945:1-1996, Â§2.4):

    Some functions may provide the error number in a variable accessed
through the symbol errno. The symbol errno is defined by including the
header <errno.h>, as specified by the C Standard ... For each thread of
a process, the value of errno shall not be affected by function calls or
assignments to errno by other threads. 

In addition, all POSIX.1c functions avoid using errno and, instead,
return the error number directly as the function return value, with a
return value of zero indicating that no error was detected. This
strategy is, in fact, being followed on a POSIX-wide basis for all new
functions. 

>>> Daniel Stenberg <daniel@haxx.se> schrieb am 3/11/2011 um 19:02 in
Nachricht
<alpine.DEB.2.00.1103111858080.30016@tvnag.unkk.fr>:
> On Fri, 11 Mar 2011, Sebastien Fricker wrote:
> 
>> But I'm guessing if it is not possible to get rid of errno: errno is
a 
>> global error information that contain an error code but not
systematically 
>> from the actual socket.
> 
> What are you talking about?
> 
> First, why would removing errno be a priority at all? errno is
defined by 
> POSIX to be thread-safe *and* recv and send both are documented (and
proven) 
> to provide additional error information in that variable after a
failure.
> 
>> Using this variable makes libssh2 not thread safe.
> 
> What platform do you claim this is true for?
> 
>> I'm not sure if this code works.
> 
> So you're suggesting we introduce code you don't know if it works?
(and yes, 
> 
> it will buffer overflow on many systems if the socket descriptor is
above 
> 1024)

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Mon Mar 14 10:34:13 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2E9Y8TY009806;
	Mon, 14 Mar 2011 10:34:12 +0100
Received: from foo.stuge.se (qmailr@foo.stuge.se [213.88.146.6])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with SMTP id p2E9Y6O6009800
	for <libssh2-devel@cool.haxx.se>; Mon, 14 Mar 2011 10:34:06 +0100
Received: (qmail 29121 invoked by uid 501); 14 Mar 2011 09:34:08 -0000
Message-ID: <20110314093408.29120.qmail@stuge.se>
Date: Mon, 14 Mar 2011 10:34:08 +0100
From: Peter Stuge <peter@stuge.se>
To: libssh2-devel@cool.haxx.se
Subject: Re: Usage of errno and thread-safety
Mail-Followup-To: libssh2-devel@cool.haxx.se
References: <4D7A5BA70200003F0000D143@oesmail.ipetronik.de>
MIME-Version: 1.0
Content-Disposition: inline
In-Reply-To: <4D7A5BA70200003F0000D143@oesmail.ipetronik.de>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Mon, 14 Mar 2011 10:34:13 +0100 (CET)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Mon, 14 Mar 2011 10:34:06 +0100 (CET)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: libssh2-devel-bounces@cool.haxx.se
Sender: libssh2-devel-bounces@cool.haxx.se

Hi Sebastien,

Sebastien Fricker wrote:
> Using this variable makes libssh2 not thread safe.

As you may know, the SSH protocol is not really thread safe on the
wire. The lowest level TCP connection (session) can only be used by
one channel at a time. This must of course be respected by programs
using libssh2.


> In fact _libssh2_send()/_libssh2_recv() returns only 3 values:
>  1) >=0: number of bytes transmitted/received
>  2) -EAGAIN: special error which indicates that the read/write
> operation should be re-executed.
>  3) <0 (but not -EAGAIN): real error.
> 
> Would it not be possible to use select to generate such error code?
> This would made the _libssh2_send()/_libssh2_recv() thread safe.

I don't understand what the benefit would be? I don't think it would
change anything.


//Peter
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Mon Mar 14 14:51:39 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2EDpIsS030914;
	Mon, 14 Mar 2011 14:51:36 +0100
Received: from mail-yi0-f54.google.com (mail-yi0-f54.google.com
	[209.85.218.54])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2EDpFEE030877
	(version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Mon, 14 Mar 2011 14:51:16 +0100
Received: by yie12 with SMTP id 12so2522262yie.41
	for <libssh2-devel@cool.haxx.se>; Mon, 14 Mar 2011 06:51:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:in-reply-to:references:date
	:message-id:subject:from:to:cc:content-type;
	bh=WF3jahs1evY8Y0tGLOCbRyYLrmrtst241yTTCZlSMP4=;
	b=OIIRuqPA/z4VL/pBTa6cvQVMH9wI3kqoNFtpL5s0ugeZaqfr7IyFG/ek/NowSnBl4I
	FI4oees/EMEK1yzHC0EDdSVpvsCEA0yk81b9TK6YxtExG4IZ3humsB1HoTi+3eli89Mn
	jXAPjQCSlCukVquRp7usKb+uIlZkUTcBWt1ss=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type;
	b=pN8m0NagoA3HzN3f2fvFjYik+wwDLcuSWsFgAaZEsnbV/zGG6hmhahOmKZE77OQL72
	KJ4YDsicxrrOpHPQhKqeSCwLcZ/CPF94LiTqMbXy+nnCfXj3WlmSxQeWLwUQml7AMA/m
	FghcXAez+1uP7mlpoykYQorfFZlYxvjQtua+Y=
MIME-Version: 1.0
Received: by 10.150.63.4 with SMTP id l4mr1740514yba.337.1300110672581; Mon,
	14 Mar 2011 06:51:12 -0700 (PDT)
Received: by 10.147.182.16 with HTTP; Mon, 14 Mar 2011 06:51:12 -0700 (PDT)
In-Reply-To: <AANLkTin1sK=R9kzwKVFQNuUMPkyQPW3f6TifwM6CFqiS@mail.gmail.com>
References: <AANLkTikWKvz9O8bjbKrdyNnH54ozetM_yWm0GmwiZr=8@mail.gmail.com>
	<alpine.DEB.2.00.1103062245120.28357@tvnag.unkk.fr>
	<AANLkTin1sK=R9kzwKVFQNuUMPkyQPW3f6TifwM6CFqiS@mail.gmail.com>
Date: Mon, 14 Mar 2011 19:21:12 +0530
Message-ID: <AANLkTi=L4NTYRJrx9BaqvpwzfLFTc9E_hjSq56fJfzQs@mail.gmail.com>
Subject: Re: Small binary files are getting transferred but not the larger
	ones in libssh2 SFTP
From: kali muthu <direct2kali@gmail.com>
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Mon, 14 Mar 2011 14:51:39 +0100 (CET)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Mon, 14 Mar 2011 14:51:16 +0100 (CET)
Cc: Daniel Stenberg <daniel@haxx.se>
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============1162429368=="
Errors-To: libssh2-devel-bounces@cool.haxx.se
Sender: libssh2-devel-bounces@cool.haxx.se

--===============1162429368==
Content-Type: multipart/alternative; boundary=000e0cd3ae9cced648049e719aee

--000e0cd3ae9cced648049e719aee
Content-Type: text/plain; charset=ISO-8859-1

>>And I could see that most of the time the execution goes to the
block  if(buffer[0] == '\0') and that is the reason for the resulting binary
files has less size than the original.

On further analysis of the Binary File and while opening the file in
Notepad++ text editor, I could see that the file contains certain character
NUL. (I have shown in a highlighted manner, since the character does look
like this). Will that might cause my error to occur? I think it behaves
literally as an NULL character. Is there any way I can specify the libssh2
to transmit in binary mode so that it doesn't interpret the characters as
such?

On Thu, Mar 10, 2011 at 5:19 PM, kali muthu <direct2kali@gmail.com> wrote:

>
>
> I tried your example also and still the resulting files has lesser size
> than the original.
>
> On Mon, Mar 7, 2011 at 3:16 AM, Daniel Stenberg <daniel@haxx.se> wrote:
>
>> On Thu, 3 Mar 2011, kali muthu wrote:
>>
>>  I am using the libssh2_sftp_read() to read the remote server files which
>>> are binary. I am using the session in non-blocking mode. I can able to
>>> transfer text files and smaller binary files.
>>>
>>
>> Can you show us a full source code of your app that doesn't work? We do
>> provide the sftp_nonblock.c example that shows a SFTP download using the
>> non-blocking API...
>>
>> --
>>
>>  / daniel.haxx.se
>> _______________________________________________
>> libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
>>
>
>
>
> --
> Regards,
> Kali
>



-- 
Regards,
Kali

--000e0cd3ae9cced648049e719aee
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

&gt;&gt;And I could see that most of the time the execution goes to the blo=
ck=A0=A0if(buffer[0] =3D=3D &#39;\0&#39;) and that is the reason for the re=
sulting binary files has less size than the original.<div><br></div><div>On=
 further analysis of the Binary File and while opening the file in Notepad+=
+ text editor, I could see that the file contains certain character <span c=
lass=3D"Apple-style-span" style=3D"color: rgb(255, 255, 255); background-co=
lor: rgb(51, 51, 51); ">NUL.</span><span class=3D"Apple-style-span" style=
=3D"background-color: rgb(255, 255, 255); ">=A0(I have shown in a highlight=
ed manner, since the character does look like this). Will that might cause =
my error to occur? I think it behaves literally as an NULL character. Is th=
ere any way I can specify the libssh2 to transmit in binary mode so that it=
 doesn&#39;t interpret the characters as such?=A0</span><br>
<br><div class=3D"gmail_quote">On Thu, Mar 10, 2011 at 5:19 PM, kali muthu =
<span dir=3D"ltr">&lt;<a href=3D"mailto:direct2kali@gmail.com">direct2kali@=
gmail.com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=
=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div><br></div>
<div><br></div><div>I tried your example also and still the resulting files=
 has lesser size than the original.</div><div><div></div><div class=3D"h5">=
<br><div class=3D"gmail_quote">On Mon, Mar 7, 2011 at 3:16 AM, Daniel Stenb=
erg <span dir=3D"ltr">&lt;<a href=3D"mailto:daniel@haxx.se" target=3D"_blan=
k">daniel@haxx.se</a>&gt;</span> wrote:<br>

<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div>On Thu, 3 Mar 2011, kali muthu wrote:<b=
r>
<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
I am using the libssh2_sftp_read() to read the remote server files which ar=
e binary. I am using the session in non-blocking mode. I can able to transf=
er text files and smaller binary files.<br>
</blockquote>
<br></div>
Can you show us a full source code of your app that doesn&#39;t work? We do=
 provide the sftp_nonblock.c example that shows a SFTP download using the n=
on-blocking API...<br><font color=3D"#888888">
<br>
-- <br>
<br>
=A0/ <a href=3D"http://daniel.haxx.se" target=3D"_blank">daniel.haxx.se</a>=
<br>
_______________________________________________<br>
libssh2-devel <a href=3D"http://cool.haxx.se/cgi-bin/mailman/listinfo/libss=
h2-devel" target=3D"_blank">http://cool.haxx.se/cgi-bin/mailman/listinfo/li=
bssh2-devel</a><br>
</font></blockquote></div><br><br clear=3D"all"><br></div></div>-- <br>Rega=
rds,<br>Kali<br>
</div>
</blockquote></div><br><br clear=3D"all"><br>-- <br>Regards,<br>Kali<br>
</div>

--000e0cd3ae9cced648049e719aee--

--===============1162429368==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

--===============1162429368==--

From libssh2-devel-bounces@cool.haxx.se  Mon Mar 14 15:03:27 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2EE3LtU006267;
	Mon, 14 Mar 2011 15:03:27 +0100
Received: from giant.haxx.se (giant.haxx.se [80.67.6.50])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2EE3JnS006214; 
	Mon, 14 Mar 2011 15:03:19 +0100
Date: Mon, 14 Mar 2011 15:03:19 +0100 (CET)
From: Daniel Stenberg <daniel@haxx.se>
X-X-Sender: dast@giant.haxx.se
To: kali muthu <direct2kali@gmail.com>
Subject: Re: Small binary files are getting transferred but not the larger
	ones in libssh2 SFTP
In-Reply-To: <AANLkTi=L4NTYRJrx9BaqvpwzfLFTc9E_hjSq56fJfzQs@mail.gmail.com>
Message-ID: <alpine.DEB.2.00.1103141501160.19162@tvnag.unkk.fr>
References: <AANLkTikWKvz9O8bjbKrdyNnH54ozetM_yWm0GmwiZr=8@mail.gmail.com>
	<alpine.DEB.2.00.1103062245120.28357@tvnag.unkk.fr>
	<AANLkTin1sK=R9kzwKVFQNuUMPkyQPW3f6TifwM6CFqiS@mail.gmail.com>
	<AANLkTi=L4NTYRJrx9BaqvpwzfLFTc9E_hjSq56fJfzQs@mail.gmail.com>
User-Agent: Alpine 2.00 (DEB 1167 2008-08-23)
X-fromdanielhimself: yes
MIME-Version: 1.0
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Mon, 14 Mar 2011 15:03:27 +0100 (CET)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Mon, 14 Mar 2011 15:03:19 +0100 (CET)
Cc: libssh2 development <libssh2-devel@cool.haxx.se>
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Errors-To: libssh2-devel-bounces@cool.haxx.se
Sender: libssh2-devel-bounces@cool.haxx.se

On Mon, 14 Mar 2011, kali muthu wrote:

> On further analysis of the Binary File and while opening the file in
> Notepad++ text editor, I could see that the file contains certain character
> NUL.

You mean that are expected to be there?

> (I have shown in a highlighted manner, since the character does look
> like this).

(I read emails in text, you can't "highlight" then...)

> Will that might cause my error to occur?

No. SSH and SFTP send data in full binary mode and send everything as-is.

-- 

  / daniel.haxx.se
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Mon Mar 14 18:03:33 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2EH3D8Q014187;
	Mon, 14 Mar 2011 18:03:29 +0100
Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com
	[209.85.210.182])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2EH39S9014031
	(version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Mon, 14 Mar 2011 18:03:11 +0100
Received: by iyj12 with SMTP id 12so6076623iyj.41
	for <libssh2-devel@cool.haxx.se>; Mon, 14 Mar 2011 10:03:06 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=peut.org; s=google;
	h=domainkey-signature:mime-version:in-reply-to:references:date
	:message-id:subject:from:to:content-type;
	bh=sF2WhQmEMfKR5i+jNUtCOm62oP+4QCDwvyZuOBi7H8U=;
	b=K+TmshL+xX3gxb5lgR1uV7kg9Qaz0vLkh2CFr6PQU5hFeJrG72zd7ecu1zx9UOBgSI
	mEz8jPwJCrwS7oOvHPxleEWOVUvvuvodSFogcsrGPJsKzaDt2JjQfaY0MePhtFXMzAzG
	HGIvKgeWApk7qlE2VhVT5Ox+NDVTZj8hDubRc=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=peut.org; s=google;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:content-type;
	b=p5uYbLrwTs7Un+kDFzcGas2GND8M0SXf/aKj885OeP5ti0o3Lp8twHu/YGegPIcg24
	7kp7gcfdJe7/RO4R7pq5e+aXw3zvlIk//JeObJ+/XbahGzs5QBQXuIIdYRfiwxeLzwUQ
	UUCdYj28v4PHgm9KvInfcRqJo+FSiQm1WPbik=
MIME-Version: 1.0
Received: by 10.231.21.132 with SMTP id j4mr9467927ibb.158.1300122186039; Mon,
	14 Mar 2011 10:03:06 -0700 (PDT)
Received: by 10.231.15.6 with HTTP; Mon, 14 Mar 2011 10:03:05 -0700 (PDT)
In-Reply-To: <AANLkTi=L4NTYRJrx9BaqvpwzfLFTc9E_hjSq56fJfzQs@mail.gmail.com>
References: <AANLkTikWKvz9O8bjbKrdyNnH54ozetM_yWm0GmwiZr=8@mail.gmail.com>
	<alpine.DEB.2.00.1103062245120.28357@tvnag.unkk.fr>
	<AANLkTin1sK=R9kzwKVFQNuUMPkyQPW3f6TifwM6CFqiS@mail.gmail.com>
	<AANLkTi=L4NTYRJrx9BaqvpwzfLFTc9E_hjSq56fJfzQs@mail.gmail.com>
Date: Mon, 14 Mar 2011 18:03:05 +0100
Message-ID: <AANLkTinHpE96mPjoCBwkBF0ox6rYgcAWQ=8g94yMSnLz@mail.gmail.com>
Subject: Re: Small binary files are getting transferred but not the larger
	ones in libssh2 SFTP
From: Jose Baars <peut@peut.org>
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Mon, 14 Mar 2011 18:03:32 +0100 (CET)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Mon, 14 Mar 2011 18:03:11 +0100 (CET)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============0839128229=="
Errors-To: libssh2-devel-bounces@cool.haxx.se
Sender: libssh2-devel-bounces@cool.haxx.se

--===============0839128229==
Content-Type: multipart/alternative; boundary=0015177411de1041e8049e7449d8

--0015177411de1041e8049e7449d8
Content-Type: text/plain; charset=ISO-8859-1

2011/3/14 kali muthu <direct2kali@gmail.com>
>>...since the character does look like this). Will that might cause my
error to occur? I think it behaves literally as an NULL character.


Please read carefully the following:

http://en.wikipedia.org/wiki/Binary_file

--0015177411de1041e8049e7449d8
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<span style=3D"background-color: rgb(255, 255, 255);"><br></span>2011/3/14 =
kali muthu <span dir=3D"ltr">&lt;<a href=3D"mailto:direct2kali@gmail.com">d=
irect2kali@gmail.com</a>&gt;</span><br>&gt;&gt;...<span style=3D"background=
-color: rgb(255, 255, 255);">since the character=20
does look like this). Will that might cause my error to occur? I think=20
it behaves literally as an NULL character. <br><br><br>Please read carefull=
y the following:<br><br></span><a href=3D"http://en.wikipedia.org/wiki/Bina=
ry_file">http://en.wikipedia.org/wiki/Binary_file</a><br><br><br>

--0015177411de1041e8049e7449d8--

--===============0839128229==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

--===============0839128229==--

From libssh2-devel-bounces@cool.haxx.se  Mon Mar 14 18:16:59 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2EHGq1N020383;
	Mon, 14 Mar 2011 18:16:58 +0100
Received: from f1wall.ipetronik.com (f1wall.ipetronik.com [217.25.129.2])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2EHGpgR020344
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Mon, 14 Mar 2011 18:16:52 +0100
Received: from [10.1.1.108] (port=59684 helo=oesmail.ipetronik.de)
	by f1wall.ipetronik.com with esmtp (Exim 4.69)
	(envelope-from <Sebastien.Fricker@ipetronik.com>) id 1PzBNt-0006Tu-2Q
	for libssh2-devel@cool.haxx.se; Mon, 14 Mar 2011 18:16:45 +0100
Received: from IPE_DOM-MTA by oesmail.ipetronik.de
	with Novell_GroupWise; Mon, 14 Mar 2011 18:16:45 +0100
X-CTCH-RefID: str=0001.0A0B0201.4D7E4D7D.025F,ss=1,fgs=0
Message-Id: <4D7E5B880200003F0000D182@oesmail.ipetronik.de>
X-Mailer: Novell GroupWise Internet Agent 8.0.2 
Date: Mon, 14 Mar 2011 18:16:40 +0100
From: "Sebastien Fricker" <Sebastien.Fricker@ipetronik.com>
To: <libssh2-devel@cool.haxx.se>
Subject: Sporadic dead-lock LibSSH2
Mime-Version: 1.0
Content-Disposition: inline
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Mon, 14 Mar 2011 18:16:59 +0100 (CET)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Mon, 14 Mar 2011 18:16:52 +0100 (CET)
X-MIME-Autoconverted: from quoted-printable to 8bit by giant.haxx.se id
	p2EHGpgR020344
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="utf-8"
Errors-To: libssh2-devel-bounces@cool.haxx.se
Sender: libssh2-devel-bounces@cool.haxx.se
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by giant.haxx.se id p2EHGq1N020383

Hi,
I have actually a strange sporadic dead-lock from LibSSH2:
in some situtations (unclear why, but extremely rare), libssh2 stops to
transfer, and nothing happened:
no more data are transferred, no timeout, ... 
I tried to simulate this behaviour, by cutting the down-link or up-link
of the communication or by facking the return value
of recv/send. In all cases, libssh2 ends with a timeout after 3 Minutes
(which is correct).

For one of this situation, It was possible to record the libssh2 traces
(see below) and I could only see that
libssh2 sends a SSH packet and did not get an answer.
My question: if the SFTP server sends a keep-alive, could this be the
reason why we never got a receive timeout and so never return from a 
libssh2_sftp_write() in this case?

Regards,
SÃ©bastien

Traces:
10.03.2011 21:25:05 D [libssh2] 11243.964481 Socket: Sent 100/100 bytes
at 47F0802
10.03.2011 21:25:05 D [libssh2] 11243.029666 Socket: Recved 84/35000
bytes to 46197890+
10.03.2011 21:25:05 D [libssh2] 11244.232215 Socket: Sent 36/36 bytes
at 47F09BF
10.03.2011 21:25:05 D [libssh2] 11244.297401 Socket: Sent 36/36 bytes
at 47F09BF
10.03.2011 21:25:05 D [libssh2] 11244.362336 Socket: Recved 104/35000
bytes to 46197890+
10.03.2011 21:25:05 D [libssh2] 11244.427522 Socket: Sent 52/52 bytes
at 47F0938


-- 
------------------------------------------------------------
Ipetronik GmbH & Co.KG
Jaegerweg 1
D-76532 Baden-Baden
 
Phone-No. +49 - (0)7221/9922-467
Fax-No. +49 - (0)7221/9922-153
 
mailto: sebastien.fricker@ipetronik.com
web: http://www.ipetronik.com 
 
------------------------------------------------------------
Kommanditgesellschaft mit Sitz in Baden-Baden, Registergericht HRA
Nr.201313
Persoenlich haftende Gesellschaft ist die IPETRONIK Verwaltungs GmbH 
mit Sitz in Baden-Baden, Registergericht Mannheim HRB Nr.202089, 
GeschÃ¤ftsfÃ¼hrer: J.Abromeit, E.Rudolf, A. Wocke
-------------------------------------------------------------
 
 


_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Wed Mar 16 00:36:42 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2FNaFpA027142;
	Wed, 16 Mar 2011 00:36:38 +0100
Received: from qswall.lpma.nsw.gov.au (qswall.lpma.nsw.gov.au [203.14.35.57])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id
	p2FNaAYX027127
	for <libssh2-devel@cool.haxx.se>; Wed, 16 Mar 2011 00:36:14 +0100
Received: from SRV-QS-MAIL6.lands.nsw (srv-qs-mail6.lands.nsw [10.4.100.151]) 
	by qswall.lpma.nsw.gov.au (8.14.1/8.14.1) with ESMTP id 
	p2FNa8xi011894 for <libssh2-devel@cool.haxx.se>; Wed, 16 Mar 2011 
	10:36:09 +1100
Received: from SRV-QS-MAIL6.lands.nsw ([fe80::d546:5904:a1f4:4f5d]) by 
	SRV-QS-MAIL6.lands.nsw ([fe80::d546:5904:a1f4:4f5d%12]) with mapi; 
	Wed, 16 Mar 2011 10:36:08 +1100
From: Phillip Wu <Phillip.Wu@lpma.nsw.gov.au>
To: "libssh2-devel@cool.haxx.se" <libssh2-devel@cool.haxx.se>
Date: Wed, 16 Mar 2011 10:36:06 +1100
Subject: libssh2 running a command as root
Thread-Topic: libssh2 running a command as root
Thread-Index: AcvjacEc9WSD35FfQ8SijSJTSwlSYA==
Message-ID: <137CA4FE5CCDB7449ED3CD4445077AC305D3F37223@SRV-QS-MAIL6.lands.nsw>
Accept-Language: en-US, en-AU
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
acceptlanguage: en-US, en-AU
MIME-Version: 1.0
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Wed, 16 Mar 2011 00:36:42 +0100 (CET)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Wed, 16 Mar 2011 00:36:14 +0100 (CET)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============1070762594=="
Errors-To: libssh2-devel-bounces@cool.haxx.se
Sender: libssh2-devel-bounces@cool.haxx.se

--===============1070762594==
Content-Language: en-US
Content-Type: multipart/alternative; 
    boundary="_000_137CA4FE5CCDB7449ED3CD4445077AC305D3F37223SRVQSMAIL6lan_"

--_000_137CA4FE5CCDB7449ED3CD4445077AC305D3F37223SRVQSMAIL6lan_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hi,

I am using Visual Studio C++ 2010 and libssh2 1.2.7.

I want to run a command as root on the target UNIX machine. However the UNI=
X machine
does not allow direct login to root even with the correct password. If the =
command
was being run interactively:
a. Logon to server as a non-root user
b. su - root

Questions:
1. Is there any libssh2 call that can help in this situation?
2. If the answer to question 1. is NO would I do the following:
   authenticate non-root user using libssh2_userauth_publickey_fromfile() o=
r libssh2_userauth_password()
   create a pty with libssh2_channel_request_pty()
   create a shell on the remote server with libssh2_channel_shell()
   run "su - root" with libssh2_channel_write()
       reading password prompt with libssh2_channel_read()
       sending password with libssh2_channel_write()
   run the command with libssh2_channel_write()
   get the run status with libssh2_channel_write("echo $?") assuming I am u=
sing Bourne shell
       read the status with libssh2_channel_read()
3. Is there a better way than that shown in 2. ?

Thanks in advance for any help with this issue.

***************************************************************
This message is intended for the addressee named and may contain confidenti=
al information. If you are not the intended recipient, please delete it and=
 notify the sender. Views expressed in this message are those of the indivi=
dual sender, and are not necessarily the views of the Land and Property Man=
agement Authority. This email message has been swept by MIMEsweeper for the=
 presence of computer viruses.
***************************************************************
Please consider the environment before printing this email.

--_000_137CA4FE5CCDB7449ED3CD4445077AC305D3F37223SRVQSMAIL6lan_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:x=3D"urn:schemas-microsoft-com:office:excel" xmlns:p=3D"urn:schemas-m=
icrosoft-com:office:powerpoint" xmlns:a=3D"urn:schemas-microsoft-com:office=
:access" xmlns:dt=3D"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s=3D"=
uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs=3D"urn:schemas-microsof=
t-com:rowset" xmlns:z=3D"#RowsetSchema" xmlns:b=3D"urn:schemas-microsoft-co=
m:office:publisher" xmlns:ss=3D"urn:schemas-microsoft-com:office:spreadshee=
t" xmlns:c=3D"urn:schemas-microsoft-com:office:component:spreadsheet" xmlns=
:odc=3D"urn:schemas-microsoft-com:office:odc" xmlns:oa=3D"urn:schemas-micro=
soft-com:office:activation" xmlns:html=3D"http://www.w3.org/TR/REC-html40" =
xmlns:q=3D"http://schemas.xmlsoap.org/soap/envelope/" xmlns:rtc=3D"http://m=
icrosoft.com/officenet/conferencing" xmlns:D=3D"DAV:" xmlns:Repl=3D"http://=
schemas.microsoft.com/repl/" xmlns:mt=3D"http://schemas.microsoft.com/share=
point/soap/meetings/" xmlns:x2=3D"http://schemas.microsoft.com/office/excel=
/2003/xml" xmlns:ppda=3D"http://www.passport.com/NameSpace.xsd" xmlns:ois=
=3D"http://schemas.microsoft.com/sharepoint/soap/ois/" xmlns:dir=3D"http://=
schemas.microsoft.com/sharepoint/soap/directory/" xmlns:ds=3D"http://www.w3=
.org/2000/09/xmldsig#" xmlns:dsp=3D"http://schemas.microsoft.com/sharepoint=
/dsp" xmlns:udc=3D"http://schemas.microsoft.com/data/udc" xmlns:xsd=3D"http=
://www.w3.org/2001/XMLSchema" xmlns:sub=3D"http://schemas.microsoft.com/sha=
repoint/soap/2002/1/alerts/" xmlns:ec=3D"http://www.w3.org/2001/04/xmlenc#"=
 xmlns:sp=3D"http://schemas.microsoft.com/sharepoint/" xmlns:sps=3D"http://=
schemas.microsoft.com/sharepoint/soap/" xmlns:xsi=3D"http://www.w3.org/2001=
/XMLSchema-instance" xmlns:udcs=3D"http://schemas.microsoft.com/data/udc/so=
ap" xmlns:udcxf=3D"http://schemas.microsoft.com/data/udc/xmlfile" xmlns:udc=
p2p=3D"http://schemas.microsoft.com/data/udc/parttopart" xmlns:wf=3D"http:/=
/schemas.microsoft.com/sharepoint/soap/workflow/" xmlns:dsss=3D"http://sche=
mas.microsoft.com/office/2006/digsig-setup" xmlns:dssi=3D"http://schemas.mi=
crosoft.com/office/2006/digsig" xmlns:mdssi=3D"http://schemas.openxmlformat=
s.org/package/2006/digital-signature" xmlns:mver=3D"http://schemas.openxmlf=
ormats.org/markup-compatibility/2006" xmlns:m=3D"http://schemas.microsoft.c=
om/office/2004/12/omml" xmlns:mrels=3D"http://schemas.openxmlformats.org/pa=
ckage/2006/relationships" xmlns:spwp=3D"http://microsoft.com/sharepoint/web=
partpages" xmlns:ex12t=3D"http://schemas.microsoft.com/exchange/services/20=
06/types" xmlns:ex12m=3D"http://schemas.microsoft.com/exchange/services/200=
6/messages" xmlns:pptsl=3D"http://schemas.microsoft.com/sharepoint/soap/Sli=
deLibrary/" xmlns:spsl=3D"http://microsoft.com/webservices/SharePointPortal=
Server/PublishedLinksService" xmlns:Z=3D"urn:schemas-microsoft-com:" xmlns:=
st=3D"&#1;" xmlns=3D"http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUI=
V=3D"Content-Type" CONTENT=3D"text/html; charset=3Dus-ascii"><meta name=3DG=
enerator content=3D"Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Calibri","sans-serif";
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;}
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body lang=3DEN-AU link=3Dblue vli=
nk=3Dpurple><div class=3DWordSection1><p class=3DMsoNormal>Hi,<o:p></o:p></=
p><p class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>I am using=
 Visual Studio C++ 2010 and libssh2 1.2.7.<o:p></o:p></p><p class=3DMsoNorm=
al><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>I want to run a command as roo=
t on the target UNIX machine. However the UNIX machine<o:p></o:p></p><p cla=
ss=3DMsoNormal>does not allow direct login to root even with the correct pa=
ssword. If the command<o:p></o:p></p><p class=3DMsoNormal>was being run int=
eractively:<o:p></o:p></p><p class=3DMsoNormal>a. Logon to server as a non-=
root user<o:p></o:p></p><p class=3DMsoNormal>b. su - root<o:p></o:p></p><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>Questions:<o:p>=
</o:p></p><p class=3DMsoNormal>1. Is there any libssh2 call that can help i=
n this situation?<o:p></o:p></p><p class=3DMsoNormal>2. If the answer to qu=
estion 1. is NO would I do the following:<o:p></o:p></p><p class=3DMsoNorma=
l>&nbsp;&nbsp; authenticate non-root user using libssh2_userauth_publickey_=
fromfile() or libssh2_userauth_password()<o:p></o:p></p><p class=3DMsoNorma=
l>&nbsp;&nbsp; create a pty with libssh2_channel_request_pty()<o:p></o:p></=
p><p class=3DMsoNormal>&nbsp;&nbsp; create a shell on the remote server wit=
h libssh2_channel_shell()<o:p></o:p></p><p class=3DMsoNormal>&nbsp;&nbsp; r=
un &quot;su - root&quot; with libssh2_channel_write()<o:p></o:p></p><p clas=
s=3DMsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; reading password prompt =
with libssh2_channel_read()<o:p></o:p></p><p class=3DMsoNormal>&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp; sending password with libssh2_channel_write()<o:p>=
</o:p></p><p class=3DMsoNormal>&nbsp;&nbsp; run the command with libssh2_ch=
annel_write()<o:p></o:p></p><p class=3DMsoNormal>&nbsp;&nbsp; get the run s=
tatus with libssh2_channel_write(&quot;echo $?&quot;) assuming I am using B=
ourne shell<o:p></o:p></p><p class=3DMsoNormal>&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp; read the status with libssh2_channel_read()<o:p></o:p></p><p class=
=3DMsoNormal>3. Is there a better way than that shown in 2. ?<o:p></o:p></p=
><p class=3DMsoNormal><o:p>&nbsp;</o:p></p><p class=3DMsoNormal>Thanks in a=
dvance for any help with this issue.<o:p></o:p></p></div><font size=3D"1"><=
font size=3D"2"><p /><hr /><p /><p>This message is intended for the address=
ee named and may contain confidential information. If you are not the <font=
 size=3D"2">intended recipient, please delete it and notify the sender. </f=
ont><font size=3D"2">Views expressed in this message are those of the </fon=
t><font size=3D"2">individual sender, and are not necessarily the views of =
</font><font size=3D"2">the Land and Property Management Authority. </font>=
<font size=3D"2">This email message has been swept by MIMEsweeper </font><f=
ont size=3D"2">for the presence of computer viruses.</font> </p><p /><hr />=
<p><font face=3D"Helvetica-Bold" color=3D"#003200" size=3D"2"></font></p><p=
 align=3D"left"><font face=3D"arial,helvetica,sans-serif"><strong>Please co=
nsider the environment before printing this email.</strong></font></p></fon=
t></font>
</body></html>

--_000_137CA4FE5CCDB7449ED3CD4445077AC305D3F37223SRVQSMAIL6lan_--

--===============1070762594==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

--===============1070762594==--

From libssh2-devel-bounces@cool.haxx.se  Wed Mar 16 10:14:00 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2G9DXZF003057;
	Wed, 16 Mar 2011 10:13:56 +0100
Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com
	[209.85.161.182])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2G9DUC3002993
	(version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Wed, 16 Mar 2011 10:13:31 +0100
Received: by gxk28 with SMTP id 28so701050gxk.41
	for <libssh2-devel@cool.haxx.se>; Wed, 16 Mar 2011 02:13:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:in-reply-to:references:date
	:message-id:subject:from:to:cc:content-type;
	bh=zPK0dh9qCQ6AID3BZZMSfTgNvDcDCH8V03bltFglhDc=;
	b=BrxEpJclY9hdQ+FVn8sPSSWqreZZmcyenicJ3QjjYpbwK0LA5rwLrNQTTHJWV2W4uK
	cJ3rDOmrRvHujOLqDxvhVwkNmWRm2fPYGy+TQ1wURbc4PHGwN3S6iudYJpO/sTbCMib3
	fxkVyniFvh1OH6TQzKh2CavQid9bQ9nxv+lsM=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type;
	b=vykrVjeoSx0MQj6K81+ivR2INGpiPyFFduo91WOgkGeo22t/n0I0XLJZChGz5rvSQv
	v0GLU8+vvAJ/Fb2HvuI3p+J0qjzLYGJ6Dx8tnjdrNNKR+uLhIJVaZCTKlCgh9cSCexKq
	5euvoqhSJ0ULtOegBVn56Kaa6rtIQI+cXvN44=
MIME-Version: 1.0
Received: by 10.146.66.8 with SMTP id o8mr401684yaa.2.1300265235574; Wed, 16
	Mar 2011 01:47:15 -0700 (PDT)
Received: by 10.147.182.16 with HTTP; Wed, 16 Mar 2011 01:47:15 -0700 (PDT)
In-Reply-To: <alpine.DEB.2.00.1103141501160.19162@tvnag.unkk.fr>
References: <AANLkTikWKvz9O8bjbKrdyNnH54ozetM_yWm0GmwiZr=8@mail.gmail.com>
	<alpine.DEB.2.00.1103062245120.28357@tvnag.unkk.fr>
	<AANLkTin1sK=R9kzwKVFQNuUMPkyQPW3f6TifwM6CFqiS@mail.gmail.com>
	<AANLkTi=L4NTYRJrx9BaqvpwzfLFTc9E_hjSq56fJfzQs@mail.gmail.com>
	<alpine.DEB.2.00.1103141501160.19162@tvnag.unkk.fr>
Date: Wed, 16 Mar 2011 14:17:15 +0530
Message-ID: <AANLkTi=DJhQiqtavofjC+hOWzFhtWNrhT5Y6eZgj8OQ=@mail.gmail.com>
Subject: Re: Small binary files are getting transferred but not the larger
	ones in libssh2 SFTP
From: kali muthu <direct2kali@gmail.com>
To: Daniel Stenberg <daniel@haxx.se>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Wed, 16 Mar 2011 10:14:00 +0100 (CET)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Wed, 16 Mar 2011 10:13:31 +0100 (CET)
Cc: libssh2 development <libssh2-devel@cool.haxx.se>
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============1374090668=="
Errors-To: libssh2-devel-bounces@cool.haxx.se
Sender: libssh2-devel-bounces@cool.haxx.se

--===============1374090668==
Content-Type: multipart/alternative; boundary=000e0cd372c07af192049e95977d

--000e0cd372c07af192049e95977d
Content-Type: text/plain; charset=ISO-8859-1

>> You mean that are expected to be there?
Yes, the binary file actually has those contents and I need to transfer
them.

I tried transferring a JPG image file using SFTP. (I chose JPG because when
I opened the JPG file in the text editor Notepad++, it has the similar
contents like NUL). Even here I am not able to obtain the entire contents
using SFTP. The transferred file has lesser size than the original one. I
tried with your non-blocking example too. But no luck.

Is there any other way to transfer these kind of files? Or is this issue
specific to me?

-- 
Regards,
Kali

On Mon, Mar 14, 2011 at 7:33 PM, Daniel Stenberg <daniel@haxx.se> wrote:

> On Mon, 14 Mar 2011, kali muthu wrote:
>
>  On further analysis of the Binary File and while opening the file in
>> Notepad++ text editor, I could see that the file contains certain
>> character
>> NUL.
>>
>
>
>
>  (I have shown in a highlighted manner, since the character does look
>> like this).
>>
>
> (I read emails in text, you can't "highlight" then...)
>
>
>  Will that might cause my error to occur?
>>
>
> No. SSH and SFTP send data in full binary mode and send everything as-is.
>
> --
>
>  / daniel.haxx.se
>

--000e0cd372c07af192049e95977d
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

&gt;&gt; You mean that are expected to be there?<div>Yes, the binary file a=
ctually has those contents and I need to transfer them.</div><div><br></div=
><div>I tried transferring a JPG image file using SFTP. (I chose JPG becaus=
e when I opened the JPG file in the text editor Notepad++, it has the simil=
ar contents like NUL). Even here I am not able to obtain the entire content=
s using SFTP. The transferred file has lesser size than the original one. I=
 tried with your non-blocking example too. But no luck.</div>
<div><br></div><div><div><div>Is there any other way to transfer these kind=
 of files? Or is this issue specific to me?</div><div><br></div><div>--=A0<=
br>Regards,<br>Kali<br><br><div class=3D"gmail_quote">On Mon, Mar 14, 2011 =
at 7:33 PM, Daniel Stenberg <span dir=3D"ltr">&lt;<a href=3D"mailto:daniel@=
haxx.se">daniel@haxx.se</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex;"><div class=3D"im">On Mon, 14 Mar 2011, kali=
 muthu wrote:<br>
<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
On further analysis of the Binary File and while opening the file in<br>
Notepad++ text editor, I could see that the file contains certain character=
<br>
NUL.<br>
</blockquote>
<br></div><div class=3D"im"><br>
<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
(I have shown in a highlighted manner, since the character does look<br>
like this).<br>
</blockquote>
<br></div>
(I read emails in text, you can&#39;t &quot;highlight&quot; then...)<div cl=
ass=3D"im"><br>
<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
Will that might cause my error to occur?<br>
</blockquote>
<br></div>
No. SSH and SFTP send data in full binary mode and send everything as-is.<b=
r><font color=3D"#888888">
<br>
-- <br>
<br>
=A0/ <a href=3D"http://daniel.haxx.se" target=3D"_blank">daniel.haxx.se</a>=
<br>
</font></blockquote></div><br>
</div></div></div>

--000e0cd372c07af192049e95977d--

--===============1374090668==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

--===============1374090668==--

From libssh2-devel-bounces@cool.haxx.se  Wed Mar 16 10:53:27 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2G9rKKD027935;
	Wed, 16 Mar 2011 10:53:27 +0100
Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com
	[209.85.213.182])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2G9rH2v027874
	(version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Wed, 16 Mar 2011 10:53:18 +0100
Received: by yxl31 with SMTP id 31so716936yxl.41
	for <libssh2-devel@cool.haxx.se>; Wed, 16 Mar 2011 02:53:14 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=peut.org; s=google;
	h=domainkey-signature:message-id:date:from:user-agent:mime-version:to
	:subject:references:in-reply-to:content-type;
	bh=IIIifYkIGgtoPjY1lf/21b7+xX2wj49igoTSV4y3rS8=;
	b=G6HJOvcvZKew9b6zIMg8VmNtZ2pRyHuaZ5tDjjaNF9UiiwaY/f1fyNNLqahBeTlQP3
	JHkmmQTQSOOCLKbgUIRzxo88HsIIg9/ztU3gxKBWFkXRrmR+2M3ZtTCMuo/t43BfDUmo
	gAikzkeBfdCVbdwU8lATYUxR0eQq9STvHvuTg=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=peut.org; s=google;
	h=message-id:date:from:user-agent:mime-version:to:subject:references
	:in-reply-to:content-type;
	b=l0Tg4QIvL6y9PXIbq7ByPUXplVrEa6jRRHIYZt9+UEs7xTrebqQnam6cEdDKek3Zbh
	RhPNlZ+q+Fp97vaqw8x4BY1UkpaemDilteQUiz/NZbC229PugucHrV/E4ctXnTFEd+Y1
	Usm8oW8mCCvr7zCnQI+msnMubjsLRZmNJqN0k=
Received: by 10.91.40.3 with SMTP id s3mr1129515agj.160.1300269194310;
	Wed, 16 Mar 2011 02:53:14 -0700 (PDT)
Received: from [192.168.0.35] (96-160.ftth.onsbrabantnet.nl [88.159.160.96])
	by mx.google.com with ESMTPS id c17sm1021356anc.35.2011.03.16.02.53.12
	(version=SSLv3 cipher=OTHER); Wed, 16 Mar 2011 02:53:13 -0700 (PDT)
Message-ID: <4D80888A.40203@peut.org>
Date: Wed, 16 Mar 2011 10:53:14 +0100
From: Jose Baars <peut@peut.org>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; nl;
	rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9
MIME-Version: 1.0
To: libssh2-devel@cool.haxx.se
Subject: Re: Small binary files are getting transferred but not the larger
	ones in libssh2 SFTP
References: <AANLkTikWKvz9O8bjbKrdyNnH54ozetM_yWm0GmwiZr=8@mail.gmail.com>	<alpine.DEB.2.00.1103062245120.28357@tvnag.unkk.fr>	<AANLkTin1sK=R9kzwKVFQNuUMPkyQPW3f6TifwM6CFqiS@mail.gmail.com>	<AANLkTi=L4NTYRJrx9BaqvpwzfLFTc9E_hjSq56fJfzQs@mail.gmail.com>	<alpine.DEB.2.00.1103141501160.19162@tvnag.unkk.fr>
	<AANLkTi=DJhQiqtavofjC+hOWzFhtWNrhT5Y6eZgj8OQ=@mail.gmail.com>
In-Reply-To: <AANLkTi=DJhQiqtavofjC+hOWzFhtWNrhT5Y6eZgj8OQ=@mail.gmail.com>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Wed, 16 Mar 2011 10:53:27 +0100 (CET)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Wed, 16 Mar 2011 10:53:19 +0100 (CET)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============0584258768=="
Errors-To: libssh2-devel-bounces@cool.haxx.se
Sender: libssh2-devel-bounces@cool.haxx.se

This is a cryptographically signed message in MIME format.

--===============0584258768==
Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha1; boundary="------------ms030507030106090801020308"

This is a cryptographically signed message in MIME format.

--------------ms030507030106090801020308
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable

Op 3/16/2011 9:47 AM, kali muthu schreef:
>
> Is there any other way to transfer these kind of files? Or is this issu=
e specific to me?

Obviously you have not yet understood what a binary file is.
Please read the Wiki page again. Binary files have NUL characters. Always=
=2E

Your program contains a severe bug: it stops reading when a NUL
character is found in the data. That is wrong.

Throw your program away, and start afresh using a libssh2 example.



--------------ms030507030106090801020308
Content-Type: application/pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIRtDCC
BV0wggRFoAMCAQICEBUPxTeUYVibM15V7SdI4YcwDQYJKoZIhvcNAQEFBQAwgd0xCzAJBgNV
BAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjEfMB0GA1UECxMWVmVyaVNpZ24gVHJ1
c3QgTmV0d29yazE7MDkGA1UECxMyVGVybXMgb2YgdXNlIGF0IGh0dHBzOi8vd3d3LnZlcmlz
aWduLmNvbS9ycGEgKGMpMDkxHjAcBgNVBAsTFVBlcnNvbmEgTm90IFZhbGlkYXRlZDE3MDUG
A1UEAxMuVmVyaVNpZ24gQ2xhc3MgMSBJbmRpdmlkdWFsIFN1YnNjcmliZXIgQ0EgLSBHMzAe
Fw0xMDExMTIwMDAwMDBaFw0xMTExMTIyMzU5NTlaMIIBCjEXMBUGA1UEChMOVmVyaVNpZ24s
IEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdvcmsxRjBEBgNVBAsTPXd3dy52
ZXJpc2lnbi5jb20vcmVwb3NpdG9yeS9SUEEgSW5jb3JwLiBieSBSZWYuLExJQUIuTFREKGMp
OTgxHjAcBgNVBAsTFVBlcnNvbmEgTm90IFZhbGlkYXRlZDEzMDEGA1UECxMqRGlnaXRhbCBJ
RCBDbGFzcyAxIC0gTmV0c2NhcGUgRnVsbCBTZXJ2aWNlMRMwEQYDVQQDFApKb3NlIEJhYXJz
MRwwGgYJKoZIhvcNAQkBFg1wZXV0QHBldXQub3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
MIIBCgKCAQEAr/QJrg4jLwhCrNdHOzbC5HFzjE/FoklGXizIWpmW/bQOf6UQCVmJIPK7dsaJ
Dz2zytkbrrre5s/qfPcNkSScKSOguxyBmnQ/tW6Y0OnlYzv0ZrYyC0J8zzntDfZ5mLOzBTCY
rGS0Pqy8n7vRScDT927/62dEfgHiA3ceWbc+NCIJYdgupDjByypHgmi2H6JAiv6N16U2LRfM
2ZNBu4RYgWHQp31Y9cX/a/CHEv1rG/5MPVDQP6t45saHKJN/gcH4oXeCfHINZ7iUJhIWpk9i
pGEjwPLpgRAsGJFRHrZTBgOjrwrdzfrDgnKWkB2RY+IAYQ7z+8+KJGHwfuWvsH2EbQIDAQAB
o4HoMIHlMAkGA1UdEwQCMAAwRAYDVR0gBD0wOzA5BgtghkgBhvhFAQcXATAqMCgGCCsGAQUF
BwIBFhxodHRwczovL3d3dy52ZXJpc2lnbi5jb20vcnBhMAsGA1UdDwQEAwIFoDAdBgNVHSUE
FjAUBggrBgEFBQcDBAYIKwYBBQUHAwIwFAYKYIZIAYb4RQEGBwQGFgROb25lMFAGA1UdHwRJ
MEcwRaBDoEGGP2h0dHA6Ly9pbmRjMWRpZ2l0YWxpZC1nMy1jcmwudmVyaXNpZ24uY29tL0lu
ZEMxRGlnaXRhbElELUczLmNybDANBgkqhkiG9w0BAQUFAAOCAQEA5nI96tQkbCelTz4bLtnc
6uCIfbmE0slYOMLfmjwgXm0qJAMYCiBlhdBkBeROwP9JkqIRHMOnPAGB/i9nz/6KeIJQEBKT
ClJMeU9NZ4VvIsmaTnEmL86fuDQygCYJXf7+9PfIbK2BDQ9AsJtvLPfQXfMkATYEAP/dozXX
ZLiZ3p5sex3DzevIX8/TNjV4Vdt7S8rYXfLz+yZh5bJVliScankYwcScVh/0kn0DLdq47DxO
ZANPISNkOF0yvfT/cTFMnLykCwtZiGGfRGl5KAl6DSN0vn49B+M0QuvGAN/5itaGx4YCLMl1
0iganL8H2SHFW4a+BeKZ7t+1JG9l/YUGdTCCBV0wggRFoAMCAQICEBUPxTeUYVibM15V7SdI
4YcwDQYJKoZIhvcNAQEFBQAwgd0xCzAJBgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwg
SW5jLjEfMB0GA1UECxMWVmVyaVNpZ24gVHJ1c3QgTmV0d29yazE7MDkGA1UECxMyVGVybXMg
b2YgdXNlIGF0IGh0dHBzOi8vd3d3LnZlcmlzaWduLmNvbS9ycGEgKGMpMDkxHjAcBgNVBAsT
FVBlcnNvbmEgTm90IFZhbGlkYXRlZDE3MDUGA1UEAxMuVmVyaVNpZ24gQ2xhc3MgMSBJbmRp
dmlkdWFsIFN1YnNjcmliZXIgQ0EgLSBHMzAeFw0xMDExMTIwMDAwMDBaFw0xMTExMTIyMzU5
NTlaMIIBCjEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRy
dXN0IE5ldHdvcmsxRjBEBgNVBAsTPXd3dy52ZXJpc2lnbi5jb20vcmVwb3NpdG9yeS9SUEEg
SW5jb3JwLiBieSBSZWYuLExJQUIuTFREKGMpOTgxHjAcBgNVBAsTFVBlcnNvbmEgTm90IFZh
bGlkYXRlZDEzMDEGA1UECxMqRGlnaXRhbCBJRCBDbGFzcyAxIC0gTmV0c2NhcGUgRnVsbCBT
ZXJ2aWNlMRMwEQYDVQQDFApKb3NlIEJhYXJzMRwwGgYJKoZIhvcNAQkBFg1wZXV0QHBldXQu
b3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAr/QJrg4jLwhCrNdHOzbC5HFz
jE/FoklGXizIWpmW/bQOf6UQCVmJIPK7dsaJDz2zytkbrrre5s/qfPcNkSScKSOguxyBmnQ/
tW6Y0OnlYzv0ZrYyC0J8zzntDfZ5mLOzBTCYrGS0Pqy8n7vRScDT927/62dEfgHiA3ceWbc+
NCIJYdgupDjByypHgmi2H6JAiv6N16U2LRfM2ZNBu4RYgWHQp31Y9cX/a/CHEv1rG/5MPVDQ
P6t45saHKJN/gcH4oXeCfHINZ7iUJhIWpk9ipGEjwPLpgRAsGJFRHrZTBgOjrwrdzfrDgnKW
kB2RY+IAYQ7z+8+KJGHwfuWvsH2EbQIDAQABo4HoMIHlMAkGA1UdEwQCMAAwRAYDVR0gBD0w
OzA5BgtghkgBhvhFAQcXATAqMCgGCCsGAQUFBwIBFhxodHRwczovL3d3dy52ZXJpc2lnbi5j
b20vcnBhMAsGA1UdDwQEAwIFoDAdBgNVHSUEFjAUBggrBgEFBQcDBAYIKwYBBQUHAwIwFAYK
YIZIAYb4RQEGBwQGFgROb25lMFAGA1UdHwRJMEcwRaBDoEGGP2h0dHA6Ly9pbmRjMWRpZ2l0
YWxpZC1nMy1jcmwudmVyaXNpZ24uY29tL0luZEMxRGlnaXRhbElELUczLmNybDANBgkqhkiG
9w0BAQUFAAOCAQEA5nI96tQkbCelTz4bLtnc6uCIfbmE0slYOMLfmjwgXm0qJAMYCiBlhdBk
BeROwP9JkqIRHMOnPAGB/i9nz/6KeIJQEBKTClJMeU9NZ4VvIsmaTnEmL86fuDQygCYJXf7+
9PfIbK2BDQ9AsJtvLPfQXfMkATYEAP/dozXXZLiZ3p5sex3DzevIX8/TNjV4Vdt7S8rYXfLz
+yZh5bJVliScankYwcScVh/0kn0DLdq47DxOZANPISNkOF0yvfT/cTFMnLykCwtZiGGfRGl5
KAl6DSN0vn49B+M0QuvGAN/5itaGx4YCLMl10iganL8H2SHFW4a+BeKZ7t+1JG9l/YUGdTCC
Bu4wggXWoAMCAQICEHEVZgVK5JEhTem8RPms09wwDQYJKoZIhvcNAQEFBQAwgcoxCzAJBgNV
BAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjEfMB0GA1UECxMWVmVyaVNpZ24gVHJ1
c3QgTmV0d29yazE6MDgGA1UECxMxKGMpIDE5OTkgVmVyaVNpZ24sIEluYy4gLSBGb3IgYXV0
aG9yaXplZCB1c2Ugb25seTFFMEMGA1UEAxM8VmVyaVNpZ24gQ2xhc3MgMSBQdWJsaWMgUHJp
bWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEczMB4XDTA5MDUwMTAwMDAwMFoXDTE5
MDQzMDIzNTk1OVowgd0xCzAJBgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjEf
MB0GA1UECxMWVmVyaVNpZ24gVHJ1c3QgTmV0d29yazE7MDkGA1UECxMyVGVybXMgb2YgdXNl
IGF0IGh0dHBzOi8vd3d3LnZlcmlzaWduLmNvbS9ycGEgKGMpMDkxHjAcBgNVBAsTFVBlcnNv
bmEgTm90IFZhbGlkYXRlZDE3MDUGA1UEAxMuVmVyaVNpZ24gQ2xhc3MgMSBJbmRpdmlkdWFs
IFN1YnNjcmliZXIgQ0EgLSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAO3E
R98qKB18Bmu71yEyyWwTj+mxjUFONPfaC+Nq+mWIIAsRE+mb4ElOi2/VAdBfDUeRilpMdD4/
xpEJu0w0no1uoYJRYvdpdliWB6+eFBgHT1q9n9IxslQZc0ZqGUIR7BJzIY313DDN5dlWCjHF
Nm0pFJe9LdqJRxmI2EsEPeu2PGcedAATDdCG2pNn+DMDrho8a2l49sAsjuGDP3f5mf/+n1Ja
wrSHCthsqUfBVCllQz5KwJYfwa33d69ssQRevsG2lC2XkC0n0rse6YNqhPbEsq4jBmUmpSdY
KwcitG+mYkgad/LVUCeaKdOW+yj1uiR2YuOMWev7btVCxL5Bx/UCAwEAAaOCArkwggK1MDQG
CCsGAQUFBwEBBCgwJjAkBggrBgEFBQcwAYYYaHR0cDovL29jc3AudmVyaXNpZ24uY29tMBIG
A1UdEwEB/wQIMAYBAf8CAQAwcAYDVR0gBGkwZzBlBgtghkgBhvhFAQcXATBWMCgGCCsGAQUF
BwIBFhxodHRwczovL3d3dy52ZXJpc2lnbi5jb20vY3BzMCoGCCsGAQUFBwICMB4aHGh0dHBz
Oi8vd3d3LnZlcmlzaWduLmNvbS9ycGEwNAYDVR0fBC0wKzApoCegJYYjaHR0cDovL2NybC52
ZXJpc2lnbi5jb20vcGNhMS1nMy5jcmwwDgYDVR0PAQH/BAQDAgEGMG4GCCsGAQUFBwEMBGIw
YKFeoFwwWjBYMFYWCWltYWdlL2dpZjAhMB8wBwYFKw4DAhoEFEtruSiWBgy70FI4mymsSweL
IQUYMCYWJGh0dHA6Ly9sb2dvLnZlcmlzaWduLmNvbS92c2xvZ28xLmdpZjAuBgNVHREEJzAl
pCMwITEfMB0GA1UEAxMWUHJpdmF0ZUxhYmVsNC0yMDQ4LTExODAdBgNVHQ4EFgQUeUdhCEH9
OASiS+e1zPVD9kkrEfgwgfEGA1UdIwSB6TCB5qGB0KSBzTCByjELMAkGA1UEBhMCVVMxFzAV
BgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3Jr
MTowOAYDVQQLEzEoYykgMTk5OSBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVz
ZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAxIFB1YmxpYyBQcmltYXJ5IENlcnRp
ZmljYXRpb24gQXV0aG9yaXR5IC0gRzOCEQCLW3VWhFSFCwDPrzhIzrGkMA0GCSqGSIb3DQEB
BQUAA4IBAQA5Tc9BmYG1qQW1UjjpOYSJbOQ0qFrn2GwJTCQaulmkhztzIfGTgc+/aGNaZ/41
hSuhw12jSsI6Gd0w1sxN7/HSgZfKVFpDvzeLeo4ZjQ9DqIzyr2CzFYqzlZw84J6zJ5ikNXIX
5fwqXYfTig3C0UUq+MD0rCqTOtWuEnAI6/s74nfs6CtkNXbNutrg0csU1nFYm77VPn222egk
xSRmTF2RH3azFz5/DcYhiS+zN7ih/1yybUneZVJC+w6I0u1KHb9L4/jMcvpIDmWOScjW+JmY
O7eUPjFxBof6bFlTLtffK+1fYwCsFe0DuFUWjMZoA+ciqHMLsbyg2lJY3QoOf8GCMYIE7DCC
BOgCAQEwgfIwgd0xCzAJBgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjEfMB0G
A1UECxMWVmVyaVNpZ24gVHJ1c3QgTmV0d29yazE7MDkGA1UECxMyVGVybXMgb2YgdXNlIGF0
IGh0dHBzOi8vd3d3LnZlcmlzaWduLmNvbS9ycGEgKGMpMDkxHjAcBgNVBAsTFVBlcnNvbmEg
Tm90IFZhbGlkYXRlZDE3MDUGA1UEAxMuVmVyaVNpZ24gQ2xhc3MgMSBJbmRpdmlkdWFsIFN1
YnNjcmliZXIgQ0EgLSBHMwIQFQ/FN5RhWJszXlXtJ0jhhzAJBgUrDgMCGgUAoIICzjAYBgkq
hkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0xMTAzMTYwOTUzMTRaMCMG
CSqGSIb3DQEJBDEWBBQwxYax+qiFzgf7rGIBL51pXkaGpzBfBgkqhkiG9w0BCQ8xUjBQMAsG
CWCGSAFlAwQBAjAKBggqhkiG9w0DBzAOBggqhkiG9w0DAgICAIAwDQYIKoZIhvcNAwICAUAw
BwYFKw4DAgcwDQYIKoZIhvcNAwICASgwggEDBgkrBgEEAYI3EAQxgfUwgfIwgd0xCzAJBgNV
BAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjEfMB0GA1UECxMWVmVyaVNpZ24gVHJ1
c3QgTmV0d29yazE7MDkGA1UECxMyVGVybXMgb2YgdXNlIGF0IGh0dHBzOi8vd3d3LnZlcmlz
aWduLmNvbS9ycGEgKGMpMDkxHjAcBgNVBAsTFVBlcnNvbmEgTm90IFZhbGlkYXRlZDE3MDUG
A1UEAxMuVmVyaVNpZ24gQ2xhc3MgMSBJbmRpdmlkdWFsIFN1YnNjcmliZXIgQ0EgLSBHMwIQ
FQ/FN5RhWJszXlXtJ0jhhzCCAQUGCyqGSIb3DQEJEAILMYH1oIHyMIHdMQswCQYDVQQGEwJV
UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5l
dHdvcmsxOzA5BgNVBAsTMlRlcm1zIG9mIHVzZSBhdCBodHRwczovL3d3dy52ZXJpc2lnbi5j
b20vcnBhIChjKTA5MR4wHAYDVQQLExVQZXJzb25hIE5vdCBWYWxpZGF0ZWQxNzA1BgNVBAMT
LlZlcmlTaWduIENsYXNzIDEgSW5kaXZpZHVhbCBTdWJzY3JpYmVyIENBIC0gRzMCEBUPxTeU
YVibM15V7SdI4YcwDQYJKoZIhvcNAQEBBQAEggEAki3HoQQYa2sDv/q4uf7DjF34U8iMDTTH
4iOX9PO9z+NOY/awssuROtyb5+QNclQypNgQ1fzl/k5jmW3N9BiansTeGm+N3Bf36YegtPKA
AX6cuIS0BPdt9R7NW+2hkDOVlGC1Ii8MzGg+7RVgigF6wVlbIK6XE3IdfcEftrfR1PmaMmwm
1f7ccdd+7Gbcq7jIj7Ymi+pwFQ4jMguaBHvvYIbTqNOPXrGYxMOEL3c0EsDBjLZeQ0gituRf
lyyxgUO/XtcCrx64akPX7YHDcdzKP1iLEQ8j7cNqW6yIvUtZxW3qcT6vaLSBi8Ysr86Pv/Rf
M4OeX2J3BO9gN1P0MwQXPQAAAAAAAA==
--------------ms030507030106090801020308--

--===============0584258768==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

--===============0584258768==--

From libssh2-devel-bounces@cool.haxx.se  Wed Mar 16 15:06:05 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2GE5fwW018576;
	Wed, 16 Mar 2011 15:06:00 +0100
Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com
	[209.85.161.182])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2GE5dK2018546
	(version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Wed, 16 Mar 2011 15:05:40 +0100
Received: by gxk28 with SMTP id 28so808494gxk.41
	for <libssh2-devel@cool.haxx.se>; Wed, 16 Mar 2011 07:05:36 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:in-reply-to:references:date
	:message-id:subject:from:to:cc:content-type;
	bh=Tf7M8oLMBq2cY79vLqoYBs0hO5fTdzBM2ttrAP5WC1s=;
	b=vgAxaou7hbLSrkxSARtX3gZZYbzNPqxznwotrYJdrwySLx9egwbNb31b1MzPdGnFP0
	a89hNvDpbSLtiPaC3xgnMxNPGti/vzM0IlEJWJtNbunyPEFtEfoDWmfaWph6zaS/dcTw
	LE3SvkWmToSaIqBmm3r+bH2qpCHNAOC+eic1Y=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type;
	b=Eh34721SsezRVH3osP1KwAsncj7ikUFBoe5NzyJwDUCEt1NbGRJvSBYGZ0Dt4REaEj
	FLCoaSnnxA2Re/xElusNFGmzy8Ovia1skiuZky5g4pgmItkJyIUyuNvWSOSb/0F9zcYI
	ZJYZuNKTF5OpTGgYejyh2nhHKVpJNRvAMFL0o=
MIME-Version: 1.0
Received: by 10.150.63.4 with SMTP id l4mr118884yba.337.1300284335398; Wed, 16
	Mar 2011 07:05:35 -0700 (PDT)
Received: by 10.147.182.16 with HTTP; Wed, 16 Mar 2011 07:05:35 -0700 (PDT)
In-Reply-To: <4D80888A.40203@peut.org>
References: <AANLkTikWKvz9O8bjbKrdyNnH54ozetM_yWm0GmwiZr=8@mail.gmail.com>
	<alpine.DEB.2.00.1103062245120.28357@tvnag.unkk.fr>
	<AANLkTin1sK=R9kzwKVFQNuUMPkyQPW3f6TifwM6CFqiS@mail.gmail.com>
	<AANLkTi=L4NTYRJrx9BaqvpwzfLFTc9E_hjSq56fJfzQs@mail.gmail.com>
	<alpine.DEB.2.00.1103141501160.19162@tvnag.unkk.fr>
	<AANLkTi=DJhQiqtavofjC+hOWzFhtWNrhT5Y6eZgj8OQ=@mail.gmail.com>
	<4D80888A.40203@peut.org>
Date: Wed, 16 Mar 2011 19:35:35 +0530
Message-ID: <AANLkTim0qi6=S3P3A5kcOp-ShBNH7wJmgNrmML-PTNrO@mail.gmail.com>
Subject: Re: Small binary files are getting transferred but not the larger
	ones in libssh2 SFTP
From: kali muthu <direct2kali@gmail.com>
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Wed, 16 Mar 2011 15:06:05 +0100 (CET)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Wed, 16 Mar 2011 15:05:40 +0100 (CET)
Cc: Jose Baars <peut@peut.org>
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============1578915668=="
Errors-To: libssh2-devel-bounces@cool.haxx.se
Sender: libssh2-devel-bounces@cool.haxx.se

--===============1578915668==
Content-Type: multipart/alternative; boundary=000e0cd3ae9ceb1ff5049e9a09ba

--000e0cd3ae9ceb1ff5049e9a09ba
Content-Type: text/plain; charset=ISO-8859-1

I have resolved my issue and it is on my end only. I used the redirection
operator (<<) for writing into the file which actually writes formatted data
and just found out that in C++ iostream::write will write
data unformatted  into the file. Thanks guys for your support and it was
indeed invaluable. Kudos to you and again thanks a lot.


-- 
Regards,
Kali

On Wed, Mar 16, 2011 at 3:23 PM, Jose Baars <peut@peut.org> wrote:

> Op 3/16/2011 9:47 AM, kali muthu schreef:
>
>
>> Is there any other way to transfer these kind of files? Or is this issue
>> specific to me?
>>
>
> Obviously you have not yet understood what a binary file is.
> Please read the Wiki page again. Binary files have NUL characters. Always.
>
> Your program contains a severe bug: it stops reading when a NUL
> character is found in the data. That is wrong.
>
> Throw your program away, and start afresh using a libssh2 example.
>
>
>
> _______________________________________________
> libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
>
>

--000e0cd3ae9ceb1ff5049e9a09ba
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

I have resolved my issue and it is on my end only. I used the redirection o=
perator (&lt;&lt;) for writing into the file which actually writes formatte=
d data and just found out that in C++ iostream::write will write data=A0unf=
ormatted=A0=A0into the file. Thanks guys for your support and it was indeed=
 invaluable. Kudos to you and again thanks a lot.=A0<br>
<br><div><br>--=A0<br>Regards,<br>Kali<br><div><br><div class=3D"gmail_quot=
e">On Wed, Mar 16, 2011 at 3:23 PM, Jose Baars <span dir=3D"ltr">&lt;<a hre=
f=3D"mailto:peut@peut.org">peut@peut.org</a>&gt;</span> wrote:<br><blockquo=
te class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc so=
lid;padding-left:1ex;">
Op 3/16/2011 9:47 AM, kali muthu schreef:<div class=3D"im"><br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
<br>
Is there any other way to transfer these kind of files? Or is this issue sp=
ecific to me?<br>
</blockquote>
<br></div>
Obviously you have not yet understood what a binary file is.<br>
Please read the Wiki page again. Binary files have NUL characters. Always.<=
br>
<br>
Your program contains a severe bug: it stops reading when a NUL<br>
character is found in the data. That is wrong.<br>
<br>
Throw your program away, and start afresh using a libssh2 example.<br>
<br>
<br>
<br>_______________________________________________<br>
libssh2-devel <a href=3D"http://cool.haxx.se/cgi-bin/mailman/listinfo/libss=
h2-devel" target=3D"_blank">http://cool.haxx.se/cgi-bin/mailman/listinfo/li=
bssh2-devel</a><br>
<br></blockquote></div><br>
</div></div>

--000e0cd3ae9ceb1ff5049e9a09ba--

--===============1578915668==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

--===============1578915668==--

From libssh2-devel-bounces@cool.haxx.se  Tue Mar 22 13:34:54 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2MCYS3V011768;
	Tue, 22 Mar 2011 13:34:49 +0100
Received: from mta1.tenable.com (mta1.tenablesecurity.com [66.240.11.66])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2MCYQHD011753
	for <libssh2-devel@cool.haxx.se>; Tue, 22 Mar 2011 13:34:26 +0100
X-ASG-Debug-ID: 1300797268-0ec6aab90001-rM6l5m
Received: from mail1.dmz.tenablesecurity.com ([172.20.210.11]) by
	mta1.tenable.com with ESMTP id HzzlOXCtBxWaeMJ2 for
	<libssh2-devel@cool.haxx.se>; Tue, 22 Mar 2011 08:34:28 -0400 (EDT)
X-Barracuda-Envelope-From: jyerge@tenable.com
X-Barracuda-RBL-Trusted-Forwarder: 172.20.210.11
Received: from lap7307 (lap7307.corp.tenablesecurity.com [172.20.101.101])
	(using TLSv1 with cipher RC4-MD5 (128/128 bits))
	(No client certificate requested) (Authenticated sender: jyerge)
	by mail1.dmz.tenablesecurity.com (Postfix) with ESMTP id B05701508CA8
	for <libssh2-devel@cool.haxx.se>; Tue, 22 Mar 2011 08:34:28 -0400 (EDT)
From: "James Yerge" <jyerge@tenable.com>
To: <libssh2-devel@cool.haxx.se>
Subject: FIPS Support
Date: Tue, 22 Mar 2011 08:34:28 -0400
X-ASG-Orig-Subj: FIPS Support
Organization: Tenable Network Security, Inc.
Message-ID: <000901cbe88d$7c8f25e0$75ad71a0$@com>
MIME-Version: 1.0
X-Mailer: Microsoft Office Outlook 12.0
Thread-Index: AcvojXxhnZIejkjuT/iC1AbqQcAHtg==
Content-Language: en-us
X-Barracuda-Connect: UNKNOWN[172.20.210.11]
X-Barracuda-Start-Time: 1300797268
X-Virus-Scanned: by bsmtpd at tenable.com
X-Barracuda-Spam-Score: 0.00
X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0
	QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.0 tests=HTML_MESSAGE
X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.58636
	Rule breakdown below
	pts rule name              description
	---- ----------------------
	--------------------------------------------------
	0.00 HTML_MESSAGE           BODY: HTML included in message
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Tue, 22 Mar 2011 13:34:54 +0100 (CET)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Tue, 22 Mar 2011 13:34:27 +0100 (CET)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============0334718461=="
Errors-To: libssh2-devel-bounces@cool.haxx.se
Sender: libssh2-devel-bounces@cool.haxx.se

This is a multi-part message in MIME format.

--===============0334718461==
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_000A_01CBE86B.F57D85E0"
Content-Language: en-us

This is a multi-part message in MIME format.

------=_NextPart_000_000A_01CBE86B.F57D85E0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

Any future plans for this?


------=_NextPart_000_000A_01CBE86B.F57D85E0
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40"><head><META =
HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii"><meta name=3DGenerator content=3D"Microsoft Word 12 =
(filtered medium)"><style><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Calibri","sans-serif";
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body lang=3DEN-US link=3Dblue =
vlink=3Dpurple><div class=3DWordSection1><p class=3DMsoNormal>Any future =
plans for this?<o:p></o:p></p></div></body></html>
------=_NextPart_000_000A_01CBE86B.F57D85E0--


--===============0334718461==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

--===============0334718461==--

From libssh2-devel-bounces@cool.haxx.se  Tue Mar 22 13:38:28 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2MCcQ3A013206;
	Tue, 22 Mar 2011 13:38:27 +0100
Received: from giant.haxx.se (giant.haxx.se [80.67.6.50])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2MCcP5M013195
	for <libssh2-devel@cool.haxx.se>; Tue, 22 Mar 2011 13:38:25 +0100
Date: Tue, 22 Mar 2011 13:38:25 +0100 (CET)
From: Daniel Stenberg <daniel@haxx.se>
X-X-Sender: dast@giant.haxx.se
To: libssh2 development <libssh2-devel@cool.haxx.se>
Subject: Re: FIPS Support
In-Reply-To: <000901cbe88d$7c8f25e0$75ad71a0$@com>
Message-ID: <alpine.DEB.2.00.1103221336590.9413@tvnag.unkk.fr>
References: <000901cbe88d$7c8f25e0$75ad71a0$@com>
User-Agent: Alpine 2.00 (DEB 1167 2008-08-23)
X-fromdanielhimself: yes
MIME-Version: 1.0
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Tue, 22 Mar 2011 13:38:28 +0100 (CET)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Tue, 22 Mar 2011 13:38:25 +0100 (CET)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Errors-To: libssh2-devel-bounces@cool.haxx.se
Sender: libssh2-devel-bounces@cool.haxx.se

On Tue, 22 Mar 2011, James Yerge wrote:

> Any future plans for this?

What exactly do you mean with "FIPS Support" from us?

-- 

  / daniel.haxx.se
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Tue Mar 22 13:45:29 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2MCjObs020824;
	Tue, 22 Mar 2011 13:45:27 +0100
Received: from foo.stuge.se (qmailr@foo.stuge.se [213.88.146.6])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with SMTP id p2MCjMYm020808
	for <libssh2-devel@cool.haxx.se>; Tue, 22 Mar 2011 13:45:22 +0100
Received: (qmail 31000 invoked by uid 501); 22 Mar 2011 12:45:25 -0000
Message-ID: <20110322124525.30999.qmail@stuge.se>
Date: Tue, 22 Mar 2011 13:45:25 +0100
From: Peter Stuge <peter@stuge.se>
To: libssh2-devel@cool.haxx.se
Subject: Re: FIPS Support
Mail-Followup-To: libssh2-devel@cool.haxx.se
References: <000901cbe88d$7c8f25e0$75ad71a0$@com>
MIME-Version: 1.0
Content-Disposition: inline
In-Reply-To: <000901cbe88d$7c8f25e0$75ad71a0$@com>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Tue, 22 Mar 2011 13:45:29 +0100 (CET)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Tue, 22 Mar 2011 13:45:22 +0100 (CET)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: libssh2-devel-bounces@cool.haxx.se
Sender: libssh2-devel-bounces@cool.haxx.se

James Yerge wrote:
> Any future plans for this?

libssh2 could be built against FIPS OpenSSL. Is that good enough, or
would libssh2 need some certification as well?


//Peter
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Tue Mar 22 13:55:24 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2MCtJQq024056;
	Tue, 22 Mar 2011 13:55:23 +0100
Received: from mta1.tenable.com (mta1.tenablesecurity.com [66.240.11.66])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2MCtHZs024052
	for <libssh2-devel@cool.haxx.se>; Tue, 22 Mar 2011 13:55:17 +0100
X-ASG-Debug-ID: 1300798519-0ec2ac980001-rM6l5m
Received: from mail1.dmz.tenablesecurity.com ([172.20.210.11]) by
	mta1.tenable.com with ESMTP id 5NJDZSSqH20vRIOp for
	<libssh2-devel@cool.haxx.se>; Tue, 22 Mar 2011 08:55:19 -0400 (EDT)
X-Barracuda-Envelope-From: jyerge@tenable.com
X-Barracuda-RBL-Trusted-Forwarder: 172.20.210.11
Received: from lap7307 (lap7307.corp.tenablesecurity.com [172.20.101.101])
	(using TLSv1 with cipher RC4-MD5 (128/128 bits))
	(No client certificate requested) (Authenticated sender: jyerge)
	by mail1.dmz.tenablesecurity.com (Postfix) with ESMTP id 297933144001
	for <libssh2-devel@cool.haxx.se>; Tue, 22 Mar 2011 08:55:19 -0400 (EDT)
From: "James Yerge" <jyerge@tenable.com>
To: "'libssh2 development'" <libssh2-devel@cool.haxx.se>
References: <000901cbe88d$7c8f25e0$75ad71a0$@com>
	<alpine.DEB.2.00.1103221336590.9413@tvnag.unkk.fr>
In-Reply-To: <alpine.DEB.2.00.1103221336590.9413@tvnag.unkk.fr>
Subject: RE: FIPS Support
Date: Tue, 22 Mar 2011 08:55:19 -0400
X-ASG-Orig-Subj: RE: FIPS Support
Organization: Tenable Network Security, Inc.
Message-ID: <001d01cbe890$65e34940$31a9dbc0$@com>
MIME-Version: 1.0
X-Mailer: Microsoft Office Outlook 12.0
Thread-Index: AcvojlF3q8U4cURLSUiwsga0XFbnDwAAVOKg
Content-Language: en-us
X-Barracuda-Connect: UNKNOWN[172.20.210.11]
X-Barracuda-Start-Time: 1300798519
X-Virus-Scanned: by bsmtpd at tenable.com
X-Barracuda-Spam-Score: 0.00
X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0
	QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.0 tests=
X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.58638
	Rule breakdown below
	pts rule name              description
	---- ----------------------
	--------------------------------------------------
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Tue, 22 Mar 2011 13:55:24 +0100 (CET)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Tue, 22 Mar 2011 13:55:17 +0100 (CET)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: libssh2-devel-bounces@cool.haxx.se
Sender: libssh2-devel-bounces@cool.haxx.se

Sorry, should've been more verbose :)

Basically, detect if we're operating in FIPS mode and determine what
functions cannot be called directly. For instance, RSA_public_decrypt()
cannot be called directly when operating in FIPS mode, the EVP_Verify*
functions have to be used instead. I would also assume that determination of
FIPS only algorithms would need to be used when operating in FIPS mode.

The RSA_public_decrypt() is just an example.


-----Original Message-----
From: libssh2-devel-bounces@cool.haxx.se
[mailto:libssh2-devel-bounces@cool.haxx.se] On Behalf Of Daniel Stenberg
Sent: Tuesday, March 22, 2011 8:38 AM
To: libssh2 development
Subject: Re: FIPS Support

On Tue, 22 Mar 2011, James Yerge wrote:

> Any future plans for this?

What exactly do you mean with "FIPS Support" from us?

-- 

  / daniel.haxx.se
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Wed Mar 23 09:13:15 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2N8Cvl3026176;
	Wed, 23 Mar 2011 09:13:12 +0100
Received: from giant.haxx.se (giant.haxx.se [80.67.6.50])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2N8CuB8026170
	for <libssh2-devel@cool.haxx.se>; Wed, 23 Mar 2011 09:12:56 +0100
Date: Wed, 23 Mar 2011 09:12:56 +0100 (CET)
From: Daniel Stenberg <daniel@haxx.se>
X-X-Sender: dast@giant.haxx.se
To: libssh2 development <libssh2-devel@cool.haxx.se>
Subject: RE: FIPS Support
In-Reply-To: <001d01cbe890$65e34940$31a9dbc0$@com>
Message-ID: <alpine.DEB.2.00.1103230910470.30824@tvnag.unkk.fr>
References: <000901cbe88d$7c8f25e0$75ad71a0$@com>
	<alpine.DEB.2.00.1103221336590.9413@tvnag.unkk.fr>
	<001d01cbe890$65e34940$31a9dbc0$@com>
User-Agent: Alpine 2.00 (DEB 1167 2008-08-23)
X-fromdanielhimself: yes
MIME-Version: 1.0
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Wed, 23 Mar 2011 09:13:15 +0100 (CET)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Wed, 23 Mar 2011 09:12:56 +0100 (CET)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Errors-To: libssh2-devel-bounces@cool.haxx.se
Sender: libssh2-devel-bounces@cool.haxx.se

On Tue, 22 Mar 2011, James Yerge wrote:

> Basically, detect if we're operating in FIPS mode and determine what 
> functions cannot be called directly. For instance, RSA_public_decrypt() 
> cannot be called directly when operating in FIPS mode, the EVP_Verify* 
> functions have to be used instead. I would also assume that determination of 
> FIPS only algorithms would need to be used when operating in FIPS mode.
>
> The RSA_public_decrypt() is just an example.

I suggest we have the source code either completely unconditionally adapted to 
this API (if it is possible), or it gets conditionally used if the configure 
script detects that the used OpenSSL library is "Fipsed".

Patches welcome!

-- 

  / daniel.haxx.se
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Wed Mar 23 12:46:29 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2NBk8ef018458;
	Wed, 23 Mar 2011 12:46:25 +0100
Received: from mta1.tenable.com (mta1.tenablesecurity.com [66.240.11.66])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2NBk6F1018445
	for <libssh2-devel@cool.haxx.se>; Wed, 23 Mar 2011 12:46:07 +0100
X-ASG-Debug-ID: 1300880767-0ec205560001-rM6l5m
Received: from mail1.dmz.tenablesecurity.com ([172.20.210.11]) by
	mta1.tenable.com with ESMTP id ZhoixNmRZHCV3cqp for
	<libssh2-devel@cool.haxx.se>; Wed, 23 Mar 2011 07:46:07 -0400 (EDT)
X-Barracuda-Envelope-From: jyerge@tenable.com
X-Barracuda-RBL-Trusted-Forwarder: 172.20.210.11
Received: from lap7307 (lap7307.corp.tenablesecurity.com [172.20.101.101])
	(using TLSv1 with cipher RC4-MD5 (128/128 bits))
	(No client certificate requested) (Authenticated sender: jyerge)
	by mail1.dmz.tenablesecurity.com (Postfix) with ESMTP id 7ACD83144002
	for <libssh2-devel@cool.haxx.se>; Wed, 23 Mar 2011 07:46:07 -0400 (EDT)
From: "James Yerge" <jyerge@tenable.com>
To: "'libssh2 development'" <libssh2-devel@cool.haxx.se>
References: <000901cbe88d$7c8f25e0$75ad71a0$@com>	<alpine.DEB.2.00.1103221336590.9413@tvnag.unkk.fr>	<001d01cbe890$65e34940$31a9dbc0$@com>
	<alpine.DEB.2.00.1103230910470.30824@tvnag.unkk.fr>
In-Reply-To: <alpine.DEB.2.00.1103230910470.30824@tvnag.unkk.fr>
Subject: RE: FIPS Support
Date: Wed, 23 Mar 2011 07:46:07 -0400
X-ASG-Orig-Subj: RE: FIPS Support
Organization: Tenable Network Security, Inc.
Message-ID: <000001cbe94f$e5cebad0$b16c3070$@com>
MIME-Version: 1.0
X-Mailer: Microsoft Office Outlook 12.0
Thread-Index: AcvpMpgfgIczETZpSMeNeHRmEwEggQAHReAQ
Content-Language: en-us
X-Barracuda-Connect: UNKNOWN[172.20.210.11]
X-Barracuda-Start-Time: 1300880767
X-Virus-Scanned: by bsmtpd at tenable.com
X-Barracuda-Spam-Score: 0.00
X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0
	QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.0 tests=
X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.58728
	Rule breakdown below
	pts rule name              description
	---- ----------------------
	--------------------------------------------------
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Wed, 23 Mar 2011 12:46:28 +0100 (CET)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]); Wed, 23 Mar 2011 12:46:07 +0100 (CET)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: libssh2-devel-bounces@cool.haxx.se
Sender: libssh2-devel-bounces@cool.haxx.se

That sounds excellent. Maybe when I get some spare cycles, I'll dig through
the source and determine what needs to be changed and potentially provide
some patches :)

Another method of detecting FIPS mode is checking for the environment
variable OPENSSL_FIPS.


-----Original Message-----
From: libssh2-devel-bounces@cool.haxx.se
[mailto:libssh2-devel-bounces@cool.haxx.se] On Behalf Of Daniel Stenberg
Sent: Wednesday, March 23, 2011 4:13 AM
To: libssh2 development
Subject: RE: FIPS Support

On Tue, 22 Mar 2011, James Yerge wrote:

> Basically, detect if we're operating in FIPS mode and determine what 
> functions cannot be called directly. For instance, RSA_public_decrypt() 
> cannot be called directly when operating in FIPS mode, the EVP_Verify* 
> functions have to be used instead. I would also assume that determination
of 
> FIPS only algorithms would need to be used when operating in FIPS mode.
>
> The RSA_public_decrypt() is just an example.

I suggest we have the source code either completely unconditionally adapted
to 
this API (if it is possible), or it gets conditionally used if the configure

script detects that the used OpenSSL library is "Fipsed".

Patches welcome!

-- 

  / daniel.haxx.se
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Mon Mar 28 14:49:56 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2SCmPRB002046;
	Mon, 28 Mar 2011 14:49:51 +0200
Received: from giant.haxx.se (giant.haxx.se [80.67.6.50])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2SCmO9H002040
	for <libssh2-devel@cool.haxx.se>; Mon, 28 Mar 2011 14:48:24 +0200
Date: Mon, 28 Mar 2011 14:48:24 +0200 (CEST)
From: Daniel Stenberg <daniel@haxx.se>
X-X-Sender: dast@giant.haxx.se
To: libssh2 development <libssh2-devel@cool.haxx.se>
Subject: Re: Release time on April 5
In-Reply-To: <alpine.DEB.2.00.1102141636180.14361@tvnag.unkk.fr>
Message-ID: <alpine.DEB.2.00.1103281447380.18622@tvnag.unkk.fr>
References: <alpine.DEB.2.00.1102141636180.14361@tvnag.unkk.fr>
User-Agent: Alpine 2.00 (DEB 1167 2008-08-23)
X-fromdanielhimself: yes
MIME-Version: 1.0
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Mon, 28 Mar 2011 14:49:56 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]);
	Mon, 28 Mar 2011 14:48:24 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Errors-To: libssh2-devel-bounces@cool.haxx.se
Sender: libssh2-devel-bounces@cool.haxx.se

On Thu, 10 Mar 2011, Daniel Stenberg wrote:

> Barring no new major problems appear, I have my eyes fixed on April 5th as a 
> release date for version 1.2.8. That's almost a month from now.

Just a reminder. We're now about a week from release and basically nothing has 
happened since my previous mail. The schedule still stands.

-- 

  / daniel.haxx.se
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Wed Mar 30 01:37:10 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2TNagel027440;
	Wed, 30 Mar 2011 01:37:04 +0200
Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com
	[209.85.216.175])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2TNaeHM027430
	(version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Wed, 30 Mar 2011 01:36:41 +0200
Received: by qyk35 with SMTP id 35so2653254qyk.20
	for <libssh2-devel@cool.haxx.se>; Tue, 29 Mar 2011 16:36:37 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:content-type;
	bh=7MCuh87vWwck/pwpS7ywh3TLmcWxjzjLqUqU1OsFhvM=;
	b=wu5QwG+EqS3MboATVA75M4ZJbpPepM2TWsFc6tac06N4IomfQJWXxQq/vJtxMpgI2d
	+ddABplHKzXyC0rmMhZamWMZhXG3bMqdLPMYQwgst1zb7gdsvoNYVInYgQiDjBjGaKxS
	gkvIqcwnuL4adskWWKNOaxSS2+J/lW9IEP+Uw=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:content-type;
	b=YfgSz6vZewXPAgOEt0ijpq+wIS0cqi2aG2HVIFybwfVsi07+llP6DbKVnuXv66Sau4
	m9xVacxsG7rYQEtZ1G/mjIEKMFVMCYlUV4veT7EtAfV4llMGTXSY0ZImN9p0qQb1bD6O
	+QKZwCzOQ7EwSW3N5el9gE2HvxVV25UQNshzw=
MIME-Version: 1.0
Received: by 10.229.126.129 with SMTP id c1mr458335qcs.6.1301441797493; Tue,
	29 Mar 2011 16:36:37 -0700 (PDT)
Received: by 10.229.127.15 with HTTP; Tue, 29 Mar 2011 16:36:37 -0700 (PDT)
In-Reply-To: <alpine.DEB.2.00.1103281447380.18622@tvnag.unkk.fr>
References: <alpine.DEB.2.00.1102141636180.14361@tvnag.unkk.fr>
	<alpine.DEB.2.00.1103281447380.18622@tvnag.unkk.fr>
Date: Wed, 30 Mar 2011 00:36:37 +0100
X-Google-Sender-Auth: 8pCJl5LmWO1-I9NM1HYrKkzhw5k
Message-ID: <AANLkTikJAtNY9BMvVXkg_2nM3k=TzDLUrJgk6H6epy=Q@mail.gmail.com>
Subject: Re: Release time on April 5
From: Alexander Lamaison <swish@lammy.co.uk>
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Wed, 30 Mar 2011 01:37:10 +0200 (CEST)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]);
	Wed, 30 Mar 2011 01:36:41 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: libssh2-devel-bounces@cool.haxx.se
Sender: libssh2-devel-bounces@cool.haxx.se

On 28 March 2011 13:48, Daniel Stenberg <daniel@haxx.se> wrote:
> On Thu, 10 Mar 2011, Daniel Stenberg wrote:
>
>> Barring no new major problems appear, I have my eyes fixed on April 5th as
>> a release date for version 1.2.8. That's almost a month from now.
>
> Just a reminder. We're now about a week from release and basically nothing
> has happened since my previous mail. The schedule still stands.

The current git head doesn't deal with SFTP write errors (see line
1681 of sftp.c [1]).  They are ignored and treated as success.  We'll
have to fix this before the next release.  Unfortunately, I'm not very
familiar with the code in that area.

[1] http://git.libssh2.org/?p=libssh2.git;a=blob;f=src/sftp.c;h=7feae32fe17dd85297d3aabc9c767588f2e6bca1;hb=HEAD;js=1#l1681

Alex

--
Swish - Easy SFTP for Windows Explorer (http://www.swish-sftp.org)
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Wed Mar 30 11:37:20 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2U9awSA007291;
	Wed, 30 Mar 2011 11:37:17 +0200
Received: from giant.haxx.se (giant.haxx.se [80.67.6.50])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2U9avcC007281
	for <libssh2-devel@cool.haxx.se>; Wed, 30 Mar 2011 11:36:57 +0200
Date: Wed, 30 Mar 2011 11:36:57 +0200 (CEST)
From: Daniel Stenberg <daniel@haxx.se>
X-X-Sender: dast@giant.haxx.se
To: libssh2 development <libssh2-devel@cool.haxx.se>
Subject: Re: Release time on April 5
In-Reply-To: <AANLkTikJAtNY9BMvVXkg_2nM3k=TzDLUrJgk6H6epy=Q@mail.gmail.com>
Message-ID: <alpine.DEB.2.00.1103301136320.18883@tvnag.unkk.fr>
References: <alpine.DEB.2.00.1102141636180.14361@tvnag.unkk.fr>
	<alpine.DEB.2.00.1103281447380.18622@tvnag.unkk.fr>
	<AANLkTikJAtNY9BMvVXkg_2nM3k=TzDLUrJgk6H6epy=Q@mail.gmail.com>
User-Agent: Alpine 2.00 (DEB 1167 2008-08-23)
X-fromdanielhimself: yes
MIME-Version: 1.0
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Wed, 30 Mar 2011 11:37:20 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]);
	Wed, 30 Mar 2011 11:36:57 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Errors-To: libssh2-devel-bounces@cool.haxx.se
Sender: libssh2-devel-bounces@cool.haxx.se

On Wed, 30 Mar 2011, Alexander Lamaison wrote:

> The current git head doesn't deal with SFTP write errors (see line 1681 of 
> sftp.c [1]).  They are ignored and treated as success.  We'll have to fix 
> this before the next release.

Ah, thanks for the reminder. I've just pushed a fix...

-- 

  / daniel.haxx.se
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Wed Mar 30 14:02:11 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2UC1s1O023496;
	Wed, 30 Mar 2011 14:02:09 +0200
Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com
	[209.85.216.175])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2UC1pSH023399
	(version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Wed, 30 Mar 2011 14:01:52 +0200
Received: by qyk35 with SMTP id 35so2975739qyk.20
	for <libssh2-devel@cool.haxx.se>; Wed, 30 Mar 2011 05:01:48 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:content-type
	:content-transfer-encoding;
	bh=Hby9FfiTI9847xZJokAqgLKE5v0lftxwIZLK+bafo8E=;
	b=lkOGUFWDawQLf9e0a3kTS6dq3/852aS5Ea11xR5S2DvbcTWEcsqT4ZGxG36EeWoC7V
	MGd4xbCi9vGFpZcj81nvuSfoTV5jPoE/I9CWMbgc7evDRjAnhT/v8q9f8JKD+by7wqBs
	BHLUAJK0ymRZkdKeGFH+qV4aROqhT2BOkfZeY=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:content-type
	:content-transfer-encoding;
	b=wdDGYFdG3ny53X3NfDOv2wN8Jfb4vQFT0g6pbi4O3JLYZ2tF1BgTbMLa47VCJIOipk
	nVAa+Epw2yUJ2MTkJYpMmN3gthKg9FN+zz2kcR8WAlJ3Yk5NwQnQNQLSR0K7mFrXuT4x
	nJfhv6wtBh7QLLqZXcUgQlx9yS0m/NqDrNoYU=
MIME-Version: 1.0
Received: by 10.229.102.165 with SMTP id g37mr892048qco.120.1301486508500;
	Wed, 30 Mar 2011 05:01:48 -0700 (PDT)
Received: by 10.229.127.15 with HTTP; Wed, 30 Mar 2011 05:01:48 -0700 (PDT)
In-Reply-To: <alpine.DEB.2.00.1103301136320.18883@tvnag.unkk.fr>
References: <alpine.DEB.2.00.1102141636180.14361@tvnag.unkk.fr>
	<alpine.DEB.2.00.1103281447380.18622@tvnag.unkk.fr>
	<AANLkTikJAtNY9BMvVXkg_2nM3k=TzDLUrJgk6H6epy=Q@mail.gmail.com>
	<alpine.DEB.2.00.1103301136320.18883@tvnag.unkk.fr>
Date: Wed, 30 Mar 2011 13:01:48 +0100
X-Google-Sender-Auth: UGcY8OqNiOl7cnv0MnEkzBfrzxA
Message-ID: <AANLkTik4_467cZE4f9HWrw0cDyc6dMpHMmc7V7o-8fnH@mail.gmail.com>
Subject: Re: Release time on April 5
From: Alexander Lamaison <swish@lammy.co.uk>
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Wed, 30 Mar 2011 14:02:11 +0200 (CEST)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]);
	Wed, 30 Mar 2011 14:01:53 +0200 (CEST)
X-MIME-Autoconverted: from quoted-printable to 8bit by giant.haxx.se id
	p2UC1pSH023399
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="iso-8859-1"
Errors-To: libssh2-devel-bounces@cool.haxx.se
Sender: libssh2-devel-bounces@cool.haxx.se
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by giant.haxx.se id p2UC1s1O023496

On 30 March 2011 10:36, Daniel Stenberg <daniel@haxx.se> wrote:
> On Wed, 30 Mar 2011, Alexander Lamaison wrote:
>
>> The current git head doesn't deal with SFTP write errors (see line 1681 of
>> sftp.c [1]).  They are ignored and treated as success.  We'll have to fix
>> this before the next release.
>
> Ah, thanks for the reminder. I've just pushed a fix...

Thanks Daniel.  I can confirm your fix solves the problem.

I still have one failing test that excercises 'large' writes.  It
tries to write 1,000,000 bytes to the target but only manages to write
something between 30,000 and 100,000 bytes.  If I step through it
using the debugger it works fine so it's probably related to network
timing.  I believe the problem affects reading too.

I'll try to put together a self-contained test-case that reproduces the problem.

Alex

P.S. Testing done on Windows 7 x64

--
Swish - Easy SFTP for Windows Explorer (http://www.swish-sftp.org)

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Wed Mar 30 15:16:01 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2UDFc4V003114;
	Wed, 30 Mar 2011 15:15:57 +0200
Received: from foo.stuge.se (qmailr@foo.stuge.se [213.88.146.6])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with SMTP id p2UDFaMl003098
	for <libssh2-devel@cool.haxx.se>; Wed, 30 Mar 2011 15:15:36 +0200
Received: (qmail 20003 invoked by uid 501); 30 Mar 2011 13:15:39 -0000
Message-ID: <20110330131539.20002.qmail@stuge.se>
Date: Wed, 30 Mar 2011 15:15:39 +0200
From: Peter Stuge <peter@stuge.se>
To: libssh2-devel@cool.haxx.se
Subject: Re: Large write problem [was: Release time on April 5]
Mail-Followup-To: libssh2-devel@cool.haxx.se
References: <alpine.DEB.2.00.1102141636180.14361@tvnag.unkk.fr>
	<alpine.DEB.2.00.1103281447380.18622@tvnag.unkk.fr>
	<AANLkTikJAtNY9BMvVXkg_2nM3k=TzDLUrJgk6H6epy=Q@mail.gmail.com>
	<alpine.DEB.2.00.1103301136320.18883@tvnag.unkk.fr>
	<AANLkTik4_467cZE4f9HWrw0cDyc6dMpHMmc7V7o-8fnH@mail.gmail.com>
MIME-Version: 1.0
Content-Disposition: inline
In-Reply-To: <AANLkTik4_467cZE4f9HWrw0cDyc6dMpHMmc7V7o-8fnH@mail.gmail.com>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Wed, 30 Mar 2011 15:16:01 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]);
	Wed, 30 Mar 2011 15:15:36 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: libssh2-devel-bounces@cool.haxx.se
Sender: libssh2-devel-bounces@cool.haxx.se

Alexander Lamaison wrote:
> I still have one failing test that excercises 'large' writes.  It
> tries to write 1,000,000 bytes to the target but only manages to write
> something between 30,000 and 100,000 bytes.  If I step through it
> using the debugger it works fine so it's probably related to network
> timing.  I believe the problem affects reading too.
> 
> I'll try to put together a self-contained test-case that reproduces
> the problem.
..
> P.S. Testing done on Windows 7 x64

Please send a debug log with socket tracing enabled, or attach to a
ticket if there is one for this problem already. :)


//Peter
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Wed Mar 30 21:52:10 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2UJplaw016061;
	Wed, 30 Mar 2011 21:52:07 +0200
Received: from giant.haxx.se (giant.haxx.se [80.67.6.50])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2UJpk4U016050
	for <libssh2-devel@cool.haxx.se>; Wed, 30 Mar 2011 21:51:46 +0200
Date: Wed, 30 Mar 2011 21:51:46 +0200 (CEST)
From: Daniel Stenberg <daniel@haxx.se>
X-X-Sender: dast@giant.haxx.se
To: libssh2 development <libssh2-devel@cool.haxx.se>
Subject: Re: Release time on April 5
In-Reply-To: <AANLkTik4_467cZE4f9HWrw0cDyc6dMpHMmc7V7o-8fnH@mail.gmail.com>
Message-ID: <alpine.DEB.2.00.1103302144390.11056@tvnag.unkk.fr>
References: <alpine.DEB.2.00.1102141636180.14361@tvnag.unkk.fr>
	<alpine.DEB.2.00.1103281447380.18622@tvnag.unkk.fr>
	<AANLkTikJAtNY9BMvVXkg_2nM3k=TzDLUrJgk6H6epy=Q@mail.gmail.com>
	<alpine.DEB.2.00.1103301136320.18883@tvnag.unkk.fr>
	<AANLkTik4_467cZE4f9HWrw0cDyc6dMpHMmc7V7o-8fnH@mail.gmail.com>
User-Agent: Alpine 2.00 (DEB 1167 2008-08-23)
X-fromdanielhimself: yes
MIME-Version: 1.0
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Wed, 30 Mar 2011 21:52:10 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]);
	Wed, 30 Mar 2011 21:51:46 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Errors-To: libssh2-devel-bounces@cool.haxx.se
Sender: libssh2-devel-bounces@cool.haxx.se

On Wed, 30 Mar 2011, Alexander Lamaison wrote:

> P.S. Testing done on Windows 7 x64

Let me just mention that we in fact already have open reports on Windows that 
I've failed to repeat on Linux... I don't know if you experience the same 
problem or another one.

-- 

  / daniel.haxx.se
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Wed Mar 30 22:28:31 2011
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with ESMTP id p2UKSOd6003358;
	Wed, 30 Mar 2011 22:28:30 +0200
Received: from foo.stuge.se (qmailr@foo.stuge.se [213.88.146.6])
	by giant.haxx.se (8.14.4/8.14.4/Debian-2) with SMTP id p2UKSMxu003349
	for <libssh2-devel@cool.haxx.se>; Wed, 30 Mar 2011 22:28:22 +0200
Received: (qmail 10777 invoked by uid 501); 30 Mar 2011 20:28:26 -0000
Message-ID: <20110330202826.10776.qmail@stuge.se>
Date: Wed, 30 Mar 2011 22:28:26 +0200
From: Peter Stuge <peter@stuge.se>
To: libssh2-devel@cool.haxx.se
Subject: Re: Windows bugs [was: Release time on April 5]
Mail-Followup-To: libssh2-devel@cool.haxx.se
References: <alpine.DEB.2.00.1102141636180.14361@tvnag.unkk.fr>
	<alpine.DEB.2.00.1103281447380.18622@tvnag.unkk.fr>
	<AANLkTikJAtNY9BMvVXkg_2nM3k=TzDLUrJgk6H6epy=Q@mail.gmail.com>
	<alpine.DEB.2.00.1103301136320.18883@tvnag.unkk.fr>
	<AANLkTik4_467cZE4f9HWrw0cDyc6dMpHMmc7V7o-8fnH@mail.gmail.com>
	<alpine.DEB.2.00.1103302144390.11056@tvnag.unkk.fr>
MIME-Version: 1.0
Content-Disposition: inline
In-Reply-To: <alpine.DEB.2.00.1103302144390.11056@tvnag.unkk.fr>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.8 (giant.haxx.se [127.0.0.1]); Wed, 30 Mar 2011 22:28:31 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.8
	(giant.haxx.se [80.67.6.50]);
	Wed, 30 Mar 2011 22:28:22 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: libssh2-devel-bounces@cool.haxx.se
Sender: libssh2-devel-bounces@cool.haxx.se

Daniel Stenberg wrote:
>> P.S. Testing done on Windows 7 x64
>
> Let me just mention that we in fact already have open reports on
> Windows that I've failed to repeat on Linux...

Yes. I think that those problems are actually platform specific, so a
Windows system is actually needed to dig down into the debugging.

Would be great to get more debug output from Windows systems showing
the various problems.


//Peter
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

