Commit graph

21345 commits

Author SHA1 Message Date
D Scott Phillips
7590d7800c bhyve: support relocating fbuf and passthru data BARs
We want to allow the UEFI firmware to enumerate and assign
addresses to PCI devices so we can boot from NVMe[1]. Address
assignment of PCI BARs is properly handled by the PCI emulation
code in general, but a few specific cases need additional support.
fbuf and passthru map additional objects into the guest physical
address space and so need to handle address updates. Here we add a
callback to emulated PCI devices to inform them of a BAR
configuration change. fbuf and passthru then watch for these BAR
changes and relocate the frame buffer memory segment and passthru
device mmio area respectively.

We also add new VM_MUNMAP_MEMSEG and VM_UNMAP_PPTDEV_MMIO ioctls
to vmm(4) to facilitate the unmapping needed for addres updates.

[1]: https://github.com/freebsd/uefi-edk2/pull/9/

Originally by:	scottph
Sponsored by:	Intel Corporation
Reviewed by:	grehan
Approved by:	philip (mentor)
Differential Revision:	https://reviews.freebsd.org/D24066

(cherry picked from commit f8a6ec2d57)
2021-03-26 21:50:41 +08:00
Alan Somers
2d1c164591 Speed up geom_stats_resync in the presence of many devices
The old code had a O(n) loop, where n is the size of /dev/devstat.
Multiply that by another O(n) loop in devstat_mmap for a total of
O(n^2).

This change adds DIOCGMEDIASIZE support to /dev/devstat so userland can
quickly determine the right amount of memory to map, eliminating the
O(n) loop in userland.

This change decreases the time to run "gstat -bI0.001" with 16,384 md
devices from 29.7s to 4.2s.

Also, fix a memory leak first reported as PR 203097.

Sponsored by:	Axcient
Reviewed by:	mav, imp
Differential Revision:	https://reviews.freebsd.org/D28968

(cherry picked from commit ab63da3564)
2021-03-21 02:23:42 +00:00
Ryan Moeller
534e161747 libifconfig: Overhaul ifconfig_media_* interfaces
Define an ifmedia_t type to use for ifmedia words.

Add ifconfig_media_lookup_* functions to lookup ifmedia words by name.

Get media options as an array of option names rather than formatting it
as a comma-delimited list into a buffer.

Sprinkle const on static the static description tables for peace of
mind.

Don't need to zero memory allocated by calloc.

Reviewed by:	kp
Differential Revision:	https://reviews.freebsd.org/D29029

(cherry picked from commit c4ba4aa547)
2021-03-19 09:00:19 -04:00
Alex Richardson
4b6082c498 atf: Fix ATF_BUILD_* values when not using the bootstrap compiler
Currently, we encode the full path and compile flags for the build
compiler in libatf. However, these values are not correct when
cross-compiling: For example, when I build on macOS, CC is set to the
host path /usr/local/Cellar/llvm/11.0.0_1/bin/clang-11. This path will
not exist on the target system.
Simplify this logic and use cc/cpp/c++ since those binaries will exist
on the target system unless the compiler was explicitly disabled.
I'm not convinced ATF needs to encode these values, but this is a
minimal fix for these tests when using a non-bootstrapped compiler.

Reviewed By:	ngie, brooks
Differential Revision: https://reviews.freebsd.org/D28414

(cherry picked from commit 9b131f1e51)
2021-03-17 12:23:26 +00:00
Alex Richardson
cb83303714 Import atf 0.22 snapshot ca73d08c3fc1ecffc1f1c97458c31ab82c12bb01
This includes improvements to the atf-sh helper functions that
significantly reduce the number of spawned processes for each test
and therefore speeds up running the testsuite noticeably.

(cherry picked from commit c203bd70b5)
2021-03-17 12:21:06 +00:00
Alex Richardson
3b354efec1 Update comment missed in 83ff5d5d98
Reported by:	jrtc27

(cherry picked from commit d4a6843bb1)
2021-03-17 09:54:50 +00:00
Alex Richardson
9ea5cc1453 Un-XFAIL two tests with Clang > 10
SVN r343917 fixed this for in-tree clang, but when building with a newer
out-of-tree clang the test was still marked as XFAIL.

Reviewed By:	dim
Differential Revision: https://reviews.freebsd.org/D28390

