Files
tar/gnulib.modules
Paul Eggert 8da503cad6 tar: live within system-supplied limits on file descriptors
* NEWS: Note the change.  Mention dirfd and fdopendir.
* gnulib.modules: Add dirfd and fdopendir.  The code was already
using fdopendir; dirfd is a new need.
* src/common.h (open_searchdir_flags, get_directory_entries):
(subfile_open, restore_parent_fd, tar_stat_close): New decls.
(check_exclusion_tags): Adjust signature to match code change.
* src/create.c (IMPOSTOR_ERRNO): New constant.
(check_exclusion_tags): First arg is now a struct tar_stat_info
const *, not an fd.  All callers changed.
(dump_regular_file, dump_file0): A zero fd represents an unused
slot, so play it safe if the fd member is zero here.  A negative
fd represents the negation of an errno value, so play it safe and
do not assign -1 to fd merely because an open fails.
(open_failure_recover, get_directory_entries, restore_parent_fd):
(subfile_open): New functions.  These help to recover from file
descriptor exhaustion.
(dump_dir, dump_file0): Use them.
(dump_file0): Use tar_stat_close instead of rolling our own close.
* src/incremen.c (scan_directory): Use get_directory_entries,
subfile_open, etc., to recover from file descriptor exhaustion.
* src/names.c (add_hierarchy_to_namelist): Likewise.
(collect_and_sort_names): A negative fd represents the negation
of an errno value, so play it safe and do not assign -1 to fd.
* src/tar.c (decode_options): Set open_searchdir_flags.
Add O_CLOEXEC to all the open flags.
(tar_stat_close): New function, which knows how to deal with
new convention for directory streams and file descriptors.
Diagnose 'close' failures.
(tar_stat_destroy): Use it.
* src/tar.h (struct tar_stat_info): New member dirstream.
fd now has the negative of an errno value, not merely -1, if
the file could not be opened, so that failures to reopen directories
are better-diagnosed later.
* tests/Makefile.am (TESTSUITE_AT): Add extrac11.at.
* tests/testsuite.at: Likewise.
* tests/extrac11.at: New file.
2010-09-12 14:27:13 -07:00

67 lines
693 B
Plaintext

# List of gnulib modules needed for GNU tar.
# A module name per line. Empty lines and comments are ignored.
alloca
argmatch
argp
argp-version-etc
backupfile
closeout
configmake
dirfd
dirname
error
exclude
exitfail
fdopendir
fileblocks
fnmatch-gnu
fseeko
ftruncate
full-write
getdate
getline
getopt-gnu
getpagesize
gettext
gettime
gitlog-to-changelog
hash
human
inttypes
lchown
localcharset
mkdtemp
modechange
obstack
openat
priv-set
progname
quote
quotearg
readlinkat
rpmatch
safe-read
save-cwd
savedir
setenv
snprintf
stat-time
stdbool
stdint
stpcpy
strdup-posix
strerror
strtol
strtoul
timespec
unlinkdir
unlocked-io
utimens
version-etc-fsf
xalloc
xalloc-die
xgetcwd
xstrtoumax
xvasprintf