Skip to content

Commit

Permalink
fix(dracut): prevent symbolic links containing //
Browse files Browse the repository at this point in the history
Results in `usr/lib64 -> ..//usr/lib` for Arch Linux otherwise.
  • Loading branch information
haraldh committed May 14, 2021
1 parent 22d6863 commit de0c087
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dracut.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1838,13 +1838,15 @@ fi
if [[ $prefix ]]; then
for d in bin etc lib sbin tmp usr var $libdirs; do
d=${d#/}
[[ $d == */* ]] && continue
ln -sfn "${prefix#/}/${d#/}" "$initdir/$d"
done
fi
if [[ $kernel_only != yes ]]; then
for d in usr usr/bin usr/sbin bin etc lib sbin tmp var var/tmp $libdirs; do
d=${d#/}
[[ -e "${initdir}${prefix}/$d" ]] && continue
if [ -L "/$d" ]; then
inst_symlink "/$d" "${prefix}/$d"
Expand Down

0 comments on commit de0c087

Please sign in to comment.