mirror of
https://github.com/opnsense/src.git
synced 2026-03-14 22:53:16 -04:00
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
1 changed files with 2 additions and 2 deletions
|
|
@ -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…
Reference in a new issue