From: Nick Clifton Date: Fri, 5 Feb 2021 14:08:16 +0000 (+0000) Subject: Revert "PR27345, binutils/arsup.c: lstat() not available on all targets" X-Git-Tag: binutils-2_36_1~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=86cb5ea5639c548be39f2a1de9c8bcac45f35121;p=thirdparty%2Fbinutils-gdb.git Revert "PR27345, binutils/arsup.c: lstat() not available on all targets" This reverts commit c0034ac596db89dfb5fa007a63488ad7af555fe9. Given the problems associated with this patch and the others intended to fix the smart_rename CVE, the decision has been taken to revert the patches for the 2.36.1 point release. --- diff --git a/binutils/ChangeLog b/binutils/ChangeLog index a568741661f..c53a4b5eb1e 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,8 +1,3 @@ -2021-02-05 Alan Modra - - PR 27345 - * arsup.c (ar_save): Use stat rather than lstat. - 2021-02-03 Alan Modra PR 27270 diff --git a/binutils/arsup.c b/binutils/arsup.c index fa7706f79e5..a60629f6761 100644 --- a/binutils/arsup.c +++ b/binutils/arsup.c @@ -357,7 +357,7 @@ ar_save (void) #endif bfd_close (obfd); - if (stat (real_name, &target_stat) != 0) + if (lstat (real_name, &target_stat) != 0) { /* The temp file created in ar_open has mode 0600 as per mkstemp. Create the real empty output file here so smart_rename will