Subject: pkg/30667: [PATCH] net/gftp specifies ssh command line arguments in wrong order
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <ghen@telenet.be>
List: pkgsrc-bugs
Date: 07/05/2005 08:54:00
>Number:         30667
>Category:       pkg
>Synopsis:       [PATCH] net/gftp specifies ssh command line arguments in wrong order
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jul 05 08:54:00 +0000 2005
>Originator:     Geert Hendrickx
>Release:        
>Organization:
>Environment:
>Description:
net/gftp (a GUI ftp client) cannot use the ssh/sftp protocol on NetBSD because it specifies the ssh command line argument in an incorrent order (which, apparently, is acceptable on Linux, but not on most other UNIXen).  
>How-To-Repeat:
Run net/gftp (in X), select SSH2 as the protocol, try to connect to any host, and see it hang on the command "ssh ... hostname -s sftp".  This should be "ssh ... -s hostname sftp".  
>Fix:
Proposed net/gftp/patches/patch-af: 

$NetBSD$

--- lib/sshv2.c.orig    2005-07-05 10:30:54.000000000 +0200
+++ lib/sshv2.c 2005-07-05 10:31:04.000000000 +0200
@@ -292,7 +292,7 @@
                        " -p %d", request->port);
 
   sshv2_add_exec_args (&logstr, &logstr_len, &args, &args_len, &args_cur,
-                       " %s -s sftp", request->hostname);
+                       " -s %s sftp", request->hostname);
 
   request->logging_function (gftp_logging_misc, request, 
                              _("Running program %s\n"), logstr);