Commit 66944032 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

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: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent c7390d2d
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment