]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix Coverity warnings about mkstemp in tests
authorasomers <asomers@FreeBSD.org>
Thu, 16 Aug 2018 21:36:19 +0000 (21:36 +0000)
committerasomers <asomers@FreeBSD.org>
Thu, 16 Aug 2018 21:36:19 +0000 (21:36 +0000)
commit6c56bcb7d1ee7ab186a81925c41b5322cb4eba56
tree588d89a5c886eabdf218f5eedc81f5a99fbb254c
parent0e72f30a06fd5ff818e9a1ae5b978ffdd2517a3e
Fix Coverity warnings about mkstemp in tests

umask(2) should always be used prior to mkstemp(3) so the temporary file
won't be created with insecure permissions.

Reported by: Coverity
CID: 1331605 1347173 1375366 1339800 1331604 1296056 1296060
CID: 1296057 1296062
MFC after: 2 weeks
tests/sys/aio/aio_kqueue_test.c
tests/sys/aio/lio_kqueue_test.c
tests/sys/file/dup_test.c
tests/sys/file/flock_helper.c
tests/sys/kern/kern_copyin.c
tests/sys/kern/pipe/pipe_overcommit2_test.c
tests/sys/kern/ptrace_test.c
tests/sys/kern/unix_passfd_test.c
tests/sys/posixshm/posixshm_test.c