Skip to content

Commit

Permalink
Fix splitting spaces in paths from statetab files
Browse files Browse the repository at this point in the history
  • Loading branch information
deajan authored Jan 23, 2024
1 parent bfd44b6 commit 534620a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions usr/libexec/readonly-root
Original file line number Diff line number Diff line change
Expand Up @@ -184,17 +184,17 @@ if is_true "$READONLY" || is_true "$TEMPORARY_STATE"; then
mount -n --bind $bindmountopts "$STATE_MOUNT/$file" "$file"
fi

for path in $(grep -v "^#" "$file" 2>/dev/null); do
while read path ; do

Check warning

Code scanning / shellcheck

read without -r will mangle backslashes. Warning

read without -r will mangle backslashes.
mount_state "$path"
selinux_fixup "$path"
done
done < <(grep -v "^#" "$file" 2>/dev/null)
done

if [ -f "$STATE_MOUNT/files" ] ; then
for path in $(grep -v "^#" "$STATE_MOUNT/files" 2>/dev/null); do
while read path ; do

Check warning

Code scanning / shellcheck

read without -r will mangle backslashes. Warning

read without -r will mangle backslashes.
mount_state "$path"
selinux_fixup "$path"
done
done < <(grep -v "^#" "$STATE_MOUNT/files" 2>/dev/null)
fi
fi

Expand Down

0 comments on commit 534620a

Please sign in to comment.