From matthew@stingray.adestra.com  Wed Feb 19 10:53:33 2014
Return-Path: <matthew@stingray.adestra.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id C10D72E4
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 19 Feb 2014 10:53:33 +0000 (UTC)
Received: from stingray.adestra.com (stingray.adestra.com [46.236.37.190])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 64CD31776
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 19 Feb 2014 10:53:33 +0000 (UTC)
Received: from stingray.adestra.com (localhost [127.0.0.1])
	by stingray.adestra.com (8.14.7/8.14.7) with ESMTP id s1JAR6F0072570
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 19 Feb 2014 10:27:06 GMT
	(envelope-from matthew@stingray.adestra.com)
Received: (from matthew@localhost)
	by stingray.adestra.com (8.14.7/8.14.7/Submit) id s1JAR1u2072504;
	Wed, 19 Feb 2014 10:27:01 GMT
	(envelope-from matthew)
Message-Id: <201402191027.s1JAR1u2072504@stingray.adestra.com>
Date: Wed, 19 Feb 2014 10:27:01 GMT
From: Matthew Seaman <matthew@FreeBSD.org>
Reply-To: Matthew Seaman <matthew@FreeBSD.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: ftp/proftpd -- fix for inoperative scp mode
X-Send-Pr-Version: 3.114
X-GNATS-Notify:

>Number:         186889
>Category:       ports
>Synopsis:       ftp/proftpd -- fix for inoperative scp mode
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    mm
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb 19 11:00:00 UTC 2014
>Closed-Date:    
>Last-Modified:  Wed Feb 19 18:16:51 UTC 2014
>Originator:     Matthew Seaman
>Release:        FreeBSD 9.2-RELEASE-p3 amd64
>Organization:
Adestra Ltd
>Environment:
System: FreeBSD stingray.adestra.com 9.2-RELEASE-p3 FreeBSD 9.2-RELEASE-p3 #0: Sat Jan 11 03:25:02 UTC 2014 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64


	
>Description:

We had some customer complaints that any attempt to download a file
via SCP, while apparently successful, resulted in a zero length file
locally.

This patch fixes the problem.  It is derived from the proftpd
bugzilla:

http://bugs.proftpd.org/show_bug.cgi?id=3954

>How-To-Repeat:
	
>Fix:

	

--- proftpd.diff begins here ---
Index: files/patch-contrib_mod__sftp_scp.c
===================================================================
--- files/patch-contrib_mod__sftp_scp.c	(revision 0)
+++ files/patch-contrib_mod__sftp_scp.c	(working copy)
@@ -0,0 +1,20 @@
+
+$FreeBSD$
+
+--- contrib/mod_sftp/scp.c.orig
++++ contrib/mod_sftp/scp.c
+@@ -2077,10 +2077,11 @@
+      * want to return 1 here, since it will be us, not the client, which needs
+      * to close the connection.
+      */
+-    if (paths[scp_session->path_idx-1]->wrote_errors == TRUE) {
+-      return 1;
++    if (res == 1) {
++      if (paths[scp_session->path_idx-1]->wrote_errors == TRUE) {
++        return 1;
++      }
+     }
+-
+     return 0;
+ 
+   } else if (scp_opts & SFTP_SCP_OPT_ISDST) {

Property changes on: files/patch-contrib_mod__sftp_scp.c
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: fbsd:nokeywords
## -0,0 +1 ##
+yes
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
--- proftpd.diff ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->mm 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Wed Feb 19 11:00:09 UTC 2014 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=186889 
>Unformatted:
