]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r350067:
authorBrooks Davis <brooks@FreeBSD.org>
Wed, 24 Jul 2019 21:39:00 +0000 (21:39 +0000)
committerBrooks Davis <brooks@FreeBSD.org>
Wed, 24 Jul 2019 21:39:00 +0000 (21:39 +0000)
commit7c27ac065661f379385dbf27184c98bf03d04909
tree3a44581ab90ab02e9ed0f47cdbb9a820e5690aba
parenta87c919735ac26b5615eba22e0f200467279d5a3
MFC r350067:

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