(cherry picked from commit 83ff5d5d98)
2021-03-17 09:54:27 +00:00
Alex Richardson
5ccad26529 Don't include libarchive fuzz tests by default
These tests are basic fuzz tests that permute input to trigger crashes
rather than regression or unit tests. Additionally, some of them take a
rather long time to run and should probably be run on a dedicated fuzzing
job instead. Moreover, these simple tests use rand() instead of a real
fuzzing tool that generates interesting inputs (e.g. LLVM libFuzzer) so are
unlikely to find anything interesting when run in CI.

This allows removing one BROKEN_TESTS case due to timeouts and speeds up
running tests on emulated platforms such as QEMU.

Reviewed By:	lwhsu, mm
Differential Revision: https://reviews.freebsd.org/D27153

(cherry picked from commit 3454fa118c)
2021-03-17 09:54:07 +00:00
Alex Richardson
8dc9d6a7b0 libc/qsort: Don't allow interposing recursive calls
This causes problems when using ASAN with a runtime older than 12.0 since
the intercept does not expect qsort() to call itself using an interposable
function call. This results in infinite recursion and stack exhaustion
when a binary compiled with -fsanitize=address calls qsort.
See also https://bugs.llvm.org/show_bug.cgi?id=46832 and
https://reviews.llvm.org/D84509 (ASAN runtime patch).

To prevent this problem, this patch uses a static helper function
for the actual qsort() implementation. This prevents interposition and
allows for direct calls. As a nice side-effect, we can also move the
qsort_s checks to the top-level function and out of the recursive calls.

Reviewed By:	kib
Differential Revision: https://reviews.freebsd.org/D28133

(cherry picked from commit cbcfe28f9d)
2021-03-17 09:46:58 +00:00
Alex Richardson
d37fb0e378 AArch64: Don't set flush-subnormals-to-zero flag on startup
This flag has been set on startup since 65618fdda0.
However, This causes some of the math-related tests to fail as they report
zero instead of a tiny number. This fixes at least
/usr/tests/lib/msun/ldexp_test and possibly others.
Additionally, setting this flag prevents printf() from printing subnormal
numbers in decimal form.
See also https://www.openwall.com/lists/musl/2021/02/26/1

PR:		253847
Reviewed By:	mmel
Differential Revision: https://reviews.freebsd.org/D28938

(cherry picked from commit 0e4ff0acbe)
2021-03-17 09:45:56 +00:00
Alex Richardson
8d42552e7b msun: ctanh/ctanhf: Import fix from musl libc
This applies musl commit b02eed9c4841913d690a2d0029737d72615384fe by
Szabolcs Nagy and updates the tests accordingly. This also allows
removing an XFAIL from the test.

musl commit message:

complex: fix ctanh(+-0+i*nan) and ctanh(+-0+-i*inf)

These cases were incorrect in C11 as described by
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1886.htm

PR: 217528

Reviewed By:	dim
MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D28578

(cherry picked from commit a7b42c4b7f)
2021-03-17 09:44:16 +00:00
Ryan Moeller
4e535a1ba7 lib/flua/libjail: Allow empty params table
The name or jid always gets added to the params, and that's enough to
avoid allocating a 0 length params array.

Reported by:	kevans
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D28778

(cherry picked from commit e175b519a6)
2021-03-14 04:09:20 -04:00
Ryan Moeller
ca459d253f libifconfig: Add a function to get down reason
For use in ifconfig.

Reviewed by:	kp
Differential Revision:	https://reviews.freebsd.org/D28991

(cherry picked from commit b12a960e42)
2021-03-14 04:08:29 -04:00
Ryan Moeller
d63acd26f9 libifconfig: Fix typo in symbol map
(cherry picked from commit 80545a16df)
2021-03-14 04:06:30 -04:00
Ryan Moeller
0fed223973 libifconfig: Set error in ifconfig_get_groups
This should return -1 with OTHER/ENOMEM set in the handle when malloc
fails, like everywhere else in libifconfig.

Reviewed by:	kp
Differential Revision:	https://reviews.freebsd.org/D28964

(cherry picked from commit 1d9ba697f9)
2021-03-14 04:05:01 -04:00
Dimitry Andric
3f684107ef Add a few missed files to libclang_rt.profile-<arch>.a
Otherwise, programs compiled with -fprofile-instr-generate will
encounter undefined symbol errors during linking, for example
__llvm_profile_counter_bias, lprofSetRuntimeCounterRelocation and a few
others were missing from the profile library.

