Avoid faccessat(..., AT_SYM_NOFOLLOW) with musl libc

See https://www.openwall.com/lists/musl/2014/09/25/1
This commit is contained in:
Arun Prakash Jana 2021-05-14 02:11:59 +05:30
parent d0b4508798
commit d46918946f
No known key found for this signature in database
GPG key ID: A75979F35C080412

View file

@ -6932,7 +6932,7 @@ nochange:
} }
/* Check if another file with same name exists */ /* Check if another file with same name exists */
if (faccessat(fd, tmp, F_OK, AT_SYMLINK_NOFOLLOW) != -1) { if (fstatat(fd, tmp, &sb, AT_SYMLINK_NOFOLLOW) == 0) {
if (sel == SEL_RENAME) { if (sel == SEL_RENAME) {
/* Overwrite file with same name? */ /* Overwrite file with same name? */
if (!xconfirm(get_input(messages[MSG_OVERWRITE]))) { if (!xconfirm(get_input(messages[MSG_OVERWRITE]))) {