[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/08: debug-link: Protect against dangling symlinks.
From: |
guix-commits |
Subject: |
02/08: debug-link: Protect against dangling symlinks. |
Date: |
Tue, 17 Jan 2023 10:11:48 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit c4a8762e529dc3f8af89dde5dbcbb82f2a4088a3
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Tue Jan 17 11:22:36 2023 +0100
debug-link: Protect against dangling symlinks.
Fixes <https://issues.guix.gnu.org/60584>.
Reported by Greg Hogan <code@greghogan.com>
and Sébastien Rey-Coyrehourcq <sebastien.rey-coyrehourcq@univ-rouen.fr>.
* guix/build/debug-link.scm (find-elf-files): Wrap 'elf-file?' call in
'catch'.
---
guix/build/debug-link.scm | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/guix/build/debug-link.scm b/guix/build/debug-link.scm
index f3284f74c4..80941df2fc 100644
--- a/guix/build/debug-link.scm
+++ b/guix/build/debug-link.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2018 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2018, 2023 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -175,7 +175,15 @@ directories."
outputs))
(append-map (lambda (directory)
- (filter elf-file?
+ (filter (lambda (file)
+ (catch 'system-error
+ (lambda ()
+ (elf-file? file))
+ (lambda args
+ ;; FILE might be a dangling symlink.
+ (if (= ENOENT (system-error-errno args))
+ #f
+ (apply throw args)))))
(with-error-to-port (%make-void-port "w")
(lambda ()
(find-files directory)))))
- branch master updated (306737c679 -> ecda67a577), guix-commits, 2023/01/17
- 01/08: doc: Use the right cross-reference command., guix-commits, 2023/01/17
- 03/08: gnu: gdcm: Update to 3.0.20., guix-commits, 2023/01/17
- 04/08: gnu: cifs-utils: Update to 7.0 [fixes CVE-2022-27239]., guix-commits, 2023/01/17
- 06/08: gnu: Add swaynotificationcenter, guix-commits, 2023/01/17
- 08/08: gnu: openmw: Use ffmpeg-4., guix-commits, 2023/01/17
- 05/08: gnu: Add raylib., guix-commits, 2023/01/17
- 02/08: debug-link: Protect against dangling symlinks.,
guix-commits <=
- 07/08: gnu: Add bees., guix-commits, 2023/01/17