Reported by:	ota@j.email.ne.jp
PR:		254001

(cherry picked from commit 772c631af8)
2021-03-09 21:25:16 +01:00
Dimitry Andric
27e68baf24 Build lib/msun tests with compiler builtins disabled
This forces the compiler to emit calls to libm functions, instead of
possibly substituting pre-calculated results at compile time, which
should help to actually test those functions.

Reviewed by:	emaste, arichardson, ngie
Differential Revision: https://reviews.freebsd.org/D28577

(cherry picked from commit cf97d2a1da)

riscv: Add a soft-float implementation of fabs()

We could just use a C implementation using __builtin_fabs(), but using
this assembly version guarantees that there is no additional prolog/epilog
code. Additionally, clang generates worse code for masking off the top bit
than GCC: https://bugs.llvm.org/show_bug.cgi?id=49377.

This fixes the RISCV64 softfloat world build after cf97d2a1da. That commit
added -fno-builtin to the msun tests which resulted in the first references to
fabs (previously the compiler inlined all calls).

Reviewed By:	dim
Reported by:	mjg
Differential Revision: https://reviews.freebsd.org/D28994

(cherry picked from commit 524b018d20)

riscv: Fix whitespace issues in fabs added in 524b018d20

(cherry picked from commit 066dab17e7)
2021-03-09 21:17:10 +01:00
Brandon Bergren
a79735386c [PowerPC64] Fix multiple issues in fpsetmask().
Building R exposed a problem in fpsetmask() whereby we were not properly
clamping the provided mask to the valid range.

R initilizes the mask by calling fpsetmask(~0) on FreeBSD. Since we
recently enabled precise exceptions, this was causing an immediate
SIGFPE because we were attempting to set invalid bits in the fpscr.

Properly limit the range of bits that can be set via fpsetmask().

While here, use the correct fp_except_t type instead of fp_rnd_t.

Reported by:	pkubaj (in IRC)
Sponsored by:	Tag1 Consulting, Inc.

(cherry picked from commit dd95b39235)
2021-03-08 12:40:11 -06:00
Brandon Bergren
8b96d6ac04 [PowerPC] [PowerPCSPE] Fix multiple issues in fpsetmask().
Building R on powerpc64 exposed a problem in fpsetmask() whereby we
were not properly clamping the provided mask to the valid range.

This same issue affects powerpc and powerpcspe.

Properly limit the range of bits that can be set via fpsetmask().

While here, use the correct fp_except_t type instead of fp_rnd_t.

Reported by:	pkubaj, jhibbits (in IRC)
Sponsored by:	Tag1 Consulting, Inc.

(cherry picked from commit 384ee7cc6e)
2021-03-08 12:39:33 -06:00
Jung-uk Kim
eda8f0575d libkvm: Plug couple of memory leaks and check possible calloc(3) failure
First, r204494 introduced dpcpu_off in struct __kvm and it was allocated
from _kvm_dpcpu_init() but it was not free(3)'ed from kvm_close(3).
Second, r291406 introduced kvm_nlist2(3) and converted kvm_nlist(3) to
use the new function but it did not free the temporary buffer.
Also, check possible calloc(3) failure while I am in the neighborhood.

Differential Revision:	https://reviews.freebsd.org/D29019

(cherry picked from commit 645eaa2cca)
(cherry picked from commit 483c6da3a2)
2021-03-06 14:32:51 -05:00
Konstantin Belousov
6da53183f9 open(2): Remove O_BENEATH and AT_BENEATH
(cherry picked from commit 20e91ca36a)
2021-03-04 21:10:44 +02:00
Konstantin Belousov
efc5f3d454 fhlink(2): the syscalls do not take flag
(cherry picked from commit 600756afb5)
2021-03-04 21:10:39 +02:00
Kyle Evans
c4ccb6d1be jail: allow root to implicitly widen its cpuset to attach
The default behavior for attaching processes to jails is that the jail's
cpuset augments the attaching processes, so that it cannot be used to
escalate a user's ability to take advantage of more CPUs than the
administrator wanted them to.

