From 86cb5ea5639c548be39f2a1de9c8bcac45f35121 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Fri, 5 Feb 2021 14:08:16 +0000 Subject: [PATCH] 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. --- binutils/ChangeLog | 5 ----- binutils/arsup.c | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) 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 -- 2.47.2