Bugzilla – Attachment 320 Details for
Bug 581
SFTP "ls" listings never end
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fixes the problem
sftp-server-patch.txt (text/plain), 1.42 KB, created by
Lawrence D'Oliveiro
on 2003-06-04 17:11:53 AEST
(
hide
)
Description:
Fixes the problem
Filename:
MIME Type:
Creator:
Lawrence D'Oliveiro
Created:
2003-06-04 17:11:53 AEST
Size:
1.42 KB
patch
obsolete
>--- sftp-server.c 2003-05-30 15:20:37.000000000 +1200 >+++ sftp-server.c-prev 2003-03-26 17:01:11.000000000 +1200 >@@ -21,15 +21,6 @@ > * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF > * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > */ >- >-/* >- Modified 2003 May 30 by Lawrence D'Oliveiro, ldo@geek-central.gen.nz: >- quick hack to get around problem doing directory listings on >- NFS-mounted volumes under Tru64 UNIX 5.1 where, after readdir >- returns NULL to indicate the end of the listing, if it is called >- again, it starts returning the directory listing from the >- beginning. >-*/ > #include "includes.h" > RCSID("$OpenBSD: sftp-server.c,v 1.41 2003/03/26 04:02:51 deraadt Exp $"); > >@@ -138,7 +129,6 @@ > DIR *dirp; > int fd; > char *name; >- int EndReached; /* LDO */ > }; > > enum { >@@ -697,7 +687,6 @@ > if (handle < 0) { > closedir(dirp); > } else { >- handles[handle].EndReached = 0; /* LDO */ > send_handle(id, handle); > status = SSH2_FX_OK; > } >@@ -731,16 +720,7 @@ > int nstats = 10, count = 0, i; > > stats = xmalloc(nstats * sizeof(Stat)); >- for (;;) /* LDO */ >- { >- if (handles[handle].EndReached) >- break; >- dp = readdir(dirp); >- if (dp == NULL) >- { >- handles[handle].EndReached = 1; >- break; >- } /*if*/ >+ while ((dp = readdir(dirp)) != NULL) { > if (count >= nstats) { > nstats *= 2; > stats = xrealloc(stats, nstats * sizeof(Stat));
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 581
:
319
| 320