NetBSD Problem Report #50564

From www@NetBSD.org  Wed Dec 16 08:58:57 2015
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.NetBSD.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 5FD217ACA0
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 16 Dec 2015 08:58:57 +0000 (UTC)
Message-Id: <20151216085856.66E7D7ACC9@mollari.NetBSD.org>
Date: Wed, 16 Dec 2015 08:58:56 +0000 (UTC)
From: okuyama@flex.phys.tohoku.ac.jp
Reply-To: okuyama@flex.phys.tohoku.ac.jp
To: gnats-bugs@NetBSD.org
Subject: sftp: filename completion is broken
X-Send-Pr-Version: www-1.0

>Number:         50564
>Category:       bin
>Synopsis:       sftp: filename completion is broken
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 16 09:00:00 +0000 2015
>Closed-Date:    Wed Dec 16 13:28:14 +0000 2015
>Last-Modified:  Tue Jan 26 01:35:00 +0000 2016
>Originator:     Rin Okuyama
>Release:        7.99.23
>Organization:
Department of Physics, Tohoku University
>Environment:
NetBSD XXX 7.99.23 NetBSD 7.99.23 (GENERIC) #0: Sat Dec  5 13:16:36 JST 2015  root@XXX:XXX amd64
>Description:
Filename completion for remote files is not working with sftp.
>How-To-Repeat:
Establish a sftp session to somewhere (other than localhost), then
you can see filename completion is not working for remote files.
>Fix:
Logic for completion against remote files seems to be broken when
applying our local patches. See around line 1845 of diffs between
sftp.c from OpenSSH 7.1 and ours:

  http://cvsweb.netbsd.org/bsdweb.cgi/src/crypto/external/bsd/openssh/dist/sftp.c.diff?r1=1.1.1.10&r2=1.16&f=h

--- src/crypto/external/bsd/openssh/dist/sftp.c.orig	2015-12-16 08:03:21.000000000 +0900
+++ src/crypto/external/bsd/openssh/dist/sftp.c	2015-12-16 08:04:28.000000000 +0900
@@ -1845,8 +1845,8 @@
 	if (remote != LOCAL) {
 		tmp = make_absolute(tmp, remote_path);
 		remote_glob(conn, tmp, GLOB_DOOFFS|GLOB_MARK, NULL, &g);
+	} else
 		glob(tmp, GLOB_LIMIT|GLOB_DOOFFS|GLOB_MARK, NULL, &g);
-	}

 	/* Determine length of pwd so we can trim completion display */
 	for (hadglob = tmplen = pwdlen = 0; tmp[tmplen] != 0; tmplen++) {

>Release-Note:

>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/50564 CVS commit: src/crypto/external/bsd/openssh/dist
Date: Wed, 16 Dec 2015 08:23:38 -0500

 Module Name:	src
 Committed By:	christos
 Date:		Wed Dec 16 13:23:38 UTC 2015

 Modified Files:
 	src/crypto/external/bsd/openssh/dist: sftp.c

 Log Message:
 PR/50564: Rin Okuyama: sftp: filename completion is broken


 To generate a diff of this commit:
 cvs rdiff -u -r1.16 -r1.17 src/crypto/external/bsd/openssh/dist/sftp.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Wed, 16 Dec 2015 13:28:14 +0000
State-Changed-Why:
christos fixed it. Thanks!


From: Rin Okuyama <okuyama@flex.phys.tohoku.ac.jp>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: bin/50564 (sftp: filename completion is broken)
Date: Thu, 17 Dec 2015 00:29:07 +0900

 fix confirmed. thank you!

From: "Jeff Rizzo" <riz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/50564 CVS commit: [netbsd-7] src/crypto/external/bsd/openssh/dist
Date: Tue, 26 Jan 2016 01:29:36 +0000

 Module Name:	src
 Committed By:	riz
 Date:		Tue Jan 26 01:29:35 UTC 2016

 Modified Files:
 	src/crypto/external/bsd/openssh/dist [netbsd-7]: sftp.c

 Log Message:
 Pull up following revision(s) (requested by snj in ticket #1066):
 	crypto/external/bsd/openssh/dist/sftp.c: revision 1.17
 PR/50564: Rin Okuyama: sftp: filename completion is broken


 To generate a diff of this commit:
 cvs rdiff -u -r1.12.4.1 -r1.12.4.2 \
     src/crypto/external/bsd/openssh/dist/sftp.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Jeff Rizzo" <riz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/50564 CVS commit: [netbsd-7-0] src/crypto/external/bsd/openssh/dist
Date: Tue, 26 Jan 2016 01:30:41 +0000

 Module Name:	src
 Committed By:	riz
 Date:		Tue Jan 26 01:30:41 UTC 2016

 Modified Files:
 	src/crypto/external/bsd/openssh/dist [netbsd-7-0]: sftp.c

 Log Message:
 Pull up following revision(s) (requested by snj in ticket #1066):
 	crypto/external/bsd/openssh/dist/sftp.c: revision 1.17
 PR/50564: Rin Okuyama: sftp: filename completion is broken


 To generate a diff of this commit:
 cvs rdiff -u -r1.12.4.1 -r1.12.4.1.2.1 \
     src/crypto/external/bsd/openssh/dist/sftp.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.