Hash :
93785052
Author :
Date :
2010-09-14T09:03:55
fts, getcwd, glob: audit for dirfd returning -1 * lib/fts.c (opendir): Remove #define; no longer used. (opendirat): New arg PDIR_FD. All callers changed. (fts_build, _opendir2): Use new opendirat to avoid the need for dirfd, or for checking whether dirfd returns a negative value. Don't use opendir; always use openat followed by fdopendir. * lib/getcwd.c (__getcwd): Don't reset fd; fdopendir no longer clobbers it. * lib/glob.c (link_exists_p): Add comment explaining why dirfd never returns -1 here. * modules/fts (Depends-on): Remove dirfd. * modules/getcwd (Depends-on): Likewise.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
Description:
Traverse a file hierarchy.
Files:
lib/fts_.h
lib/fts.c
lib/fts-cycle.c
m4/fts.m4
Depends-on:
cloexec
cycle-check
d-ino
d-type
dirent-safer
fchdir
fcntl-h
fcntl-safer
hash
i-ring
lstat
memmove
openat-safer
stdbool
unistd-safer
configure.ac:
gl_FUNC_FTS
Makefile.am:
Include:
"fts_.h"
License:
GPL
Maintainer:
Jim Meyering