summaryrefslogtreecommitdiff
path: root/old/fileutils
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2002-04-25 16:40:04 +0000
committerJim Meyering <jim@meyering.net>2002-04-25 16:40:04 +0000
commit0199003cf96fbb3bbd72d5662a3f6788a4a4ce40 (patch)
treea7f4a7cc817d1ca668b8d8951165a6da0c96ca50 /old/fileutils
parentbbd396f52fe205bf01dc7ccc7366ff653f5f8aec (diff)
downloadcoreutils-0199003cf96fbb3bbd72d5662a3f6788a4a4ce40.tar.xz
Remove hash table, active_dir_map, used to detect directory cycles.
Instead, detect them lazily with just O(1) memory. Suggestion from Andi Kleen. (is_power_of_two): New function. (print_nth_dir, make_active_dir_ent): Remove functions. (hash_active_dir_ent, hash_compare_active_dir_ents): Likewise. (remove_dir): Check for cycles here, ... (rm): ... and don't check for cycles here. (rm): Call fspec_get_full_mode here, rather than fspec_get_filetype_mode. We want to get the dev/ino earlier, and at the same time as when we get the file type, to avoid the risk that an attacker would change e.g. a directory to a symlink before we record its dev/ino.
Diffstat (limited to 'old/fileutils')
0 files changed, 0 insertions, 0 deletions