summaryrefslogtreecommitdiff
path: root/tests/mv
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2001-03-02 02:58:23 +0000
committerJim Meyering <jim@meyering.net>2001-03-02 02:58:23 +0000
commit2679dfb639f637cd6a0cdb525844e93bce5e8acb (patch)
tree519a503231d1129f60ad0acea95891a55f361a82 /tests/mv
parent3a960cb7e4a809c0c9d4e5b7302c6503961643ea (diff)
downloadcoreutils-2679dfb639f637cd6a0cdb525844e93bce5e8acb.tar.xz
'sort' race condition fixes.
Defend against a DoS attack where someone else creates a temporary file with the same name as ours. Use mkstemp to do this, supplying our own mkstemp if the system doesn't have one. Also, fix a race condition during cleanup on hosts without sigaction. (NAME_MAX_IN_DIR): Remove. (sigprocmask, sigset_t): New macros, defined only on older hosts. (caught_signals): New var. (xtmpfopen, tempname): Removed. (create_temp_file): New function, combining the functions of the old xtmpfopen and tempname. All callers changed. Use mkstemp to create the file. (sighandler): On hosts without sigaction, ignore signals while cleaning up, instead of letting them interrupt cleanup. (main): Initialize caught_signals. On hosts with sigaction, block all caught signals while handling one. Remove duplicate code.
Diffstat (limited to 'tests/mv')
0 files changed, 0 insertions, 0 deletions