The temporary directory is currently created under the current working
directory. That alone isn't ideal but works most of the time. However,
it will fail when the current working directory is not writable. So make
sure the directory is created within TMPDIR.
Fixes: ea00b7d ("kdumpctl: Move temp file in get_kernel_size to global temp
dir")
Signed-off-by: Philipp Rudo <prudo(a)redhat.com>
---
kdumpctl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kdumpctl b/kdumpctl
index 58c18d2..7e561fd 100755
--- a/kdumpctl
+++ b/kdumpctl
@@ -45,7 +45,7 @@ if ! dlog_init; then
exit 1
fi
-KDUMP_TMPDIR=$(mktemp -d kdump.XXXX)
+KDUMP_TMPDIR=$(mktemp --tmpdir -d kdump.XXXX)
trap '
ret=$?;
rm -rf "$KDUMP_TMPDIR"
--
2.41.0