summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2002-03-10(copy_reg): Don't exit upon finding a replaced file.Jim Meyering
Instead, just skip it like the diagnostic says. Reported by Paul Eggert.
2002-03-10(copy_reg): Use a more concise diagnostic forJim Meyering
reporting replaced files. This avoids a bug in the code, which mishandled ino_t wider than long.
2002-03-10* src/copy.c (copy_reg): Use a more concise diagnostic forJim Meyering
reporting replaced files. This avoids a bug in the code, which mishandled ino_t wider than long. * src/remove.c (remove_dir): Likewise, twice.
2002-03-09(rm) Add comment on new parameter.Jim Meyering
2002-03-08(struct dev_ino): Declare new type.Jim Meyering
(rm): Add a parameter to the prototype.
2002-03-08(main): Call lstat `.' to get the device/inode numbersJim Meyering
now required for rm.
2002-03-08(do_move): The first time we resort to copy/remove,Jim Meyering
call lstat `.' to get the device/inode numbers now required for rm.
2002-03-08Don't allow a malicious user to trick another user's rm process intoJim Meyering
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.
2002-03-03(copy_internal): Remove -r warning; no longer needed.Jim Meyering
2002-03-03(COPY_CONTENTS_OPTION): New enum value.Jim Meyering
(long_opts): Add --copy-contents. (usage): Describe new behavior. Sort options. (main): Implement new behavior. Remove diagnostics for -a and -r; no longer needed.
2002-03-02(main): Warn when -r is specified before --archive (-a).Jim Meyering
2002-03-02add a commentJim Meyering
2002-03-02(copy_internal): For each symlink copied by cp -r,Jim Meyering
issue a warning that `cp -r' is not portable.
2002-03-02(main): Revert change of 2001-12-29. With this change,Jim Meyering
cp -r once again preserves symlinks. (usage): Document the original (now-restored) behavior.
2002-03-02(main): Fail if -r is specified after --archive (-a) on the command line.Jim Meyering
2002-03-02(copy_reg): Detect abuse of a race conditionJim Meyering
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.
2002-03-01Include timespec.h.Jim Meyering
(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.
2002-03-01reflect renaming: nanosleep.h -> timespec.hJim Meyering
2002-02-28(decode_switches, usage): Add --time-style=+FORMAT.Jim Meyering
2002-02-26Include "acl.h" rather than <sys/acl.h>.Jim Meyering
(USE_ACL): Remove; replaced by HAVE_ACL everywhere. (gobble_file): Use file_has_acl rather than doing it ourselves.
2002-02-26.Jim Meyering
2002-02-26tweak commentJim Meyering
2002-02-24Include posixver.h.Jim Meyering
2002-02-23(simple_cat, cat, main): Used char * rather thanJim Meyering
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.
2002-02-20Include posixver.h.Jim Meyering
(usage): Document only the intersection of the old and new behaviors, to encourage portability. (main): Use `posix2_version ()' in place of POSIX2_VERSION.
2002-02-16Add support for _POSIX2_VERSION, which lets you pick which POSIXJim Meyering
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.
2002-02-16Add support for _POSIX2_VERSION, which lets you pick which POSIXJim Meyering
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.
2002-02-16Include posixver.h.Jim Meyering
(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.
2002-02-16Include posixver.h.Jim Meyering
(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.
2002-02-16Include posixver.h.Jim Meyering
(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.
2002-02-16Include posixver.h.Jim Meyering
(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.
2002-02-16(_POSIX2_VERSION, POSIX2_VERSION): Remove definitions.Jim Meyering
(OPTARG_POSIX, OBSOLETE_OPTION_WARNINGS): Likewise.
2002-02-16Include posixver.h.Jim Meyering
(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.
2002-02-16Include posixver.h.Jim Meyering
(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.
2002-02-16Include posixver.h.Jim Meyering
(usage): Document only the intersection of the old and new behaviors, to encourage portability. (main): Revert to previous behavior, except report an error and exit if the obsolete syntax is used and if conforming to the new standard.
2002-02-16Include posixver.h.Jim Meyering
(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. (STRINGS_OPTION, WIDTH_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.
2002-02-16Include posixver.h.Jim Meyering
(usage): Document only the intersection of the old and new behaviors, to encourage portability. (main): Revert to previous behavior, except report an error and exit if the obsolete syntax is used and if conforming to the new standard.
2002-02-16Include posixver.h.Jim Meyering
(usage): Document only the intersection of the old and new behaviors, to encourage portability. (shortopts): Remove; no longer needed. (main): Revert to previous behavior, except report an error and exit if the obsolete syntax is used and if conforming to the new standard.
2002-02-12(DEFAULT_SUFFIX_LENGTH): Define constant.Jim Meyering
(suffix_length): Use it here. (usage): Use it here.
2002-02-12Include "dirname.h".Jim Meyering
(outbase): Now a global var. (outfile_end): Remove. (suffix_length): New var. (shortopts, longopts, main): Add -a or --suffix-length. (next_file_name): Implement -a. Do not extend the suffix length. Check for file names that are too long. (main): Move outfile initialization to next_file_name. (shortopts): Remove -v (a typo).
2002-02-12(main): Output warnings only if OBSOLETE_OPTION_WARNINGS.Jim Meyering
2002-02-11(main): Conform to POSIX 1003.1-2001 ifJim Meyering
POSIX2_VERSION says to, otherwise warn of obsolete usage if OBSOLETE_OPTION_WARNINGS is nonzero and if not POSIXLY_CORRECT.
2002-02-11Add more support for POSIX 1003.1-2001, which requires removalJim Meyering
for support of obsolete "-DIGITS" option syntax in nice, and which prohibits options with optional arguments like date's -I option. (ISO_8601_OPTION): New enum value. (long_options): Use it. (short_options): New constant. (usage): Document the change. (main): Conform to POSIX 1003.1-2001 if POSIX2_VERSION says to, otherwise warn of obsolete usage if OBSOLETE_OPTION_WARNINGS is nonzero and if not POSIXLY_CORRECT.
2002-02-11(usage): Describe %F, %g, %G, %P, and %R.Jim Meyering
2002-02-11From Bruno HaibleJim Meyering
(print_esc): Call print_unicode_char with exit_on_error = false.
2002-02-11(head_lines): If we have read too much data, tryJim Meyering
to seek back to the position we would have gotten to had we been reading one byte at a time. POSIX currently doesn't require this, but it's easy to do and some software relies on it.
2002-02-11(unquote): Make comment a little clearer.Jim Meyering
2002-02-02(main): Prepend `warning: ' to the diagnostic, so it'sJim Meyering
consistent with all of the other `... is obsolete...' diagnostics.
2002-02-02Add more support for POSIX 1003.1-2001, which requires removal forJim Meyering
support of obsolete "-N" option syntax in expand, head, fold, split, tail, unexpand, uniq, and which prohibits options with optional arguments in od and pr. (usage): Document this. (shortopts): New constant. (main): Check for obsolete options.
2002-02-02Add more support for POSIX 1003.1-2001, which requires removal forJim Meyering
support of obsolete "-N" option syntax in expand, head, fold, split, tail, unexpand, uniq, and which prohibits options with optional arguments in od and pr. (usage): Document this. (shortopts): New constant. (main): Check for obsolete options.