summaryrefslogtreecommitdiff
path: root/.x-sc_space_tab
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2007-03-25 09:52:57 +0200
committerJim Meyering <jim@meyering.net>2007-03-25 09:52:57 +0200
commit1efda4faf3878d180a13a94cadc690f2a95090b1 (patch)
treeeccdf744921edfb7b4eea958a2fd2c76e26af4be /.x-sc_space_tab
parentde730249777c65b2c75502b00159400eda8dacf9 (diff)
downloadcoreutils-1efda4faf3878d180a13a94cadc690f2a95090b1.tar.xz
Avoid the need for euidaccess and/or lstat on every directory entry
with 'rm -r dir' (without -f), if we are root, or if we are removing a directory tree that is full of symbolic links. * bootstrap.conf (gnulib_modules): Add write-any-file. * src/copy.c: Include write-any-file.h. (UNWRITABLE): Remove macro, replacing with.... (writable_destination): New function, which uses can_write_any_file to avoid the need for euidaccess when we are privileged. (overwrite_prompt, abandon_move): Use it. * src/remove.c: Include write-any-file.h. (D_TYPE): New macro. (DT_UNKNOWN, DT_DIR, DT_LNK) [!HAVE_STRUCT_DIRENT_D_TYPE]: New macros. (write_protected_non_symlink): Don't bother to stat if we can write any file. (prompt): New arg PDIRENT_TYPE. All callers changed. Use readdir dirent type to avoid the need for 'lstat' on each directory entry in cases like 'rm -r dir', if we are root, or if the tree is full of symbolic links. (DT_IS_KNOWN, DT_MUST_BE): Remove. (remove_entry): New arg DIRENT_TYPE_ARG. All callers changed.
Diffstat (limited to '.x-sc_space_tab')
0 files changed, 0 insertions, 0 deletions