Skip to content

Commit

Permalink
bin/suid-list: ignore broken symlinks occurring when building Fedora …
Browse files Browse the repository at this point in the history
…images
  • Loading branch information
fishilico committed Jan 20, 2024
1 parent fa10770 commit 25a217c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bin/suid-list
Original file line number Diff line number Diff line change
Expand Up @@ -1070,6 +1070,12 @@ def analyze_files_in(dirname, files):
# * ENOENT when reading symlinks for a kernel thread
if re.match(r'/proc/[0-9]+/', filepath):
continue
# When building a Fodora Live system in /mnt/sysimage,
# /mnt/sysimage/proc/self is broken, so are symlinks:
# /mnt/sysimage/etc/mtab -> ../proc/self/mounts
# /mnt/sysimage/proc/net -> self/net
if filepath.endswith(("/etc/mtab", "/proc/net", "/proc/self")):
continue
raise

if not os.path.exists(realpath):
Expand Down

0 comments on commit 25a217c

Please sign in to comment.