This is problematic when root needs to manage jails that have disjoint
sets with whatever process is attaching, as this would otherwise result
in a deadlock. Therefore, if we did not have an appropriate common
subset of cpus/domains for our new policy, we now allow the process to
simply take on the jail set *if* it has the privilege to widen its mask
anyways.

With the new logic, root can still usefully cpuset a process that
attaches to a jail with the desire of maintaining the set it was given
pre-attachment while still retaining the ability to manage child jails
without jumping through hoops.

A test has been added to demonstrate the issue; cpuset of a process
down to just the first CPU and attempting to attach to a jail without
access to any of the same CPUs previously resulted in EDEADLK and now
results in taking on the jail's mask for privileged users.

PR:		253724

(cherry picked from commit 60c4ec806d)
2021-03-03 20:04:10 -06:00
Edward Tomasz Napierala
a3576b6207 libc: fix buffer overrun in getrpcport(3)
Reviewed By:	markj
Sponsored by:	NetApp, Inc.
Sponsored by:	Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D27332

(cherry picked from commit 5299d64b2b)
2021-03-02 18:43:26 +00:00
Michael Tuexen
2a9b68d5e1 libsysdecode: fix decoding of TCP_NOPUSH and TCP_MD5SIG
TCP_FASTOPEN_MIN_COOKIE_LEN was incorrectly registered as a name of
a IPPROTO_TCP level socket option, which overwrote TCP_NOPUSH.
TCP_FASTOPEN_PSK_LEN was incorrectly registered as a name of an
IPPROTO_TCP level socket option, which overwrote TCP_MD5SIG.

Sponsored by:	Netflix, Inc.

(cherry picked from commit f25266bee7)
2021-03-02 13:30:24 +01:00
Konstantin Belousov
73dc6674e0 Remove __NO_TLS.
MFC note: this plus the merge of two preliminary removal of __NO_TLS
definitions for mips and risc-v break ABI.  It was decided that doing
ABI break on tier 2 platforms at this stage of 13.0 release process is
better than drag on __NO_TLS presence for the 13.x branch lifetime.

(cherry picked from commit 3ae8d83d04)
2021-03-02 02:49:42 +02:00
Rick Macklem
b96e66349e getdirentries.2: fix for NFS mounts
It was reported that getdirentries(2) was
returning dirents with d_off set to 0 for an NFS
mount.

This is believed to be correct behaviour at
this time (it may change for some NFS mounts
in the future), but is inconsistent with what the
getdirentries(2) man page says.

This patch fixes the man page.

This is a content change.

PR:	253428

(cherry picked from commit a0698341cd)
2021-03-01 13:00:38 -08:00
Guangyuan Yang
12c2780888 pwrite(2): add a BUGS section
Add a BUGS section about using pwrite(2) when O_APPEND is set on the fd.

Submitted by:	Ka Ho Ng <khng300@gmail.com>
Reviewed by:	gbe, yuripv
Differential Revision:	https://reviews.freebsd.org/D28372

(cherry picked from commit 504e64af32)
2021-02-25 06:57:35 +00:00
Mark Johnston
8cf559d6b9 pam_login_access: Fix negative entry matching logic
PR:		252194
Approved by:	so
Security:	CVE-2020-25580
Security:	FreeBSD-SA-21:03.pam_login_access

(cherry picked from commit 6ab923cbca)
2021-02-23 20:20:53 -05:00
Jamie Gritton
5dbb407145 MFC jail: Change both root and working directories in jail_attach(2)
jail_attach(2) performs an internal chroot operation, leaving it up to
the calling process to assure the working directory is inside the jail.

Add a matching internal chdir operation to the jail's root.  Also
ignore kern.chroot_allow_open_directories, and always disallow the
operation if there are any directory descriptors open.

Reported by:    mjg
Approved by:    markj, kib

(cherry picked from commit d4380c0cdd)
2021-02-21 21:49:40 -08:00
Alan Somers
ced29ea4fb libpmc: fix linking with C programs
Revision r334749 Added some C++ code to libpmc.  It didn't change the ABI,
but it did introduce a dependency on libc++.  Nobody noticed because every
program that in the base system that uses libpmc is also C++.

Reported-by:	Dom Dwyer <dom@itsallbroken.com>
Reviewed By:	vangyzen
Differential Revision: https://reviews.freebsd.org/D28550

