Age | Commit message (Collapse) | Author |
|
when --no-create is in effect. Based on a patch from TAKAI Kousuke.
|
|
(print_line): Use "%-8.8s" for the format: the user name is not
always NUL terminated.
(scan_entries) [need_users]: Use IS_USER_PROCESS, so that this works
even on systems without ut_type.
|
|
(NEW_TIME): Define to 0, not INT_MAX.
(UT_PID, UT_ID, UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
Replace literal uses of ut_pid, ut_id, and ut_exit members with
uses through macros.
(make_id_equals_comment): New function, factored out of three others.
|
|
(print_statfs): Use human_fstype to honor format width on %T.
|
|
|
|
|
|
Use xmalloc everywhere, not malloc.
|
|
Include inttypes.h.
(PRIdMAX, PRIuMAX): Define, if not already defined.
(print_statfs): Use those macros, not the literal strings.
(print_stat): Likewise.
|
|
including the mention of SET1.
|
|
|
|
|
|
(print_stat): Remove another #ifdef.
(do_statfs): Likewise.
(print_statfs): Prefer/use fputs over printf.
(print_stat): Likewise.
|
|
|
|
(verbose_usage): Remove function.
|
|
|
|
|
|
|
|
Remove lots of #if directives involving FLASK_LINUX
[!FLASK_LINUX] (is_flask_enabled): Define.
(stat_secure, lstat_secure): Define.
(print_statfs): Remove lots of nested #if directives.
Instead, rely on support fo %llu and %lld printf formats --
but that is only temporary, since it's not porable enough.
(main): Hoist is_flask_enabled test to be done here, rather
than in each of do_stat and do_statfs for every argument.
|
|
Constify many parameters.
(print_statfs): Fix typo: Use %u (to match %lu) for namelen, not %d.
|
|
|
|
|
|
Declare most functions to be `static'.
|
|
[HAVE_SYS_SYSMACROS_H]: Guard inclusion of sys/sysmacros.h.
(PROGRAM_NAME, AUTHORS): Define.
(long_options): Declare/define.
(print_human_access): Rewrite to use mode_string.
(usage): Rewrite.
(main): Use getopt_long.
|
|
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.
|
|
|