From af6d719accb88cfd5682cdd98e259422e93f05e7 Mon Sep 17 00:00:00 2001 From: Axel Burri Date: Wed, 14 Jul 2021 22:16:54 +0200 Subject: [PATCH] btrbk: fix: ignore mount points with unsupported filename in action "ls" Mount points with illegal characters would die in vinfo. Print error and ignore. --- btrbk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/btrbk b/btrbk index 20c8862..6c371c6 100755 --- a/btrbk +++ b/btrbk @@ -5949,6 +5949,12 @@ MAIN: if(($mnt->{fs_type} eq "btrfs") && (($root_path =~ /^\Q$mnt_path\E/) || ($mnt_path =~ /^\Q$root_path\E/))) { + unless(defined(check_file($mnt->{mount_point}, { absolute => 1}))) { + ERROR "Ignoring btrfs mount point (unsupported file name): $mnt->{mount_point}"; + $exit_status = 1; + next; + } + # we know those are real paths, prevents calling readlink in btrfs_mountpoint $realpath_cache{$root_vol->{URL_PREFIX} . $mnt->{mount_point}} = $mnt->{mount_point};