]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add missing mode in open(2) calls with O_CREAT.
authorbrooks <brooks@FreeBSD.org>
Tue, 16 Jul 2019 22:27:49 +0000 (22:27 +0000)
committerbrooks <brooks@FreeBSD.org>
Tue, 16 Jul 2019 22:27:49 +0000 (22:27 +0000)
commit9f4a4c59b228c588c6f5ff335c669233db5ca6ed
treee84750ed0b396afd6ba4dd8cc063fd6093841de7
parent92ee47be1e1a244d823047770afc3bbb954e435f
Add missing mode in open(2) calls with O_CREAT.

When O_CREAT is specified, the third, variadic argument is
required as the permission. If on is not passed, then depending
on the ABI, either the contents of the third argument register
or some arbitrary stuff on the stack will be used as the permission.

This has been merged to NetBSD.

Reviewed by: asomers, ngie
Obtained from: CheriBSD
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D20972
contrib/netbsd-tests/lib/libc/gen/t_ftok.c
contrib/netbsd-tests/lib/libc/stdio/t_fopen.c
contrib/netbsd-tests/lib/libc/sys/t_access.c
contrib/netbsd-tests/lib/libc/sys/t_mprotect.c
contrib/netbsd-tests/lib/libc/sys/t_stat.c
contrib/netbsd-tests/lib/libc/sys/t_write.c