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@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"
On Mon, Jun 19, 2023 at 02:31:48PM +0200, Philipp Rudo wrote:
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@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)
Patch merged, thanks!
Reviewed-by: Coiby Xu coxu@redhat.com
trap ' ret=$?; rm -rf "$KDUMP_TMPDIR" -- 2.41.0 _______________________________________________ kexec mailing list -- kexec@lists.fedoraproject.org To unsubscribe send an email to kexec-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue