summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2011-09-22 21:43:06 +1000
committerDamien Miller <djm@mindrot.org>2011-09-22 21:43:06 +1000
commitd7be70d0524abbc37861af61a75f576d7f82d93b (patch)
treef70fa223519b569f0ecc9ff16c7fc175cedeca99
parent57c38ac7d5e81c9fa6643ec8a3ed08c0c96bde64 (diff)
- djm@cvs.openbsd.org 2011/09/22 06:29:03
[sftp.c] don't let remote_glob() implicitly sort its results in do_globbed_ls() - in all likelihood, they will be resorted anyway
-rw-r--r--ChangeLog4
-rw-r--r--sftp.c5
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index da930653..60622d96 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -70,6 +70,10 @@
- markus@cvs.openbsd.org 2011/09/12 08:46:15
[sftp-client.c]
fix leak in do_lsreaddir(); ok djm
+ - djm@cvs.openbsd.org 2011/09/22 06:29:03
+ [sftp.c]
+ don't let remote_glob() implicitly sort its results in do_globbed_ls() -
+ in all likelihood, they will be resorted anyway
20110909
- (dtucker) [entropy.h] Bug #1932: remove old definition of init_rng. From
diff --git a/sftp.c b/sftp.c
index ab667f5a..5c03f89d 100644
--- a/sftp.c
+++ b/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.133 2011/09/22 06:29:03 djm Exp $ */
/*
* Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
*
@@ -793,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);