I built Samba 3.0.25a on FreeBSD/amd64 using the FreeBSD ports. I configured it with a similar config I used on my old machine. I accessed it remotely and it caused a crash when viewing some directories. The crash occurs at lib/replace/repdir_getdirentries.c line 135 (abort()): long telldir(DIR *dir) #endif { struct dir_buf *d = (struct dir_buf *)dir; if (d->ofs >= d->nbytes) { d->seekpos = lseek(d->fd, 0, SEEK_CUR); d->ofs = 0; d->nbytes = 0; } /* this relies on seekpos always being a multiple of DIR_BUF_SIZE. Is that always true on BSD systems? */ if (d->seekpos & (DIR_BUF_SIZE-1)) { abort(); } return d->seekpos + d->ofs; } the value of d->seekpos is 496 while DIR_BUF_SIZE is 512. The directory in question is on an ext2fs partition that I mounted into FreeBSD (note: this filesystem type is not often used in BSD). I can provide more information if necessary. I can readily reproduce the issue and have smbd built with debugging symbols and debug support and can easily attach gdb and perform more tests. (newsham@lava.net).
*** This bug has been marked as a duplicate of 4715 ***
I tested os2_delete.c on FreeBSD/amd64 6.2-stable (updated 8/2/2007) and FreeBSD/x86 6.2-release and both still fail the test.