]> git.proxmox.com Git - pve-common.git/commit
tempfile: improve base path selection
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 15 Oct 2021 09:23:22 +0000 (11:23 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 15 Oct 2021 09:23:24 +0000 (11:23 +0200)
commit9cccad5e3ed3ca69efbcbf90495b6c26a894caab
tree401701e0e0113681bfd69176ff3726a78afc8708
parent9915a41bb63707bbf29ad9affe14408051441501
tempfile: improve base path selection

The path is not /that/ relevant privacy wise as we try to use
`O_TMPFILE` anyway and defaulting to /run generates trouble for calls
from non-root processes.

Try the user session run dir first, then /run if root or /tmp else.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/Tools.pm