Jim Meyering [Mon, 14 Jun 2004 18:12:44 +0000 (18:12 +0000)]
*** empty log message ***
Jim Meyering [Mon, 14 Jun 2004 17:21:55 +0000 (17:21 +0000)]
.
Jim Meyering [Mon, 14 Jun 2004 17:20:29 +0000 (17:20 +0000)]
*** empty log message ***
Jim Meyering [Mon, 14 Jun 2004 17:20:19 +0000 (17:20 +0000)]
(TESTS): Add pwd.
(BUILD_SRC_DIR): Define BUILD_SRC_DIR.
Jim Meyering [Mon, 14 Jun 2004 17:19:52 +0000 (17:19 +0000)]
*** empty log message ***
Jim Meyering [Mon, 14 Jun 2004 17:19:46 +0000 (17:19 +0000)]
New test, for fix of 2004-04-19.
Jim Meyering [Mon, 14 Jun 2004 14:40:21 +0000 (14:40 +0000)]
*** empty log message ***
Jim Meyering [Mon, 14 Jun 2004 14:40:12 +0000 (14:40 +0000)]
Remove declaration of euidaccess.
Instead, include "euidaccess.h".
Jim Meyering [Sun, 13 Jun 2004 22:03:11 +0000 (22:03 +0000)]
*** empty log message ***
Jim Meyering [Sun, 13 Jun 2004 22:03:07 +0000 (22:03 +0000)]
(PIDSTR_DECL_AND_INIT): Don't assume pid_t fits in int.
(UT_ID) [!HAVE_STRUCT_XTMP_UT_ID]: Remove bogus comment,
as (sizeof "??") reliably returns 3.
(print_line): Guard against idle and pid being too long
(which is possible when printing headers).
(print_user): Allocate enough bytes for idlestr. Use IDLESTR_LEN.
Avoid unnecessary cast of sizeof to int.
(make_id_equals_comment): Do not assume that UT_ID returns
a string; it might return a non-null-terminated array.
Use strncat instead. It's not very often where strncat is
exactly what you want, but this is one of those rare cases.
Jim Meyering [Sat, 12 Jun 2004 08:07:41 +0000 (08:07 +0000)]
*** empty log message ***
Jim Meyering [Sat, 12 Jun 2004 08:07:30 +0000 (08:07 +0000)]
(extract_trimmed_name): Don't apply strchr to a
non-string; this leads to undefined behavior.
Jim Meyering [Sat, 12 Jun 2004 08:06:12 +0000 (08:06 +0000)]
*** empty log message ***
Jim Meyering [Sat, 12 Jun 2004 08:05:59 +0000 (08:05 +0000)]
(list_entries_who): Don't output a trailing space.
Jim Meyering [Wed, 9 Jun 2004 15:13:33 +0000 (15:13 +0000)]
*** empty log message ***
Jim Meyering [Wed, 9 Jun 2004 15:13:27 +0000 (15:13 +0000)]
(AC_FUNC_CALLOC): Remove use of AN_FUNCTION.
Jim Meyering [Wed, 9 Jun 2004 14:47:36 +0000 (14:47 +0000)]
*** empty log message ***
Jim Meyering [Wed, 9 Jun 2004 14:47:29 +0000 (14:47 +0000)]
(usage): Improve wording in description of the --time=WORD option.
Jim Meyering [Wed, 9 Jun 2004 14:45:38 +0000 (14:45 +0000)]
Adjust to accommodate Paul Eggert's changes of 2004-06-08.
Jim Meyering [Wed, 9 Jun 2004 13:54:21 +0000 (13:54 +0000)]
*** empty log message ***
Jim Meyering [Wed, 9 Jun 2004 13:54:11 +0000 (13:54 +0000)]
(change_file_owner): Change names of parameters
old_uid and old_gid to required_uid and required_gid respectively.
Jim Meyering [Wed, 9 Jun 2004 13:37:58 +0000 (13:37 +0000)]
*** empty log message ***
Jim Meyering [Wed, 9 Jun 2004 13:37:52 +0000 (13:37 +0000)]
Adjust chmod and chown to be similar if -c or -v are given. In
particular, a no-op chown is no longer reported as a change; this
reverts to previous behavior. Also, fix both commands so that -v
report failures even if the failure is not due to the chmod or
chown syscalls.
* src/chown-core.c (change_file_owner): Return -1 on error, not
1 sometimes and -1 on others. Our caller ORs together our results,
and (-1 | 1) == 0 on ones-complement hosts.
With -v report all errors verbosely, not just some.
Fix bug when chopt->root_dev_ino && !chopt->affect_symlink_referent:
file_stats wasn't set properly in that case.
Jim Meyering [Wed, 9 Jun 2004 09:06:34 +0000 (09:06 +0000)]
(mode_changed): Return false, not 0, now that the function returns `bool'.
Jim Meyering [Wed, 9 Jun 2004 09:05:02 +0000 (09:05 +0000)]
Adjust chmod and chown to be similar if -c or -v are given. In
particular, a no-op chown is no longer reported as a change; this
reverts to previous behavior. Also, fix both commands so that -v
report failures even if the failure is not due to the chmod or
chown syscalls.
* src/chmod.c (CH_NOT_APPLIED): New constant.
(describe_change): Handle it.
(process_file): Use it, if a symlink wasn't changed.
(mode_changed): Return bool, not int. Accept new argument
NEW_MODE; all callers changed. This lets us avoid statting the
file unless the new mode has unusual bits.
(process_file): Return -1 on error. With -v, report all errors
verbosely, not just some.
Jim Meyering [Tue, 8 Jun 2004 17:07:19 +0000 (17:07 +0000)]
.
Jim Meyering [Tue, 8 Jun 2004 16:58:37 +0000 (16:58 +0000)]
*** empty log message ***
Jim Meyering [Tue, 8 Jun 2004 16:58:32 +0000 (16:58 +0000)]
*** empty log message ***
Jim Meyering [Tue, 8 Jun 2004 16:58:28 +0000 (16:58 +0000)]
Test that chgrp -h does not fail on
symlinks, even on hosts where that's not supported.
Test that if -R is specified without -H or L, -h is assumed.
Test that chown() is not optimized away.
Jim Meyering [Tue, 8 Jun 2004 16:32:14 +0000 (16:32 +0000)]
s/FTS_STAT/FTS_NOSTAT/
Jim Meyering [Tue, 8 Jun 2004 15:26:45 +0000 (15:26 +0000)]
Adjust error-diagnostic spelling to match new behavior.
Jim Meyering [Tue, 8 Jun 2004 15:25:59 +0000 (15:25 +0000)]
Do not attempt to combine -h and -H; these
options are incompatible, and their behavior is undefined with POSIX.
(changed, not_changed): Adjust to match the fact that -h is no longer
specified. Sort names.
Jim Meyering [Tue, 8 Jun 2004 15:25:45 +0000 (15:25 +0000)]
Use chown --from to discover whether the
group changed, since chgrp now changes unconditionally. This
complicates the sed script a bit. Do not specify --dereference,
since it's the default (and we want to test this). Adjust output
to match the fact that chgrp no longer optimizes the case of
changing a file's group to the same value as before.
Jim Meyering [Tue, 8 Jun 2004 14:58:57 +0000 (14:58 +0000)]
.
Jim Meyering [Tue, 8 Jun 2004 14:58:21 +0000 (14:58 +0000)]
.
Jim Meyering [Tue, 8 Jun 2004 14:57:57 +0000 (14:57 +0000)]
(change_file_owner): Use ent->fts_statp only if
needed. Chown a directory only after chowning its children; this
avoids problems if the new directory ownership doesn't permit
access to the children. Dereference symlinks before doing
ROOT_DEV_INO_CHECK, not after, so that we catch symlinks to /.
Do not optimize away the chown() system call when the file's owner
and group already have the desired value. POSIX does not permit
this optimization. Rely on chown and lchown to do the right
thing with symlinks and/or -1 arguments, now that we have wrappers
to do this. Use ENOTSUPP not ENOSYS, and ignore all ENOTSUPP
errors, not just command-line errors.
(chown_files): Pass FTS_STAT to xfts_open if we don't need file status.
Jim Meyering [Tue, 8 Jun 2004 13:40:00 +0000 (13:40 +0000)]
(main): Check for incompatible options. -R --dereference
requires either -H or -L, and -R -h requires -P. If -H, specify
FTS_PHYSICAL as well as FTS_COMFOLLOW; this is faster. Make this
file as much like chown.c as possible.
Jim Meyering [Tue, 8 Jun 2004 13:37:40 +0000 (13:37 +0000)]
(main): Check for incompatible options. -R --dereference
requires either -H or -L, and -R -h requires -P. If -H, specify
FTS_PHYSICAL as well as FTS_COMFOLLOW; this is faster. Make this
file as much like chgrp.c as possible.
Jim Meyering [Tue, 8 Jun 2004 13:31:49 +0000 (13:31 +0000)]
*** empty log message ***
Jim Meyering [Tue, 8 Jun 2004 13:31:43 +0000 (13:31 +0000)]
(fts_stat, fts_alloc): Always allocate and use a struct
stat, even if the user isn't interested in the results.
This prevents a core dump in cycle_check when FTS_NOSTAT is set.
Jim Meyering [Tue, 8 Jun 2004 13:24:09 +0000 (13:24 +0000)]
(ENOTSUP): Remove.
Jim Meyering [Tue, 8 Jun 2004 13:23:42 +0000 (13:23 +0000)]
fix typo
Jim Meyering [Tue, 8 Jun 2004 13:23:17 +0000 (13:23 +0000)]
*** empty log message ***
Jim Meyering [Tue, 8 Jun 2004 12:02:00 +0000 (12:02 +0000)]
(EOPNOTSUPP): Define if not defined.
(ENOSYS): Remove.
Jim Meyering [Tue, 8 Jun 2004 12:01:38 +0000 (12:01 +0000)]
(lchown): Return EOPNOTSUPP if not supported; this
is what POSIX-2004 specifies.
Jim Meyering [Tue, 8 Jun 2004 07:13:18 +0000 (07:13 +0000)]
*** empty log message ***
Jim Meyering [Tue, 8 Jun 2004 07:13:10 +0000 (07:13 +0000)]
(main): Fix typo introduced on 2003-05-10 that
prevented a diagnostic of any operands.
Jim Meyering [Tue, 8 Jun 2004 06:56:08 +0000 (06:56 +0000)]
*** empty log message ***
Jim Meyering [Tue, 8 Jun 2004 06:54:04 +0000 (06:54 +0000)]
.
Jim Meyering [Tue, 8 Jun 2004 06:47:43 +0000 (06:47 +0000)]
(direct_mode): Turn it on/off with directio, too.
Jim Meyering [Mon, 7 Jun 2004 15:27:47 +0000 (15:27 +0000)]
*** empty log message ***
Jim Meyering [Mon, 7 Jun 2004 15:27:42 +0000 (15:27 +0000)]
Enable direct-mode I/O (bypassing the buffer cache), if possible.
Prompted by a suggestion from Kalle Olavi Niemitalo
in http://bugs.debian.org/207035.
(direct_mode): New function.
(do_wipefd): Turn on direct-mode I/O.
(dopass): If a file's first write fails with EINVAL,
turn off direct-mode I/O and retry the write.
Jim Meyering [Mon, 7 Jun 2004 15:26:52 +0000 (15:26 +0000)]
*** empty log message ***
Jim Meyering [Mon, 7 Jun 2004 15:26:49 +0000 (15:26 +0000)]
(gl_MACROS): Check for the directio function.
Jim Meyering [Mon, 7 Jun 2004 08:21:10 +0000 (08:21 +0000)]
*** empty log message ***
Jim Meyering [Mon, 7 Jun 2004 08:21:07 +0000 (08:21 +0000)]
Remove menu references to just-removed subsection.
Jim Meyering [Sun, 6 Jun 2004 19:31:46 +0000 (19:31 +0000)]
*** empty log message ***
Jim Meyering [Sun, 6 Jun 2004 19:31:43 +0000 (19:31 +0000)]
(tr invocation): Remove the section describing
how POSIXLY_CORRECT changes tr's behavior.
Jim Meyering [Sun, 6 Jun 2004 19:18:49 +0000 (19:18 +0000)]
fix typo in comment
Jim Meyering [Sun, 6 Jun 2004 19:03:05 +0000 (19:03 +0000)]
*** empty log message ***
Jim Meyering [Sun, 6 Jun 2004 19:03:01 +0000 (19:03 +0000)]
Update from gnulib.
Jim Meyering [Sun, 6 Jun 2004 14:20:20 +0000 (14:20 +0000)]
*** empty log message ***
Jim Meyering [Sun, 6 Jun 2004 14:20:16 +0000 (14:20 +0000)]
(main): "tr -d a b" is now a fatal error even if POSIXLY_CORRECT is set.
The POSIX SYNOPSIS does not allow this option combination.
Jim Meyering [Fri, 4 Jun 2004 17:44:24 +0000 (17:44 +0000)]
*** empty log message ***
Jim Meyering [Fri, 4 Jun 2004 17:43:55 +0000 (17:43 +0000)]
(dopass): Don't subtract 1 from the offset after
a write error. Problem reported by Jon Peatfield in:
http://lists.gnu.org/archive/html/bug-coreutils/2004-06/msg00020.html
Jim Meyering [Thu, 3 Jun 2004 16:03:44 +0000 (16:03 +0000)]
*** empty log message ***
Jim Meyering [Thu, 3 Jun 2004 16:03:39 +0000 (16:03 +0000)]
*** empty log message ***
Jim Meyering [Thu, 3 Jun 2004 16:03:32 +0000 (16:03 +0000)]
Fix bug reported by Buciuman Adrian in
<http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00105.html>
where 'dd' created a file that was too large. The bug was that dd
assumed that the input file offset does not advance after a failed
read; but POSIX says that the input file offset is undefined after
a failed read.
(MAX_BLOCKSIZE): New macro.
(input_seekable, input_seek_errno, input_offset,
input_offset_overflow): New vars.
(scanargs): Reject block sizes greater than MAX_BLOCKSIZE.
(advance_input_offset): New function.
(skip_via_lseek): Set errno to zero when reporting our failure,
so that we don't report based on garbage errno.
(skip): If fdesc is standard input, advance the input offset.
Do not quit if reading, and if noerror was specified;
POSIX seems to require this.
If read fails on output file, report the earlier lseek failure
instead; this fixes a FIXME in dd_copy.
(advance_input_after_read_error): New function.
(dd_copy): Use it, instead of assuming that failed reads
do not advance the file pointer. Advance input offset
after nonfailed reads. Advance only a partial block if
the previous read (before the failed read) succeeded, and
do not generate an output block of zeros in this case.
(main): Determine initial input offset, seekability of input,
and error if it wasn't seekable.
Jim Meyering [Wed, 2 Jun 2004 21:41:42 +0000 (21:41 +0000)]
*** empty log message ***
Jim Meyering [Wed, 2 Jun 2004 21:39:49 +0000 (21:39 +0000)]
*** empty log message ***
Jim Meyering [Wed, 2 Jun 2004 21:39:45 +0000 (21:39 +0000)]
rm (without -f) could hang unnecessarily when attempting to
remove a symlink to a file on an off-line NFS-mounted partition.
Reported by David Howells in https://bugzilla.redhat.com/124699.
(write_protected_non_symlink): New function.
Don't invoke euidaccess on symlinks.
(prompt): Use write_protected_non_symlink rather than using
euidaccess directly, being careful not to call lstat twice for a file.
Jim Meyering [Wed, 2 Jun 2004 21:23:42 +0000 (21:23 +0000)]
*** empty log message ***
Jim Meyering [Wed, 2 Jun 2004 21:23:39 +0000 (21:23 +0000)]
(cut invocation): Clarify what --output-delimiter=STR
does with byte/character ranges.
Jim Meyering [Wed, 2 Jun 2004 21:21:05 +0000 (21:21 +0000)]
.
Jim Meyering [Wed, 2 Jun 2004 21:20:45 +0000 (21:20 +0000)]
*** empty log message ***
Jim Meyering [Wed, 2 Jun 2004 21:20:41 +0000 (21:20 +0000)]
Fix a bug in how the --output-delimiter=D option works with
abutting byte or character ranges. Reported by David Krider in
http://lists.gnu.org/archive/html/bug-coreutils/2004-05/msg00132.html
(print_kth): Remove special case for open-ended range.
(set_fields): Record the range start index for an interval even
when it abuts another interval on its low side.
Also record the range start index of the longest right-open-interval.
Jim Meyering [Wed, 2 Jun 2004 21:20:23 +0000 (21:20 +0000)]
Add tests of --output-delimiter=S with abutting and overlapping byte ranges.
Jim Meyering [Wed, 2 Jun 2004 08:54:32 +0000 (08:54 +0000)]
.
Jim Meyering [Wed, 2 Jun 2004 08:50:42 +0000 (08:50 +0000)]
New tests bs-055, bs-at-end, repeat-Compl.
Fix comment for range-a-a.
Jim Meyering [Wed, 2 Jun 2004 08:50:30 +0000 (08:50 +0000)]
*** empty log message ***
Jim Meyering [Wed, 2 Jun 2004 08:50:24 +0000 (08:50 +0000)]
(posix_pedantic): Remove; no longer needed since
we need to test this in just one place now.
(usage): Mention -C.
(unquote): Note that \055, \n, etc are escaped.
Do not worry about POSIXLY_CORRECT when warning about ambiguous
escape sequences.
\ at end of string stands for itself.
Do not diagnose invalid backslash escapes: POSIX says the behavior
is unspecified in this case, so we don't need to diagnose it.
(main): Add support for -C (currently an alias for -c).
Do not diagnose 'tr [:upper:] [:upper:], as POSIX does not require
a diagnostic here.
Jim Meyering [Wed, 2 Jun 2004 08:35:27 +0000 (08:35 +0000)]
*** empty log message ***
Jim Meyering [Wed, 2 Jun 2004 08:35:02 +0000 (08:35 +0000)]
(tr invocation): Mention -C.
Jim Meyering [Tue, 1 Jun 2004 17:12:44 +0000 (17:12 +0000)]
*** empty log message ***
Jim Meyering [Tue, 1 Jun 2004 15:27:10 +0000 (15:27 +0000)]
update from gnulib
Jim Meyering [Tue, 1 Jun 2004 15:24:15 +0000 (15:24 +0000)]
*** empty log message ***
Jim Meyering [Tue, 1 Jun 2004 15:24:11 +0000 (15:24 +0000)]
Update from gnulib.
Jim Meyering [Tue, 1 Jun 2004 14:28:25 +0000 (14:28 +0000)]
.
Jim Meyering [Tue, 1 Jun 2004 14:18:08 +0000 (14:18 +0000)]
*** empty log message ***
Jim Meyering [Tue, 1 Jun 2004 13:37:04 +0000 (13:37 +0000)]
*** empty log message ***
Jim Meyering [Tue, 1 Jun 2004 13:37:01 +0000 (13:37 +0000)]
(main): Update use of xreadlink.
Jim Meyering [Tue, 1 Jun 2004 13:36:40 +0000 (13:36 +0000)]
(print_stat): Update use of xreadlink.
Jim Meyering [Tue, 1 Jun 2004 13:36:20 +0000 (13:36 +0000)]
(get_link_name): Update use of xreadlink.
Jim Meyering [Tue, 1 Jun 2004 13:29:42 +0000 (13:29 +0000)]
*** empty log message ***
Jim Meyering [Tue, 1 Jun 2004 13:29:36 +0000 (13:29 +0000)]
(copy_internal): Don't use alloca, as it can mess up
royally if the link length is long (e.g., GNU/Hurd). Use
xreadlink instead, it's safer. Don't bother to read the link if
it's the wrong size. Add a FIXME because this area is a bit murky
and undocumented.
Jim Meyering [Tue, 1 Jun 2004 13:24:23 +0000 (13:24 +0000)]
*** empty log message ***
Jim Meyering [Tue, 1 Jun 2004 13:24:12 +0000 (13:24 +0000)]
(canonicalize_file_name): Update use of xreadlink.
Jim Meyering [Tue, 1 Jun 2004 13:22:25 +0000 (13:22 +0000)]
Update prototype to reflect new signature.
Include <stddef.h>, for size_t.
Jim Meyering [Tue, 1 Jun 2004 13:20:50 +0000 (13:20 +0000)]
Include xreadlink.h first, to catch .h file dependency problems.
Jim Meyering [Tue, 1 Jun 2004 13:17:13 +0000 (13:17 +0000)]
*** empty log message ***