mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-25 02:04:29 +00:00
coverity: #1425792
Insecure temporary file Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
parent
71261a5c3f
commit
dd5c5a5d68
@ -31,6 +31,7 @@
|
|||||||
#include "confile_utils.h"
|
#include "confile_utils.h"
|
||||||
#include "lxc/state.h"
|
#include "lxc/state.h"
|
||||||
#include "lxctest.h"
|
#include "lxctest.h"
|
||||||
|
#include "utils.h"
|
||||||
|
|
||||||
static int set_get_compare_clear_save_load(struct lxc_container *c,
|
static int set_get_compare_clear_save_load(struct lxc_container *c,
|
||||||
const char *key, const char *value,
|
const char *key, const char *value,
|
||||||
@ -302,7 +303,7 @@ int main(int argc, char *argv[])
|
|||||||
char tmpf[] = "lxc-parse-config-file-XXXXXX";
|
char tmpf[] = "lxc-parse-config-file-XXXXXX";
|
||||||
char retval[4096] = {0};
|
char retval[4096] = {0};
|
||||||
|
|
||||||
fd = mkstemp(tmpf);
|
fd = lxc_make_tmpfile(tmpf, false);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
lxc_error("%s\n", "Could not create temporary file");
|
lxc_error("%s\n", "Could not create temporary file");
|
||||||
exit(fret);
|
exit(fret);
|
||||||
|
Loading…
Reference in New Issue
Block a user