Age | Commit message (Collapse) | Author |
|
and cpp directive (indented via cppi).
|
|
[long_opts]: Remove.
(usage): Tweak --help output; use *_OPTION_DESCRIPTION macros.
(main): Don't use getopt directly. Use parse_long_options instead.
Tweak a diagnostic.
Use EXIT_FAILURE rather than a literal `1'.
(main): If POSIXLY_CORRECT is set, don't recognize --help or --version,
so the program can operate on a file with one of those names.
|
|
[long_opts]: Remove.
(usage): Tweak --help output; use *_OPTION_DESCRIPTION macros.
(main): Don't use getopt directly. Use parse_long_options instead.
Tweak a diagnostic.
Use EXIT_FAILURE rather than a literal `1'.
|
|
|
|
|
|
|
|
|
|
down to just before the first use of that variable. Otherwise, it was
possible to make mv (and probably cp, too) malfunction when copying
hard-linked files into a directory containing at least one of the
source file names. Call forget_created everywhere thereafter where
this function returns without creating a destination file that might
subsequently be linked. Reported by Iida Yosiaki.
|
|
|
|
Might as well keep it simple, and like bash.
(binary_operator): Fix bug with -nt and -ot, when one of the
files did not exist. We want to be compatible with the ksh93
documentation, and with Bash.
|
|
|
|
a *floating-point* format, also in description of that option.
(usage): Also add the `=' signs here: --format=FORMAT,
--separator=STRING.
|
|
(using errno from the failed unlink) when a cross-device `mv'
fails, e.g., because the destination cannot be unlinked.
Prompted by a report from Karl Berry.
|
|
|
|
|
|
|
|
Instead, just skip it like the diagnostic says.
Reported by Paul Eggert.
|
|
reporting replaced files. This avoids a bug in the code,
which mishandled ino_t wider than long.
|
|
reporting replaced files. This avoids a bug in the code,
which mishandled ino_t wider than long.
* src/remove.c (remove_dir): Likewise, twice.
|
|
|
|
(rm): Add a parameter to the prototype.
|
|
now required for rm.
|
|
call lstat `.' to get the device/inode numbers now required for rm.
|
|
removing unintended files. In one scenario, if root is removing a
hierarchy that is writable by the malicious user, that user may trick
root into removing all of `/'. Reported by Wojciech Purczynski.
(remove_dir): After chdir `..', call lstat to get the
dev/inode of "." and fail if they aren't the same as the old numbers.
(remove_cwd_entries): New parameter, `cwd_dev_ino'.
(remove_dir): Likewise.
(rm): Likewise.
Adjust all callers.
|
|
|
|
(long_opts): Add --copy-contents.
(usage): Describe new behavior. Sort options.
(main): Implement new behavior. Remove diagnostics for -a and -r;
no longer needed.
|
|
|
|
|
|
issue a warning that `cp -r' is not portable.
|
|
cp -r once again preserves symlinks.
(usage): Document the original (now-restored) behavior.
|
|
|
|
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.
|
|
(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.
|
|
|
|
|
|
(USE_ACL): Remove; replaced by HAVE_ACL everywhere.
(gobble_file): Use file_has_acl rather than doing it ourselves.
|
|
|
|
|
|
|
|
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.
|
|
(usage): Document only the intersection of the old and new behaviors,
to encourage portability.
(main): Use `posix2_version ()' in place of POSIX2_VERSION.
|
|
version you want the utilities to conform to. Remove warnings about
failure to conform to a future POSIX version.
(ISO_8601_OPTION): Remove; no longer needed.
All uses changed to back to the corresponding short options.
(short_options): Remove; no longer needed.
(COMMON_SHORT_OPTIONS): New macro.
(usage): Document only the intersection of the
old and new behaviors, to encourage portability.
(main): Parse options using POSIX 1003.1-2001 rules if
conforming to that standard. Do not warn of obsolete options.
|
|
version you want the utilities to conform to. Remove warnings about
failure to conform to a future POSIX version.
(usage): Document only the intersection of the
old and new behaviors, to encourage portability.
(main): Parse options using POSIX 1003.1-2001 rules if
conforming to that standard. Do not warn of obsolete options.
|
|
(usage): Document only the intersection of the old and new behaviors,
to encourage portability.
(shortopts): Remove; no longer needed.
(main): Parse options using POSIX 1003.1-2001 rules if
conforming to that standard. Do not warn of obsolete options.
|
|
(usage): Document only the intersection of the old and new behaviors,
to encourage portability.
(main, parse_obsolescent_option): Parse options using POSIX 1003.1-2001 rules if
conforming to that standard. Do not warn of obsolete options.
|
|
(usage): Document only the intersection of the old and new behaviors,
to encourage portability.
(shortopts): Remove; no longer needed.
(main): Parse options using POSIX 1003.1-2001 rules if
conforming to that standard. Do not warn of obsolete options.
|
|
(usage): Document only the intersection of the old and new behaviors,
to encourage portability.
(shortopts): Remove; no longer needed.
(main): Parse options using POSIX 1003.1-2001 rules if
conforming to that standard. Do not warn of obsolete options.
|
|
(OPTARG_POSIX, OBSOLETE_OPTION_WARNINGS): Likewise.
|
|
(usage): Document only the intersection of the old and new behaviors,
to encourage portability.
(short_options): Remove; no longer needed.
(COMMON_SHORT_OPTIONS): New macro.
(main): Parse options using POSIX 1003.1-2001 rules if
conforming to that standard. Do not warn of obsolete options.
|
|
(usage): Document only the intersection of the old and new behaviors,
to encourage portability.
(short_options): Remove; no longer needed.
(COMMON_SHORT_OPTIONS): New macro.
(SEP_STRING_OPTION): Remove; no longer needed.
All uses changed to back to the corresponding short options.
(main): Parse options using POSIX 1003.1-2001 rules if
conforming to that standard. Do not warn of obsolete options.
|