summaryrefslogtreecommitdiffstats
path: root/crypto/openssh/sftp.c
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2012-09-03 16:51:41 +0000
committerdes <des@FreeBSD.org>2012-09-03 16:51:41 +0000
commit00f3582ac62b9883e85e2cb420c3d9f5d9028188 (patch)
treeeafe8a40bcffb53c6bb88d75ac823cdc99ac92fe /crypto/openssh/sftp.c
parentd00fafff0e6a902c30e2a606c69d740558908f1d (diff)
downloadFreeBSD-src-00f3582ac62b9883e85e2cb420c3d9f5d9028188.zip
FreeBSD-src-00f3582ac62b9883e85e2cb420c3d9f5d9028188.tar.gz
Upgrade OpenSSH to 6.1p1.
Diffstat (limited to 'crypto/openssh/sftp.c')
-rw-r--r--crypto/openssh/sftp.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/crypto/openssh/sftp.c b/crypto/openssh/sftp.c
index 0fb420a..20fb501 100644
--- a/crypto/openssh/sftp.c
+++ b/crypto/openssh/sftp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp.c,v 1.132 2010/12/04 00:18:01 djm Exp $ */
+/* $OpenBSD: sftp.c,v 1.136 2012/06/22 14:36:33 dtucker Exp $ */
/* $FreeBSD$ */
/*
* Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
@@ -784,7 +784,6 @@ static int
do_globbed_ls(struct sftp_conn *conn, char *path, char *strip_path,
int lflag)
{
- Attrib *a = NULL;
char *fname, *lname;
glob_t g;
int err;
@@ -794,7 +793,8 @@ do_globbed_ls(struct sftp_conn *conn, char *path, char *strip_path,
memset(&g, 0, sizeof(g));
if (remote_glob(conn, path,
- GLOB_MARK|GLOB_NOCHECK|GLOB_BRACE|GLOB_KEEPSTAT, NULL, &g) ||
+ GLOB_MARK|GLOB_NOCHECK|GLOB_BRACE|GLOB_KEEPSTAT|GLOB_NOSORT,
+ NULL, &g) ||
(g.gl_pathc && !g.gl_matchc)) {
if (g.gl_pathc)
globfree(&g);
@@ -829,7 +829,7 @@ do_globbed_ls(struct sftp_conn *conn, char *path, char *strip_path,
colspace = width / columns;
}
- for (i = 0; g.gl_pathv[i] && !interrupted; i++, a = NULL) {
+ for (i = 0; g.gl_pathv[i] && !interrupted; i++) {
fname = path_strip(g.gl_pathv[i], strip_path);
if (lflag & LS_LONG_VIEW) {
if (g.gl_statv[i] == NULL) {
@@ -1631,8 +1631,10 @@ complete_cmd_parse(EditLine *el, char *cmd, int lastarg, char quote,
}
list[count] = NULL;
- if (count == 0)
+ if (count == 0) {
+ xfree(list);
return 0;
+ }
/* Complete ambigious command */
tmp = complete_ambiguous(cmd, list, count);
@@ -1932,13 +1934,8 @@ interactive_loop(struct sftp_conn *conn, char *file1, char *file2)
xfree(dir);
}
-#if defined(HAVE_SETVBUF) && !defined(BROKEN_SETVBUF)
- setvbuf(stdout, NULL, _IOLBF, 0);
- setvbuf(infile, NULL, _IOLBF, 0);
-#else
setlinebuf(stdout);
setlinebuf(infile);
-#endif
interactive = !batchmode && isatty(STDIN_FILENO);
err = 0;
OpenPOWER on IntegriCloud