Use absolute path /usr/bin/dracut in mkdumprd
Since we call dracut directly on current working directory "." so it is possible to trick root to call fake code. Thus move to use absolute path instead. Signed-off-by: Dave Young <dyoung@redhat.com> Acked-by: Bhupesh Sharma <bhsharma@redhat.com>
This commit is contained in:
parent
823c962ff1
commit
8e3b6475c9
3
mkdumprd
3
mkdumprd
@ -17,6 +17,7 @@ SAVE_PATH=$(grep ^path $conf_file| cut -d' ' -f2)
|
||||
[ -z "$SAVE_PATH" ] && SAVE_PATH=$DEFAULT_PATH
|
||||
# strip the duplicated "/"
|
||||
SAVE_PATH=$(echo $SAVE_PATH | tr -s /)
|
||||
DRACUT_PATH=/usr/bin
|
||||
|
||||
is_wdt_addition_needed() {
|
||||
local active
|
||||
@ -457,7 +458,7 @@ if ! is_fadump_capable; then
|
||||
add_dracut_arg "--no-hostonly-default-device"
|
||||
fi
|
||||
|
||||
dracut "${dracut_args[@]}" "$@"
|
||||
${DRACUT_PATH}/dracut "${dracut_args[@]}" "$@"
|
||||
_rc=$?
|
||||
sync
|
||||
exit $_rc
|
||||
|
Loading…
Reference in New Issue
Block a user