(cherry picked from commit 04e34c0202)
2021-02-19 17:36:50 -07:00
Dimitry Andric
97232b0dc0 Fix incorrect hypotl(3) result with subnormal numbers
This adjusts the factor used to scale the subnormal numbers, so it
becomes the right value after adjusting its exponent. Thanks to Steve
Kargl for finding the most elegant fix.

Also enable the hypot tests, and add a test case for this bug.

PR:		253313

(cherry picked from commit d3338f3355)

Fix lib/msun/test builds on platforms without 80-bit long doubles

After d3338f3355, the lib/msun test case
'hypotl_near_underflow' would fail to compile on platforms where long
doubles weren't 80 bit, like on x86. Disable this particular test on
such platforms for now.

PR:		253313

(cherry picked from commit 2512066228)
2021-02-18 19:08:27 +01:00
Steve Kargl
7206000232 Fix incorrect powf(3) result with x near 1 and |y| much larger than 1
This adjusts the check to trigger overflow/underflow to a slightly lower
value.

Before: powf(9.999995e-01, -1.342177e+08) -> inf
After:  powf(9.999995e-01, -1.342177e+08) -> 1.858724e+31

(cherry picked from commit 93fc678965)

Add test case for 93fc678965 (incorrect powf(3) result)

This adds the test case to contrib/netbsd-tests/lib/libm/t_pow.c, as it
is currently the only place testing pow(3) and friends.

(cherry picked from commit 51af033287)
2021-02-15 19:08:20 +01:00
Konstantin Belousov
f94e8beadb usleep(3): replace 'process' with 'calling thread'
PR:	253395

(cherry picked from commit 4956af2a8f)
2021-02-14 02:45:49 +02:00
Dimitry Andric
5bc11b95b8 test_inf_inputs: Use atf_tc_expect_fail() instead of atf_tc_skip()
Reviewed By:	lwhsu
Differential Revision: https://reviews.freebsd.org/D28396

(cherry picked from commit 4d2edf3af1)

Fix lib/msun's ctrig_test/test_inf_inputs test case with clang >= 10

This sprinkles a few strategic volatiles in an attempt to defeat clang's
optimization interfering with the expected floating-point exception
flags.

Reported by:	lwhsu
PR:		244732

(cherry picked from commit ac76bc1145)
2021-02-12 21:48:03 +01:00
John Baldwin
6e1fe6d26e Bump shared library versions after ncurses bump in 13.
A few shared libraries in the base system link against ncurses.  An
upgrade from a 12.x host to 13 results in ABI breakage for existing
binaries since the newer versions of these libraries link against the
newer ncurses while the binary itself links against the older ncurses.
For example, dialog4ports built on 12.x sometimes crashes on 13 since
it depends on libdialog which links against ncurses internally.

(cherry picked from commit 0b7f1af804)
2021-02-04 17:51:45 -08:00
Mateusz Guzik
88a580ebee amd64: move memcmp checks upfront
This is a tradeoff which saves jumps for smaller sizes while making
the 8-16 range slower (roughly in line with the other cases).

Tested with glibc test suite.

For example size 3 (most common with vfs namecache) (ops/s):
before:	407086026
after:	461391995

The regressed range of 8-16 (with 8 as example):
before:	540850489
after:	461671032

(cherry picked from commit f1be262ec1)
2021-02-04 17:59:10 +00:00
Mateusz Guzik
068f2402d2 amd64: add a note about simd to libc memset, memmove and memcmp
(cherry picked from commit 0db6aef407)
2021-02-04 17:59:05 +00:00
Mateusz Guzik
8a680912a1 Revert "Reimplement strlen"
This reverts commit 710e45c4b8.

It breaks for some corner cases on big endian ppc64.
Given the stage of the release process it is best to revert for now.

Reported by:	jhibbits

(cherry picked from commit 33f0540b13)
2021-02-03 19:39:49 +00:00
Mateusz Guzik
71b4605138 Drop temporary compat in setproctitle
(cherry picked from commit 46f168bc66)
2021-02-01 12:39:19 +00:00
Mateusz Guzik
3975d4c9e1 amd64: add missing ALIGN_TEXT to loops in memset and memmove
(cherry picked from commit 164c3b8184)
2021-02-01 12:39:18 +00:00
Mateusz Guzik
e5b674594e Reimplement strlen
The previous code neglected to use primitives which can find the end
of the string without having to branch on every character.

