projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add the names of major contributors to the copyright statement. I've
[u/mdw/putty]
/
psftp.c
diff --git
a/psftp.c
b/psftp.c
index
3a50c25
..
fead5c7
100644
(file)
--- a/
psftp.c
+++ b/
psftp.c
@@
-1409,7
+1409,7
@@
int main(int argc, char *argv[])
int modeflags = 0;
char *batchfile = NULL;
int modeflags = 0;
char *batchfile = NULL;
- flags = FLAG_STDERR;
+ flags = FLAG_STDERR
| FLAG_INTERACTIVE
;
ssh_get_line = &get_line;
init_winsock();
sk_init();
ssh_get_line = &get_line;
init_winsock();
sk_init();
@@
-1513,26
+1513,23
@@
int main(int argc, char *argv[])
* Set up fallback option, for SSH1 servers or servers with the
* sftp subsystem not enabled but the server binary installed
* in the usual place. We only support fallback on Unix
* Set up fallback option, for SSH1 servers or servers with the
* sftp subsystem not enabled but the server binary installed
* in the usual place. We only support fallback on Unix
- * systems, and we use the kludgy command string
+ * systems, and we use a kludgy piece of shellery which should
+ * try to find sftp-server in various places (the obvious
+ * systemwide spots /usr/lib and /usr/local/lib, and then the
+ * user's PATH) and finally give up.
*
*
- * if test ! -x /usr/lib/sftp-server -a -x /usr/local/lib/sftp-server
- * then
- * exec /usr/local/lib/sftp-server
- * else
- * exec /usr/lib/sftp-server
- * fi
+ * test -x /usr/lib/sftp-server && exec /usr/lib/sftp-server
+ * test -x /usr/local/lib/sftp-server && exec /usr/local/lib/sftp-server
+ * exec sftp-server
*
* the idea being that this will attempt to use either of the
* obvious pathnames and then give up, and when it does give up
* it will print the preferred pathname in the error messages.
*/
cfg.remote_cmd_ptr2 =
*
* the idea being that this will attempt to use either of the
* obvious pathnames and then give up, and when it does give up
* it will print the preferred pathname in the error messages.
*/
cfg.remote_cmd_ptr2 =
- "if test ! -x /usr/lib/sftp-server -a -x /usr/local/lib/sftp-server\n"
- "then\n"
- " exec /usr/local/lib/sftp-server\n"
- "else\n"
- " exec /usr/lib/sftp-server\n"
- "fi";
+ "test -x /usr/lib/sftp-server && exec /usr/lib/sftp-server\n"
+ "test -x /usr/local/lib/sftp-server && exec /usr/local/lib/sftp-server\n"
+ "exec sftp-server";
cfg.ssh_subsys2 = FALSE;
back = &ssh_backend;
cfg.ssh_subsys2 = FALSE;
back = &ssh_backend;