svn commit: samba r5922 - in branches/SAMBA_3_0/source/smbd: .

jra at samba.org jra at samba.org
Mon Mar 21 18:10:24 GMT 2005


Author: jra
Date: 2005-03-21 18:10:21 +0000 (Mon, 21 Mar 2005)
New Revision: 5922

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=5922

Log:
Fix for NASTY NASTY bug #2501. All my fault :-(. Brown paper bag time.
Stops Win98 from looping doing findnext on a singleton directory. More
testing very welcome.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/smbd/dir.c


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/dir.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/dir.c	2005-03-21 17:04:39 UTC (rev 5921)
+++ branches/SAMBA_3_0/source/smbd/dir.c	2005-03-21 18:10:21 UTC (rev 5922)
@@ -595,6 +595,13 @@
 BOOL dptr_SearchDir(struct dptr_struct *dptr, const char *name, long *poffset, SMB_STRUCT_STAT *pst)
 {
 	ZERO_STRUCTP(pst);
+
+	if (!dptr->has_wild && (dptr->dir_hnd->offset == -1)) {
+		/* This is a singleton directory and we're already at the end. */
+		*poffset = -1;
+		return False;
+	}
+
 	while (SearchDir(dptr->dir_hnd, name, poffset) == True) {
 		if (is_visible_file(dptr->conn, dptr->path, name, pst, True)) {
 			return True;



More information about the samba-cvs mailing list