From: Jeremy Allison Date: Thu, 21 Apr 2005 07:57:52 +0000 (+0000) Subject: r6417: Strange old IRIX systems return -1 for telldir() when X-Git-Tag: samba-misc-tags/initial-v3-0-unstable~4919 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a60fe9aba16eac4f195a2359d8b7672d8c8aa240;p=thirdparty%2Fsamba.git r6417: Strange old IRIX systems return -1 for telldir() when end of directory reached. Don't check for that and bail when reading directory entries as it's a valid value. Excellent work from Cale Fairchild tracked this down. Jeremy. --- diff --git a/source/smbd/dir.c b/source/smbd/dir.c index 0f32dddd2d7..054588b25e6 100644 --- a/source/smbd/dir.c +++ b/source/smbd/dir.c @@ -1038,11 +1038,7 @@ const char *ReadDirName(struct smb_Dir *dirp, long *poffset) while ((n = vfs_readdirname(conn, dirp->dir))) { struct name_cache_entry *e; dirp->offset = SMB_VFS_TELLDIR(conn, dirp->dir); - if (dirp->offset == -1) { - return NULL; - } dirp->name_cache_index = (dirp->name_cache_index+1) % NAME_CACHE_SIZE; - e = &dirp->name_cache[dirp->name_cache_index]; SAFE_FREE(e->name); e->name = SMB_STRDUP(n);