diff options
author | Jim Meyering <jim@meyering.net> | 2001-03-02 02:58:23 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2001-03-02 02:58:23 +0000 |
commit | 2679dfb639f637cd6a0cdb525844e93bce5e8acb (patch) | |
tree | 519a503231d1129f60ad0acea95891a55f361a82 /tests/lang-default | |
parent | 3a960cb7e4a809c0c9d4e5b7302c6503961643ea (diff) | |
download | coreutils-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/lang-default')
0 files changed, 0 insertions, 0 deletions