NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/50564: sftp: filename completion is broken



>Number:         50564
>Category:       bin
>Synopsis:       sftp: filename completion is broken
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 16 09:00:00 +0000 2015
>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++) {



Home | Main Index | Thread Index | Old Index