From 41668372d22ba5002429fc10adc691a41b72edb8 Mon Sep 17 00:00:00 2001 From: Alexsander Silva de Souza Date: Fri, 1 Dec 2023 11:38:57 -0300 Subject: [PATCH] prevent long UNIX socket paths --- scripts/fuse-nbd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/fuse-nbd b/scripts/fuse-nbd index b1e51b1d..5e904572 100644 --- a/scripts/fuse-nbd +++ b/scripts/fuse-nbd @@ -50,7 +50,7 @@ function mount_part() { mkdir -p "${DEV}" nbdfuse "${DEV}" \ --command nbdkit -s nbd \ - socket="$(pwd)"/qemu-img.sock \ + socket="${TMP_DIR}"/qemu-img.sock \ --filter=partition partition="${PART}" & retries=0 until [ -f "${DEV}/nbd" ]; do @@ -66,7 +66,7 @@ function mount_part() { esac } -qemu-nbd --socket="$(pwd)"/qemu-img.sock \ +qemu-nbd --socket="${TMP_DIR}"/qemu-img.sock \ --format="${IMG_FMT}" \ --shared=10 \ "${PACKER_OUTPUT}" &