Jim Meyering [Sat, 2 Mar 2002 08:38:47 +0000 (08:38 +0000)]
(copy_reg): Detect abuse of a race condition
whereby an unprivileged user could gain read access to otherwise-
inaccessible files when root uses cp or mv to copy a hierarchy
belonging to that user.
Jim Meyering [Fri, 1 Mar 2002 23:57:21 +0000 (23:57 +0000)]
Include timespec.h.
(strftime, time, stime): Remove declarations; no longer needed.
(usage): Document %N.
(main): Use gettime rather than time to get the time of day,
so that we can get fractional times.
Similarly for settime and stime, so that we can set fractional times
(though this currently is not available to the user since we don't
parse fractional times; add FIXMES for that).
Check for gettime failures; e.g. this can occur if it
is past 2038 and we are a 32-bit app running on a 64-bit OS.
Get fractional part of file time stamps.
Do not falsely report failures just because time_t happens to be -1
(e.g. a file time stamp 1 second before the epoch).
(show_date): 2nd arg is now struct timespec, not time_t.
All uses changed. Use nstrftime rather than strftime, so that
we can format fractional seconds.
Jim Meyering [Tue, 26 Feb 2002 15:20:00 +0000 (15:20 +0000)]
Include "acl.h" rather than <sys/acl.h>.
(USE_ACL): Remove; replaced by HAVE_ACL everywhere.
(gobble_file): Use file_has_acl rather than doing it ourselves.
Jim Meyering [Sat, 23 Feb 2002 09:16:44 +0000 (09:16 +0000)]
(DISTFILES.common): Add remove-potcdate.sin.
(.SUFFIXES): Add .sed and .sin.
(.sin.sed): New rule.
($(DOMAIN).pot-update): Depend on remove-potcdate.sed. If the old
POT file exists and the new POT file differs from it only in the
first POT-Creation-Date line, keep the old POT file. So the PO files
don't need to be remade, and automake's "distcheck" target succeeds.
(mostlyclean): Remove remove-potcdate.sed and additional temporary
files.
Jim Meyering [Sat, 23 Feb 2002 09:12:20 +0000 (09:12 +0000)]
(simple_cat, cat, main): Used char * rather than
unsigned char *, to avoid some technical violations of the C
standard, and to avoid the need for casts. I guess the
unsigned char * was probably there for improved performance
with ancient compilers, but the code wasn't using the
unsignedness any more.
Reported by Nelson H. F. Beebe.
(cat): int -> size_t for full_write arg. This doesn't
fix any bugs since the buffer size is small, but it makes
the code a bit clearer.
Jim Meyering [Wed, 20 Feb 2002 16:06:20 +0000 (16:06 +0000)]
Include posixver.h.
(usage): Document only the intersection of the old and new behaviors,
to encourage portability.
(main): Use `posix2_version ()' in place of POSIX2_VERSION.
Jim Meyering [Mon, 18 Feb 2002 12:39:19 +0000 (12:39 +0000)]
(test_vector): Rename tests of obsolete usage to have prefix of `obs'.
For tests matching /^obs/,
put _POSIX2_VERSION=199209 in the environment, so the tests succeed
even when the environment would have contained _POSIX2_VERSION=200112.
Jim Meyering [Mon, 18 Feb 2002 12:35:00 +0000 (12:35 +0000)]
For tests matching /^(obs|err-[134])/,
put _POSIX2_VERSION=199209 in the environment, so the tests succeed
even when the environment would have contained _POSIX2_VERSION=200112.
Jim Meyering [Mon, 18 Feb 2002 12:33:11 +0000 (12:33 +0000)]
When getting input via a pipe, apply the
environment settings to the command in question, not to `cat'.
No longer allow more than one element in the
$Test::env or $Test::env_default arrays. No one used that.