HomeFreeBSD

libc/opendir: Improve behaviour of union uniquifier:

Description

libc/opendir: Improve behaviour of union uniquifier:

  • Reopen the directory using openat(fd, ".", ...) instead of opening the pathname again. This fixes a race condition where the meaning of the pathname changes and allows a reopen with fdopendir().
  • Always reopen the directory for union stacks, not only when DTF_REWIND is passed. Applications should be able to fchdir(dirfd(dir)) and *at(dirfd(dir), ...). DTF_REWIND now does nothing.

Details

Provenance
jillesAuthored on Feb 24 2013, 8:53 PM
Parents
rG3dfcb0da4b00: Catch up with internal API changes for initbarea() and getdatablk()
Branches
Unknown
Tags
Unknown

Event Timeline