Commit 98a9c1f3 authored by Ivan A. Melnikov's avatar Ivan A. Melnikov Committed by Michael Shigorin

Use correct path for system tar2fs

tar2fs comes from m-p, not from mkimage. Also, we should use $TOPDIR from shell, not $(TOPDIR) from make, when calling it. Note: this is a security fix for environments relying on packaged mkimage-profiles with sudo enabled for the builder user. Fixes: f293239d
parent 4cc5067d
......@@ -23,11 +23,11 @@ check-sudo:
fi
prepare-image: check-sudo
@if [ -x $(MKIMAGE_PREFIX)/bin/tar2fs ]; then \
TOPDIR=$(MKIMAGE_PREFIX); \
@if [ -x /usr/share/mkimage-profiles/bin/tar2fs ]; then \
TOPDIR=/usr/share/mkimage-profiles; \
fi; \
if ! sudo $(TOPDIR)/bin/tar2fs \
"$(VM_TARBALL)" "$(VM_RAWDISK)" $(VM_SIZE) $(VM_FSTYPE); then \
if ! sudo $$TOPDIR/bin/tar2fs \
"$(VM_TARBALL)" "$(VM_RAWDISK)" $(VM_SIZE) $(VM_FSTYPE); then \
echo "** error: sudo tar2fs failed, see build log" >&2; \
exit 1; \
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment