Ross Lagerwall 902f6e14fc io: Fix QIOChannelFile when creating and opening read-write
The code wrongly passes the mode to open() only if O_WRONLY is set.
Instead, the mode should be passed when O_CREAT is set (or O_TMPFILE on
Linux). Fix this by always passing the mode since open() will correctly
ignore the mode if it is not needed. Add a testcase which exercises this
bug and also change the existing testcase to check that the mode of the
created file is correct.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2018-02-15 16:54:57 +00:00
..
2018-02-13 18:25:48 +02:00
2017-09-22 10:46:25 +08:00
2018-02-09 05:05:11 +01:00
2018-02-08 09:23:07 +08:00
2016-10-26 08:29:01 -07:00
2017-11-17 18:21:30 +01:00
2017-03-01 11:51:28 +04:00
2017-03-01 11:51:05 +04:00
2017-03-01 11:51:04 +04:00
2017-10-20 13:32:10 +02:00
2017-03-01 11:51:05 +04:00
2018-02-14 10:08:41 +01:00
2017-10-20 13:32:10 +02:00
2018-02-09 05:05:11 +01:00
2017-01-10 08:49:59 -08:00
2018-02-08 09:22:03 +08:00
2017-09-05 22:34:40 +02:00
2017-12-20 22:01:24 +08:00
2018-01-29 14:22:50 -05:00