freebsd-skq/lib/libnv/tests
markj 1c1781ccce Ensure that libnv can be used when kern.trap_enotcap=1.
libnv used fcntl(fd, F_GETFL) to test whether fd is a valid file
descriptor.  Aside from being racy, this check requires CAP_FCNTL
rights on fd.  Instead, use fcntl(fd, F_GETFD), which does not require
any capability rights.

Also remove some redundant fd_is_valid() checks to avoid extra system
calls; in many cases we were performing this check immediately before
dup()ing the descriptor.

Reviewed by:	cem, oshogbo (previous version)
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D17963
2018-11-13 20:07:55 +00:00
..
cnv_tests.cc libnv: Remove nvlist argument from cnvlist_{take,free}_* functions. 2018-06-18 21:26:58 +00:00
dnv_tests.cc :dnvlist_get_string__default_value: fix a bogus string comparison test 2017-05-29 19:02:52 +00:00
Makefile libnv: Add nvlist_append_*_array() family of functions. 2018-06-18 22:57:32 +00:00
Makefile.depend DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
nv_array_tests.cc libnv: add regression test for r335344. 2018-06-18 22:22:06 +00:00
nv_tests.cc :nvlist_unpack__duplicate_key : check the result of nvlist_pack(3) 2017-05-29 18:39:28 +00:00
nvlist_add_test.c
nvlist_append_test.c libnv: Add nvlist_append_*_array() family of functions. 2018-06-18 22:57:32 +00:00
nvlist_exists_test.c
nvlist_free_test.c
nvlist_get_test.c
nvlist_move_test.c
nvlist_send_recv_test.c Ensure that libnv can be used when kern.trap_enotcap=1. 2018-11-13 20:07:55 +00:00