diff options
author | Jeremy Allison <jra@samba.org> | 2005-04-01 19:57:22 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:56:26 -0500 |
commit | 8d2e18ac539455055b23bcbd72434e76ec46a1ce (patch) | |
tree | 1db871ecda4dfe4137c41244b8a5dd263509e1d3 /source3/smbd | |
parent | dee553bdb1dc98b6fc4e97ecbad5f9254928ff3f (diff) | |
download | samba-8d2e18ac539455055b23bcbd72434e76ec46a1ce.tar.gz samba-8d2e18ac539455055b23bcbd72434e76ec46a1ce.tar.bz2 samba-8d2e18ac539455055b23bcbd72434e76ec46a1ce.zip |
r6169: Fix bug #2563. Infinite loop on non-existant file with findnext.
Jeremy
(This used to be commit 065ab9182dc39557b8c26d3d110abe9963ad9568)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/dir.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c index 55f1523865..27ec003fb8 100644 --- a/source3/smbd/dir.c +++ b/source3/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; } |