History log of /netbsd/lib/libc/gen/opendir.c (Results 1 – 25 of 40)
Revision Date Author Comments
# ca04a629 26-Nov-2014 christos <christos@NetBSD.org>

- Use O_DIRECTORY to open the file, so that we don't need to stat() after
that.
- Move the stat() call to fdopendir() and change it's error handling so that
it does not hide errors.
- According t

- Use O_DIRECTORY to open the file, so that we don't need to stat() after
that.
- Move the stat() call to fdopendir() and change it's error handling so that
it does not hide errors.
- According to POSIX, fdopendir() transfers ownership of the fd only on
success, so don't close it on failure. XXX: We still make it non-blocking
on failure, but that's nitpicking.

XXX: pullup-7?

show more ...


# 7c24c648 15-Oct-2011 christos <christos@NetBSD.org>

close on exec fixes:
- open + fcntl -> open O_CLOEXEC
- configuration database file descriptors that can stay open are now opened
fopen(db, "re")


# ab5972b0 26-Sep-2010 yamt <yamt@NetBSD.org>

fix rewinddir on nfs. fix PR/42879 (and probably PR/40229.)


# 53cf9ce3 16-Sep-2010 yamt <yamt@NetBSD.org>

- remove a wrong _DIAGASSERT
- update comments
- whitespace


# 461a86f9 11-Jan-2009 christos <christos@NetBSD.org>

merge christos-time_t


# 117c67b2 05-Dec-2008 ad <ad@NetBSD.org>

Add fdopendir(), from Solaris/Linux.


# e7f75b7d 10-Jan-2008 elad <elad@NetBSD.org>

PR/35562: khorben at defora dot org: Potential denial of service when
listing files on an NFS share

Limit the number of retries as suggested in the PR.

Reviewed by and okay fvdl@.


# fede0a77 17-Jul-2007 christos <christos@NetBSD.org>

kill MFSNAMELEN


# cfd3aebc 17-May-2006 christos <christos@NetBSD.org>

PR/24324: Arne H Juul: Re-implement seekdir/telldir using a pointer of
locations per directory instead of a global hash table to avoid memory
leak issues, and incorrect results.


# b72acd51 24-Jan-2006 christos <christos@NetBSD.org>

rename __func to _func_unlocked, and add their prototypes in extern.h
instead of exposing them in dirent.h. More locking consistency fixes.


# 28463c62 24-Jan-2006 christos <christos@NetBSD.org>

PR/32609: Tanaka Akira: seekdir blocks if pthread is linked
Do locking consistently to avoid recursive locks (like the bug reported in
this pr), and to avoid leaking locks on errors.


# 5b84b398 13-Sep-2005 christos <christos@NetBSD.org>

compat core reorg.


# 33037645 19-Aug-2005 christos <christos@NetBSD.org>

64 bit inode changes


# ffa0d5e7 19-Jan-2005 mycroft <mycroft@NetBSD.org>

Also set FD_CLOEXEC in the union re-open case.


# 6bd1d6d4 21-Apr-2004 christos <christos@NetBSD.org>

Replace the statfs() family of system calls with statvfs().
Retain binary compatibility.


# eb7c1594 07-Aug-2003 agc <agc@NetBSD.org>

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.


# 4ee0df68 29-May-2003 nathanw <nathanw@NetBSD.org>

Allocate and initialize dirp->dd_lock before calling telldir(), which
will try to lock it.

Addresses PR lib/21712.


# 9af71357 28-May-2003 christos <christos@NetBSD.org>

add mutex locking for directories and readdir_r(3). Influenced by FreeBSD.


# eafd20b3 02-Mar-2003 enami <enami@NetBSD.org>

Fix realloc usage.


# 60549036 22-Jan-2000 mycroft <mycroft@NetBSD.org>

Delint.
Remove trailing ; from uses of __weak_alias(). The macro inserts this if
needed.


# d8962612 20-Sep-1999 lukem <lukem@NetBSD.org>

back out the #ifdef _DIAGNOSTIC argument checks; too many people complained.
_DIAGASSERT() is still retained.


# b48252f3 16-Sep-1999 lukem <lukem@NetBSD.org>

* use _DIAGASSERT() to check pointer arguments against NULL and file
descriptors against -1 (as appropriate).
* add actual checks which to detect stuff that would trigger_DIAGASSERT(),
and attemp

* use _DIAGASSERT() to check pointer arguments against NULL and file
descriptors against -1 (as appropriate).
* add actual checks which to detect stuff that would trigger_DIAGASSERT(),
and attempt to return a sane error condition.
* knf some code
* remove some `register' decls.

the first two items result in the addition of code similar to the
following in various functions:

_DIAGASSERT(path != NULL)
#ifdef _DIAGNOSTIC
if (path == NULL) {
errno = EFAULT;
return (-1);
}
#endif

show more ...


# d6f53054 13-Nov-1998 christos <christos@NetBSD.org>

delint


# 5f05b863 27-Feb-1998 perry <perry@NetBSD.org>

trivial changes to quiet lint.


# b57ab4df 10-Oct-1997 fvdl <fvdl@NetBSD.org>

Use getdents(). Read NFS directories in one go (just as union dirs, but
without removing double entries). This makes sure that we get a
consistent snapshot of the directory, and protects against any

Use getdents(). Read NFS directories in one go (just as union dirs, but
without removing double entries). This makes sure that we get a
consistent snapshot of the directory, and protects against any
'bad cookie' errors.

show more ...


12