summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2010-09-16 10:16:47 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2010-09-16 10:17:04 -0700
commitecbcb7b6d74c2d69386c8d7e435486a4690c9993 (patch)
tree923b0df5324f20a3b06e651ac61fbc2ee3b54320 /configure.ac
parent59146768ef4a2c045239628b7179ea477563d63f (diff)
downloadtar-ecbcb7b6d74c2d69386c8d7e435486a4690c9993.tar.gz
tar: --atime-preserve fixes for races etc.
This patch fixes a race condition in the --atime-preserve=replace option, which might cause tar to improperly follow a symbolic link. It also drops the use of the _FIOSATIME ioctl of Solaris 2.x and later, which loses resolution on time stamps. Modern Solaris systems support full-resolution time stamps in the kernel, and it's not worth the hassle of testing this call, useful only in no-longer-supported Solaris variants. Also, it undoes a change I recently introduced to the --compare option, which caused it to not follow symbolic links unless the --dereference option was also used. Quite possibly this change is a good idea, but the old behavior was documented and the change should not have been installed casually. * configure.ac: Don't check for stropts.h and sys/filio.h. * gnulib.modules: Add futimens, utimensat. Remove futimens. * src/common.h (fd_utimensat): New decl. * src/compare.c (diff_file, diff_multivol): Don't use open_read_flags: those are for --create only. * src/create.c (dump_file0): Adjust to set_file_atime changes. Pass fstatat_flags to set_file_atime, so that symbolic links are not followed inadvertantly. * src/extract.c: Don't include utimens.h. (set_stat): Use fd_utimensat ant UTIME_NOW rather than fdutimens. * src/misc.c: Don't include utimens.h, stropts.h, sys/filio.h. (fd_utimensat): New function. (set_file_atime): Use it. New arg atflag, controlling symlink handling. All callers changed.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac4
1 files changed, 2 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 62df25fb..97a08692 100644
--- a/configure.ac
+++ b/configure.ac
@@ -40,8 +40,8 @@ AC_ISC_POSIX
AC_C_INLINE
AC_CHECK_HEADERS_ONCE(fcntl.h linux/fd.h memory.h net/errno.h \
- sgtty.h string.h stropts.h \
- sys/param.h sys/device.h sys/filio.h sys/gentape.h \
+ sgtty.h string.h \
+ sys/param.h sys/device.h sys/gentape.h \
sys/inet.h sys/io/trioctl.h \
sys/mtio.h sys/time.h sys/tprintf.h sys/tape.h \
unistd.h locale.h)