coverity: #1425771

Insecure temporary file Signed-off-by: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
parent f4034841
...@@ -149,13 +149,13 @@ void test_detect_ramfs_rootfs(void) ...@@ -149,13 +149,13 @@ void test_detect_ramfs_rootfs(void)
goto non_test_error; goto non_test_error;
} }
fd1 = mkstemp(tmpf1); fd1 = lxc_make_tmpfile(tmpf1, false);
if (fd1 < 0) { if (fd1 < 0) {
lxc_error("%s\n", "Could not create temporary file."); lxc_error("%s\n", "Could not create temporary file.");
goto non_test_error; goto non_test_error;
} }
fd2 = mkstemp(tmpf2); fd2 = lxc_make_tmpfile(tmpf2, false);
if (fd2 < 0) { if (fd2 < 0) {
lxc_error("%s\n", "Could not create temporary file."); lxc_error("%s\n", "Could not create temporary file.");
goto non_test_error; goto non_test_error;
......
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