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
1 changed files with 1 additions and 1 deletions

View File

@ -6932,7 +6932,7 @@ nochange:
}
/* 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) {
/* Overwrite file with same name? */
if (!xconfirm(get_input(messages[MSG_OVERWRITE]))) {