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:
Brooks Davis 2019-07-18 21:37:50 +00:00
parent ab9ef34e92
commit f95dfdbe69
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=350117

View File

@ -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);
}