From: Christian Brauner Date: Fri, 15 Jun 2018 09:35:10 +0000 (+0200) Subject: coverity: #1425771 X-Git-Tag: lxc-2.0.10~88 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd11b7ae74c7aa20a20f3bd309f5457425f08170;p=thirdparty%2Flxc.git coverity: #1425771 Insecure temporary file Signed-off-by: Christian Brauner --- diff --git a/src/tests/lxc-test-utils.c b/src/tests/lxc-test-utils.c index caed4b5a7..9a6f0d067 100644 --- a/src/tests/lxc-test-utils.c +++ b/src/tests/lxc-test-utils.c @@ -149,13 +149,13 @@ void test_detect_ramfs_rootfs(void) goto non_test_error; } - fd1 = mkstemp(tmpf1); + fd1 = lxc_make_tmpfile(tmpf1, false); if (fd1 < 0) { lxc_error("%s\n", "Could not create temporary file."); goto non_test_error; } - fd2 = mkstemp(tmpf2); + fd2 = lxc_make_tmpfile(tmpf2, false); if (fd2 < 0) { lxc_error("%s\n", "Could not create temporary file."); goto non_test_error;