mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-30 13:58:34 +00:00
zdtm/tempfs: set mode for O_CREAT
man 2 open: """ mode specifies the permissions to use in case a new file is cre‐ ated. This argument must be supplied when O_CREAT or O_TMPFILE is specified in flags; """ Cc: Konstantin Neumoin <kneumoin@parallels.com> Signed-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
c7390d2d3f
commit
6694403214
@@ -31,7 +31,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
snprintf(fname, sizeof(buf), "%s/test.file", dirname);
|
||||
fdo = open(fname, O_RDWR | O_CREAT);
|
||||
fdo = open(fname, O_RDWR | O_CREAT, 0644);
|
||||
if (fdo < 0) {
|
||||
err("open failed");
|
||||
goto err;
|
||||
@@ -46,7 +46,7 @@ int main(int argc, char **argv)
|
||||
mkdir(overmount, 0700);
|
||||
|
||||
snprintf(fname, sizeof(buf), "%s/test.file", overmount);
|
||||
fd = open(fname, O_RDWR | O_CREAT);
|
||||
fd = open(fname, O_RDWR | O_CREAT, 0644);
|
||||
if (fd < 0) {
|
||||
err("open failed");
|
||||
goto err;
|
||||
|
Reference in New Issue
Block a user