diff options
author | Jeremy Allison <jra@samba.org> | 2005-04-01 19:57:22 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2005-04-01 19:57:22 +0000 |
commit | 84f592162b9603b61fac3bf622c2ea54aacb25ff (patch) | |
tree | 233bd8dd1dc0dc1c1c3f300b7e448df46439b100 | |
parent | 245c71fa77ec0dc77252cbaefdc3aa849b8b7aad (diff) | |
download | samba-84f592162b9603b61fac3bf622c2ea54aacb25ff.tar.gz samba-84f592162b9603b61fac3bf622c2ea54aacb25ff.tar.xz samba-84f592162b9603b61fac3bf622c2ea54aacb25ff.zip |
r6169: Fix bug #2563. Infinite loop on non-existant file with findnext.
Jeremy
-rw-r--r-- | source/smbd/dir.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/smbd/dir.c b/source/smbd/dir.c index 55f15238652..27ec003fb8f 100644 --- a/source/smbd/dir.c +++ b/source/smbd/dir.c @@ -573,8 +573,6 @@ const char *dptr_ReadDirName(struct dptr_struct *dptr, long *poffset, SMB_STRUCT } } - dptr->has_wild = True; - /* In case sensitive mode we don't search - we know if it doesn't exist with a stat we will fail. */ @@ -584,6 +582,7 @@ const char *dptr_ReadDirName(struct dptr_struct *dptr, long *poffset, SMB_STRUCT dptr->dir_hnd->offset = *poffset = -1; return NULL; } else { + dptr->has_wild = True; return dptr_normal_ReadDirName(dptr, poffset, pst); } } @@ -602,7 +601,7 @@ BOOL dptr_SearchDir(struct dptr_struct *dptr, const char *name, long *poffset, S return False; } - while (SearchDir(dptr->dir_hnd, name, poffset) == True) { + if (SearchDir(dptr->dir_hnd, name, poffset)) { if (is_visible_file(dptr->conn, dptr->path, name, pst, True)) { return True; } |