Include a mode when creating files with openat().
Reviewed by: asomers Obtained from: CheriBSD MFC after: 1 week Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D20989
This commit is contained in:
parent
ab9ef34e92
commit
f95dfdbe69
@ -73,7 +73,7 @@ ATF_TC_BODY(telldir_after_seekdir, tc)
|
||||
char filename[16];
|
||||
|
||||
snprintf(filename, sizeof(filename), "%d", i);
|
||||
fd = openat(dirfd, filename, O_WRONLY | O_CREAT);
|
||||
fd = openat(dirfd, filename, O_WRONLY | O_CREAT, 0600);
|
||||
ATF_REQUIRE(fd > 0);
|
||||
close(fd);
|
||||
}
|
||||
@ -150,7 +150,7 @@ ATF_TC_BODY(telldir_at_end_of_block, tc)
|
||||
char filename[16];
|
||||
|
||||
snprintf(filename, sizeof(filename), "%d", i);
|
||||
fd = openat(dirfd, filename, O_WRONLY | O_CREAT);
|
||||
fd = openat(dirfd, filename, O_WRONLY | O_CREAT, 0600);
|
||||
ATF_REQUIRE(fd > 0);
|
||||
close(fd);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user