svn commit: samba r5923 - in trunk/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: 5923
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=5923
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:
trunk/source/smbd/dir.c
Changeset:
Modified: trunk/source/smbd/dir.c
===================================================================
--- trunk/source/smbd/dir.c 2005-03-21 18:10:21 UTC (rev 5922)
+++ trunk/source/smbd/dir.c 2005-03-21 18:10:21 UTC (rev 5923)
@@ -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