Calling fdopendir with a file descriptor obtained with O_PATH yields a bad directory stream descriptor (as it should, if I understood correctly the documentation of open() re O_PATH). However, the call doesn't fail (it should fail with EBADF). A subsequent call to readdir (3) detects the error. (the problem also occurs with glibc, besides the fact that glibc requires also _GNU_SOURCE to compile, contradicting the linux man page) Am I missing something? (Complete test program in attachement, so that Gmail doesn't crap it.) Thanks, Jorge Almeida