diff options
author | Ján Tomko <jtomko@redhat.com> | 2019-11-18 17:45:54 +0100 |
---|---|---|
committer | Ján Tomko <jtomko@redhat.com> | 2019-11-18 18:49:02 +0100 |
commit | af5aa266ed91c572cba3f61e685094e7078d12b4 (patch) | |
tree | 18909482984f4a90c4928dbe2285ecbec45453ba /tests/virfiletest.c | |
parent | 7909359d600bc079a9de8d586c377076c332a147 (diff) | |
download | libvirt-af5aa266ed91c572cba3f61e685094e7078d12b4.tar.gz |
g_mkstemp_full: pass O_RDWR
This flag is not implied by g_mkstemp_full, only by g_mkstemp.
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reported-by: Bjoern Walk <bwalk@linux.ibm.com>
Fixes: 4ac47730408eaf91683f6502ec10541f4f711a5c
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Diffstat (limited to 'tests/virfiletest.c')
-rw-r--r-- | tests/virfiletest.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/virfiletest.c b/tests/virfiletest.c index 193c5bedd4..781c640e2b 100644 --- a/tests/virfiletest.c +++ b/tests/virfiletest.c @@ -133,7 +133,7 @@ makeSparseFile(const off_t offsets[], off_t len = 0; size_t i; - if ((fd = g_mkstemp_full(path, O_CLOEXEC, S_IRUSR | S_IWUSR)) < 0) + if ((fd = g_mkstemp_full(path, O_RDWR | O_CLOEXEC, S_IRUSR | S_IWUSR)) < 0) goto error; if (unlink(path) < 0) |