mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-27 09:35:31 +00:00
coverity: #1425770
Insecure temporary file Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
parent
4250ef64b3
commit
c3b818a0b3
@ -2411,8 +2411,11 @@ bool lxc_nic_exists(char *nic)
|
||||
int lxc_make_tmpfile(char *template, bool rm)
|
||||
{
|
||||
int fd, ret;
|
||||
mode_t msk;
|
||||
|
||||
msk = umask(0022);
|
||||
fd = mkstemp(template);
|
||||
umask(msk);
|
||||
if (fd < 0)
|
||||
return -1;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user