Browse Source

dracut.sh: strip NUL bytes in stream before push in string

seems like bash-4.4 does not like NUL bytes in variables
master
Harald Hoyer 8 years ago
parent
commit
f0bfada399
  1. 2
      dracut.sh

2
dracut.sh

@ -1622,7 +1622,7 @@ if [[ $do_strip = yes ]] && ! [[ $DRACUT_FIPS_MODE ]]; then
# strip kernel modules, but do not touch signed modules # strip kernel modules, but do not touch signed modules
find "$initdir" -type f -path '*/lib/modules/*.ko' -print0 \ find "$initdir" -type f -path '*/lib/modules/*.ko' -print0 \
| while read -r -d $'\0' f || [ -n "$f" ]; do | while read -r -d $'\0' f || [ -n "$f" ]; do
SIG=$(tail -c 28 "$f") SIG=$(tail -c 28 "$f" | tr -d '\000')
[[ $SIG == '~Module signature appended~' ]] || { printf "%s\000" "$f"; } [[ $SIG == '~Module signature appended~' ]] || { printf "%s\000" "$f"; }
done | xargs -r -0 strip -g done | xargs -r -0 strip -g



Loading…
Cancel
Save