coverity: #1425770

Insecure temporary file Signed-off-by: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
parent 912ea094
......@@ -2378,8 +2378,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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment