From dfb76467c9d9462e91e4dd8838f461fb7ab2538f Mon Sep 17 00:00:00 2001 From: Kairui Song Date: Wed, 4 Aug 2021 16:22:17 +0800 Subject: [PATCH] kdumpctl: fix fragile loops over find output For loops over find output are fragile, use a while read loop: https://github.com/koalaman/shellcheck/wiki/SC2044 Signed-off-by: Kairui Song Acked-by: Philipp Rudo /dev/null) + while IFS= read -r -d '' _i; do + _attr=$(getfattr -m "security.selinux" "$_i" 2>/dev/null) if [ -z "$_attr" ]; then - restorecon $_i; + restorecon "$_i"; fi - done + done < <(find "$_path" -print0) } check_fence_kdump_config()