While here augment the somewhat misleading commentary -- strlen as
implemented here leaves performance on the table, especially so for
userspace. Every arch should get a dedicated variant instead.

In the meantime this commit lessens the problem.

Tested with glibc test suite.

Naive test just calling strlen in a loop on Haswell (ops/s):

$(perl -e "print 'A' x 3"):
before:	211198039
after:	338626619

$(perl -e "print 'A' x 100"):
before:	83151997
after:	98285919

(cherry picked from commit 710e45c4b8)
2021-02-01 12:39:18 +00:00
Mateusz Guzik
3eae6412b5 libc: try to skip memcpy in _gettemp
(cherry picked from commit b22fdf45ff)
2021-02-01 12:39:15 +00:00
Mateusz Guzik
410994f463 libc: remove open-coded strlen in _gettemp
(cherry picked from commit 6fe328ace8)
2021-02-01 12:39:15 +00:00
Mateusz Guzik
996912046b libc: skip spurious stat in _gettemp
It was only done to catch ENOTDIR, but the kernel already returns the
error where appropriate.

(cherry picked from commit 97a463120b)
2021-02-01 12:39:15 +00:00
Jessica Clarke
bb8fa72dae libllvmminimal: Add missing Support/ABIBreak.cpp
When building natively on RISC-V, linking the bootstrap clang-tblgen
fails with:

  ld: error: undefined symbol: llvm::EnableABIBreakingChecks
  >>> referenced by PrettyStackTrace.cpp
  >>>               PrettyStackTrace.o:(.sdata+0x0) in archive
  /usr/obj/usr/src/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang/libllvmminimal/libllvmminimal.a
  >>> referenced by Signals.cpp
  >>>               Signals.o:(.sdata+0x8) in archive
  /usr/obj/usr/src/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang/libllvmminimal/libllvmminimal.a
  >>> referenced by Timer.cpp
  >>>               Timer.o:(.sdata+0x28) in archive
  /usr/obj/usr/src/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang/libllvmminimal/libllvmminimal.a

This is likely due to Error.h's inclusion of abi-breaking.h. It's
unclear why this only affects RISC-V, but perhaps relates to its more
eager use of .sdata due to the ABI's support for linker relaxations.
Regardless, this is theoretically an issue for all architectures.

Reported by:	Dennis Clarke <dclarke@blastwave.org>

(cherry picked from commit 48397f6c7d)
2021-01-30 14:23:47 +00:00
Kyle Evans
ed05bfceb8 build: remove LIBPTHREAD/LIBTHR build options
WITHOUT_LIBTHR has been broken for a little over five years now, since the
xz 5.2.0 update introduced a hard liblzma dependency on libthr, and building
a useful system without threading support is becoming increasingly more
difficult.

Additionally, in the five plus years that it's been broken more reverse
dependencies have cropped up in libzstd, libsqlite3, and libcrypto (among
others) that make it more and more difficult to reconcile the effort needed
to fix these options.

Remove the broken options.

PR:		252760

(cherry picked from commit 123ae3045d)
(cherry picked from commit 251a6ddfbd)
2021-01-28 19:21:46 -06:00
Mark Johnston
1a05d9519d libcasper/cap_grp tests: Reset the group database handle
Some tests verify that the capgrp capability does not permit calls to
setgrent(3), but all tests need to ensure that they reset the
capability's group database handle, otherwise the local process and
casper process will be out of sync.

The cap_pwd tests already handle this.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 month
2021-01-21 14:30:19 -05:00
Mark Johnston
48a1868634 libc/nss: Ensure that setgroupent(3) actually works as advertised
Because the "files" and "compat" implementations failed to set the
"stayopen", keyed lookups would close the database handle, contrary to
the purpose of setgroupent(3).  setpassent(3)'s implementation does not
have this bug.

PR:		165527
Submitted by:	Andrey Simonenko
MFC after:	1 month
2021-01-21 14:30:19 -05:00
Mark Johnston
6e411d8b14 libc/nss tests: Add regression tests for commit 55444c823e1f
PR:		252094
Sponsored by:	The FreeBSD Foundation
MFC after:	1 month
2021-01-21 14:30:19 -05:00