Correct a bug in seekdir/readdir which could cause the directory entry
authorMatthew Dillon <dillon@dragonflybsd.org>
Sat, 3 May 2008 22:07:37 +0000 (22:07 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Sat, 3 May 2008 22:07:37 +0000 (22:07 +0000)
commit8276f8bcdceacb4a572533a0ffcbd87dd8e541c0
tree67f2db40ec57b3c091182c3e6bfeb550f8aedbed
parente8599db1ae18c0997db98e0ae59d5bd26d01a53c
Correct a bug in seekdir/readdir which could cause the directory entry
after a deleted entry to be skipped when seeking past the deleted entry.

NOTE: DragonFly has a specific issue even after this fix which currently
causes seekdirs to be unreliable if any files are deleted.  DragonFly
translates directory entries into a filesystem-independant form and if
the real filesystem collapses the entry, the offsets will not be maintained
in the machine-independant form.

Submitted-by: Marc Balmer <marc@msys.ch>
include/dirent.h
lib/libc/gen/readdir.c
lib/libc/gen/telldir.c