From: Arthur Bied-Charreton <a.bied-charreton@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH pve-cluster v4 3/3] Create temporary CSR file in /run instead of /tmp
Date: Tue, 17 Mar 2026 17:53:58 +0100 [thread overview]
Message-ID: <20260317165358.620306-4-a.bied-charreton@proxmox.com> (raw)
In-Reply-To: <20260317165358.620306-1-a.bied-charreton@proxmox.com>
As suggested here [0], creating temp files in a world-writable directory
such as /tmp could expose the config generation to symlink races. Use
the /run/pve-cluster directory instead, which is the rundir created by
the cluster filesystem for this purpose [1].
[0]
https://lore.proxmox.com/pve-devel/20260123195300.0ae7fcc9@rosa.proxmox.com/T/#t
[1]
https://lore.proxmox.com/pve-devel/s8o7brad0e6.fsf@toolbox/
Suggested-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Suggested-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
Signed-off-by: Arthur Bied-Charreton <a.bied-charreton@proxmox.com>
---
src/PVE/Cluster/Setup.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PVE/Cluster/Setup.pm b/src/PVE/Cluster/Setup.pm
index b9cacfd..e718611 100644
--- a/src/PVE/Cluster/Setup.pm
+++ b/src/PVE/Cluster/Setup.pm
@@ -504,7 +504,7 @@ sub gen_pve_ssl_cert {
$names .= ",DNS:$fqdn";
}
- my $reqfn = "/tmp/pvecertreq-$$.tmp";
+ my $reqfn = "/run/pve-cluster/pvecertreq-$$.tmp";
unlink $reqfn;
my $pvessl_key_fn = "$pmxcfs_base_dir/nodes/$nodename/pve-ssl.key";
--
2.47.3
prev parent reply other threads:[~2026-03-17 16:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-17 16:53 [PATCH cluster v4 0/3] fix #6701: Add keyUsage extension to root CA Arthur Bied-Charreton
2026-03-17 16:53 ` [PATCH pve-cluster v4 1/3] " Arthur Bied-Charreton
2026-03-17 16:53 ` [PATCH pve-cluster v4 2/3] setup: Replace temp OpenSSL config file with CLI arguments Arthur Bied-Charreton
2026-03-17 16:53 ` Arthur Bied-Charreton [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260317165358.620306-4-a.bied-charreton@proxmox.com \
--to=a.bied-charreton@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.