From: Christian Brauner Date: Fri, 15 Jun 2018 09:40:53 +0000 (+0200) Subject: coverity: #1425792 X-Git-Tag: lxc-2.0.10~86 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f330d8ee264a25548b2527238c495ea4dbf8d434;p=thirdparty%2Flxc.git coverity: #1425792 Insecure temporary file Signed-off-by: Christian Brauner --- diff --git a/src/tests/parse_config_file.c b/src/tests/parse_config_file.c index b61947a28..83d88fa13 100644 --- a/src/tests/parse_config_file.c +++ b/src/tests/parse_config_file.c @@ -32,6 +32,7 @@ #include "confile_utils.h" #include "lxc/state.h" #include "lxctest.h" +#include "utils.h" static int set_get_compare_clear_save_load(struct lxc_container *c, const char *key, const char *value, @@ -170,7 +171,7 @@ int main(int argc, char *argv[]) exit(EXIT_FAILURE); } - fd = mkstemp(tmpf); + fd = lxc_make_tmpfile(tmpf, false); if (fd < 0) { lxc_error("%s\n", "Could not create temporary file"); goto non_test_error;