aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/git-hooks/commit-msg
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2018-10-28 01:45:17 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2018-10-28 01:46:11 -0700
commit806b0d15808cd28a3ab7da7bc038f4b8093dbffa (patch)
tree977249d77c4ae5f8e34d1f5610928b1fc564de78 /scripts/git-hooks/commit-msg
parentbuild: update gnulib submodule to latest (diff)
downloadcoreutils-806b0d15808cd28a3ab7da7bc038f4b8093dbffa.tar.gz
coreutils-806b0d15808cd28a3ab7da7bc038f4b8093dbffa.zip
ln: use linkat and symlinkat
Open a target directory and use its file descriptor in linkat, symlinkat, etc. syscalls, instead of constructing long file names by concatenating the target directory name to a basename. This avoids O(N²) behavior with ‘ln F1 F2 ... Fn DIR’ when DIR is a long file name with many slashes. It also avoids some races if DIR is renamed while ln is running. * bootstrap.conf (gnulib_modules): Add openat-safer. * src/ln.c: Include fcntl-safer.h. (O_PATHSEARCH): New constant. (errno_nonexisting, target_directory_operand): Remove; no longer used. (atomic_link, do_link): New arg DESTDIR_FD. All uses changed. (do_link): New arg DEST_BASE. All uses changed. (main): Open target directory and use its file descriptor as DESTDIR_FD.
Diffstat (limited to 'scripts/git-hooks/commit-msg')
0 files changed, 0 insertions, 0 deletions