aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/clang/libllvm/Makefile70
-rw-r--r--lib/libc/gen/fts.311
-rw-r--r--lib/libc/gen/fts.c44
-rw-r--r--lib/libc/posix1e/acl_id_to_name.c4
-rw-r--r--lib/libc/posix1e/acl_to_text_nfs4.c4
-rw-r--r--lib/libc/stdlib/rand.310
-rw-r--r--lib/libc/tests/gen/Makefile2
-rw-r--r--lib/libc/tests/gen/fts_children_test.c323
-rw-r--r--lib/libc/tests/gen/fts_open_test.c230
-rw-r--r--lib/libc/tests/gen/fts_options_test.c74
-rw-r--r--lib/libsys/fcntl.24
-rw-r--r--lib/libsys/getsockopt.26
-rw-r--r--lib/libunbound/config.h415
-rw-r--r--lib/libutil/login.conf.59
-rw-r--r--lib/libutil/login_class.c4
15 files changed, 961 insertions, 249 deletions
diff --git a/lib/clang/libllvm/Makefile b/lib/clang/libllvm/Makefile
index 327724bcb52e..ea90b37f8cbd 100644
--- a/lib/clang/libllvm/Makefile
+++ b/lib/clang/libllvm/Makefile
@@ -562,8 +562,8 @@ SRCS_EXT+= DWARFLinker/Parallel/SyntheticTypeNameBuilder.cpp
SRCS_EXT+= DWARFLinker/Utils.cpp
SRCS_EXT+= DWP/DWP.cpp
SRCS_EXT+= DWP/DWPError.cpp
-SRCS_MIW+= DebugInfo/BTF/BTFContext.cpp
-SRCS_MIW+= DebugInfo/BTF/BTFParser.cpp
+SRCS_MIN+= DebugInfo/BTF/BTFContext.cpp
+SRCS_MIN+= DebugInfo/BTF/BTFParser.cpp
SRCS_MIN+= DebugInfo/CodeView/AppendingTypeTableBuilder.cpp
SRCS_MIN+= DebugInfo/CodeView/CVSymbolVisitor.cpp
SRCS_MIN+= DebugInfo/CodeView/CVTypeVisitor.cpp
@@ -607,7 +607,7 @@ SRCS_MIN+= DebugInfo/CodeView/TypeTableCollection.cpp
SRCS_MIN+= DebugInfo/DWARF/DWARFAbbreviationDeclaration.cpp
SRCS_MIN+= DebugInfo/DWARF/DWARFAcceleratorTable.cpp
SRCS_MIN+= DebugInfo/DWARF/DWARFAddressRange.cpp
-SRCS_MIW+= DebugInfo/DWARF/DWARFCFIPrinter.cpp
+SRCS_MIN+= DebugInfo/DWARF/DWARFCFIPrinter.cpp
SRCS_MIN+= DebugInfo/DWARF/DWARFCompileUnit.cpp
SRCS_MIN+= DebugInfo/DWARF/DWARFContext.cpp
SRCS_MIN+= DebugInfo/DWARF/DWARFDebugAbbrev.cpp
@@ -630,11 +630,11 @@ SRCS_MIN+= DebugInfo/DWARF/DWARFListTable.cpp
SRCS_MIN+= DebugInfo/DWARF/DWARFTypeUnit.cpp
SRCS_MIN+= DebugInfo/DWARF/DWARFUnit.cpp
SRCS_MIN+= DebugInfo/DWARF/DWARFUnitIndex.cpp
-SRCS_MIW+= DebugInfo/DWARF/DWARFUnwindTablePrinter.cpp
+SRCS_MIN+= DebugInfo/DWARF/DWARFUnwindTablePrinter.cpp
SRCS_MIN+= DebugInfo/DWARF/DWARFVerifier.cpp
-SRCS_MIW+= DebugInfo/DWARF/LowLevel/DWARFCFIProgram.cpp
+SRCS_MIN+= DebugInfo/DWARF/LowLevel/DWARFCFIProgram.cpp
SRCS_MIN+= DebugInfo/DWARF/LowLevel/DWARFExpression.cpp
-SRCS_MIW+= DebugInfo/DWARF/LowLevel/DWARFUnwindTable.cpp
+SRCS_MIN+= DebugInfo/DWARF/LowLevel/DWARFUnwindTable.cpp
SRCS_MIW+= DebugInfo/GSYM/CallSiteInfo.cpp
SRCS_MIW+= DebugInfo/GSYM/DwarfTransformer.cpp
SRCS_MIW+= DebugInfo/GSYM/ExtractRanges.cpp
@@ -748,8 +748,8 @@ SRCS_EXT+= DebugInfo/PDB/UDTLayout.cpp
SRCS_MIW+= DebugInfo/Symbolize/DIPrinter.cpp
SRCS_MIW+= DebugInfo/Symbolize/Markup.cpp
SRCS_MIW+= DebugInfo/Symbolize/MarkupFilter.cpp
-SRCS_MIW+= DebugInfo/Symbolize/SymbolizableObjectFile.cpp
-SRCS_MIW+= DebugInfo/Symbolize/Symbolize.cpp
+SRCS_MIN+= DebugInfo/Symbolize/SymbolizableObjectFile.cpp
+SRCS_MIN+= DebugInfo/Symbolize/Symbolize.cpp
SRCS_MIW+= Debuginfod/BuildIDFetcher.cpp
SRCS_MIW+= Debuginfod/Debuginfod.cpp
SRCS_MIW+= Debuginfod/HTTPClient.cpp
@@ -1077,28 +1077,28 @@ SRCS_EXT+= MCA/Stages/RetireStage.cpp
SRCS_EXT+= MCA/Stages/Stage.cpp
SRCS_EXT+= MCA/Support.cpp
SRCS_EXT+= MCA/View.cpp
-SRCS_MIW+= ObjCopy/Archive.cpp
-SRCS_MIW+= ObjCopy/COFF/COFFObjcopy.cpp
-SRCS_MIW+= ObjCopy/COFF/COFFObject.cpp
-SRCS_MIW+= ObjCopy/COFF/COFFReader.cpp
-SRCS_MIW+= ObjCopy/COFF/COFFWriter.cpp
-SRCS_MIW+= ObjCopy/CommonConfig.cpp
-SRCS_MIW+= ObjCopy/ConfigManager.cpp
-SRCS_MIW+= ObjCopy/ELF/ELFObjcopy.cpp
-SRCS_MIW+= ObjCopy/ELF/ELFObject.cpp
-SRCS_MIW+= ObjCopy/MachO/MachOLayoutBuilder.cpp
-SRCS_MIW+= ObjCopy/MachO/MachOObjcopy.cpp
-SRCS_MIW+= ObjCopy/MachO/MachOObject.cpp
-SRCS_MIW+= ObjCopy/MachO/MachOReader.cpp
-SRCS_MIW+= ObjCopy/MachO/MachOWriter.cpp
-SRCS_MIW+= ObjCopy/ObjCopy.cpp
-SRCS_MIW+= ObjCopy/XCOFF/XCOFFObjcopy.cpp
-SRCS_MIW+= ObjCopy/XCOFF/XCOFFReader.cpp
-SRCS_MIW+= ObjCopy/XCOFF/XCOFFWriter.cpp
-SRCS_MIW+= ObjCopy/wasm/WasmObjcopy.cpp
-SRCS_MIW+= ObjCopy/wasm/WasmObject.cpp
-SRCS_MIW+= ObjCopy/wasm/WasmReader.cpp
-SRCS_MIW+= ObjCopy/wasm/WasmWriter.cpp
+SRCS_MIN+= ObjCopy/Archive.cpp
+SRCS_MIN+= ObjCopy/COFF/COFFObjcopy.cpp
+SRCS_MIN+= ObjCopy/COFF/COFFObject.cpp
+SRCS_MIN+= ObjCopy/COFF/COFFReader.cpp
+SRCS_MIN+= ObjCopy/COFF/COFFWriter.cpp
+SRCS_MIN+= ObjCopy/CommonConfig.cpp
+SRCS_MIN+= ObjCopy/ConfigManager.cpp
+SRCS_MIN+= ObjCopy/ELF/ELFObjcopy.cpp
+SRCS_MIN+= ObjCopy/ELF/ELFObject.cpp
+SRCS_MIN+= ObjCopy/MachO/MachOLayoutBuilder.cpp
+SRCS_MIN+= ObjCopy/MachO/MachOObjcopy.cpp
+SRCS_MIN+= ObjCopy/MachO/MachOObject.cpp
+SRCS_MIN+= ObjCopy/MachO/MachOReader.cpp
+SRCS_MIN+= ObjCopy/MachO/MachOWriter.cpp
+SRCS_MIN+= ObjCopy/ObjCopy.cpp
+SRCS_MIN+= ObjCopy/XCOFF/XCOFFObjcopy.cpp
+SRCS_MIN+= ObjCopy/XCOFF/XCOFFReader.cpp
+SRCS_MIN+= ObjCopy/XCOFF/XCOFFWriter.cpp
+SRCS_MIN+= ObjCopy/wasm/WasmObjcopy.cpp
+SRCS_MIN+= ObjCopy/wasm/WasmObject.cpp
+SRCS_MIN+= ObjCopy/wasm/WasmReader.cpp
+SRCS_MIN+= ObjCopy/wasm/WasmWriter.cpp
SRCS_MIN+= Object/Archive.cpp
SRCS_MIN+= Object/ArchiveWriter.cpp
SRCS_MIN+= Object/Binary.cpp
@@ -1115,7 +1115,7 @@ SRCS_MIN+= Object/IRObjectFile.cpp
SRCS_MIN+= Object/IRSymtab.cpp
SRCS_MIN+= Object/MachOObjectFile.cpp
SRCS_MIN+= Object/MachOUniversal.cpp
-SRCS_MIW+= Object/MachOUniversalWriter.cpp
+SRCS_MIN+= Object/MachOUniversalWriter.cpp
SRCS_MIN+= Object/Minidump.cpp
SRCS_MIN+= Object/ModuleSymbolTable.cpp
SRCS_EXT+= Object/Object.cpp
@@ -1124,12 +1124,12 @@ SRCS_MIN+= Object/OffloadBinary.cpp
SRCS_MIW+= Object/OffloadBundle.cpp
SRCS_MIN+= Object/RecordStreamer.cpp
SRCS_MIN+= Object/RelocationResolver.cpp
-SRCS_MIW+= Object/SymbolSize.cpp
+SRCS_MIN+= Object/SymbolSize.cpp
SRCS_MIN+= Object/SymbolicFile.cpp
SRCS_MIN+= Object/TapiFile.cpp
SRCS_MIN+= Object/TapiUniversal.cpp
SRCS_MIN+= Object/WasmObjectFile.cpp
-SRCS_MIW+= Object/WindowsMachineFlag.cpp
+SRCS_MIN+= Object/WindowsMachineFlag.cpp
SRCS_MIN+= Object/WindowsResource.cpp
SRCS_MIN+= Object/XCOFFObjectFile.cpp
SRCS_MIN+= ObjectYAML/COFFYAML.cpp
@@ -1298,7 +1298,7 @@ SRCS_MIN+= Support/OptimizedStructLayout.cpp
SRCS_MIN+= Support/OptionStrCmp.cpp
SRCS_MIN+= Support/Optional.cpp
SRCS_MIN+= Support/PGOOptions.cpp
-SRCS_MIW+= Support/Parallel.cpp
+SRCS_MIN+= Support/Parallel.cpp
SRCS_MIN+= Support/Path.cpp
SRCS_MIN+= Support/PluginLoader.cpp
SRCS_MIN+= Support/PrettyStackTrace.cpp
@@ -1849,7 +1849,7 @@ SRCS_MIN+= TextAPI/TextStubCommon.cpp
SRCS_MIN+= TextAPI/TextStubV5.cpp
SRCS_MIN+= TextAPI/Utils.cpp
SRCS_MIN+= ToolDrivers/llvm-dlltool/DlltoolDriver.cpp
-SRCS_MIW+= ToolDrivers/llvm-lib/LibDriver.cpp
+SRCS_MIN+= ToolDrivers/llvm-lib/LibDriver.cpp
SRCS_MIN+= Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp
SRCS_MIN+= Transforms/AggressiveInstCombine/TruncInstCombine.cpp
SRCS_MIN+= Transforms/CFGuard/CFGuard.cpp
diff --git a/lib/libc/gen/fts.3 b/lib/libc/gen/fts.3
index da304e59ee72..b6dbfffe8079 100644
--- a/lib/libc/gen/fts.3
+++ b/lib/libc/gen/fts.3
@@ -25,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd October 6, 2025
+.Dd May 29, 2026
.Dt FTS 3
.Os
.Sh NAME
@@ -497,6 +497,13 @@ field to
and leave the contents of the
.Fa statp
field undefined.
+The roots and any directories encountered during traversal
+.Po
+.Dv FTS_D ,
+.Dv FTS_DC ,
+.Dv FTS_DP
+.Pc
+are still fully populated.
.It Dv FTS_NOSTAT_TYPE
This option is similar to
.Dv FTS_NOSTAT ,
@@ -893,7 +900,7 @@ to an appropriate non-zero value.
The
.Fn fts_set
function returns 0 on success and \-1 if its
-.Fa instr
+.Fa options
argument is invalid.
.Pp
The
diff --git a/lib/libc/gen/fts.c b/lib/libc/gen/fts.c
index 4aa386d777cd..e8063ecb646e 100644
--- a/lib/libc/gen/fts.c
+++ b/lib/libc/gen/fts.c
@@ -41,6 +41,7 @@
#include <fcntl.h>
#include <fts.h>
#include <stdalign.h>
+#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
@@ -114,6 +115,19 @@ static const char *ufslike_filesystems[] = {
0
};
+/*
+ * POSIX provides nlink_t but unfortunately not NLINK_MAX.
+ */
+#define NLINK_MAX \
+ _Generic((nlink_t)0, \
+ int16_t: INT16_MAX, \
+ uint16_t: UINT16_MAX, \
+ int32_t: INT32_MAX, \
+ uint32_t: UINT32_MAX, \
+ int64_t: INT64_MAX, \
+ uint64_t: UINT64_MAX, \
+ default: 0)
+
static FTS *
__fts_open(FTS *sp, char * const *argv)
{
@@ -736,7 +750,7 @@ fts_build(FTS *sp, int type)
int cderrno, descend, oflag, saved_errno, nostat, doadjust,
readdir_errno;
long level;
- long nlinks; /* has to be signed because -1 is a magic value */
+ int64_t nlinks; /* has to be signed because -1 is a magic value */
size_t dnamlen, len, maxlen, nitems;
/* Set current node pointer. */
@@ -759,16 +773,36 @@ fts_build(FTS *sp, int type)
}
/*
- * Nlinks is the number of possible entries of type directory in the
- * directory if we're cheating on stat calls, 0 if we're not doing
- * any stat calls at all, -1 if we're doing stats on everything.
+ * In the FTS_PHYSICAL | FTS_NOSTAT case, we want to avoid calling
+ * fstat() unnecessarily, but we still need to call it for
+ * subdirectories. The current directory's link count provides an
+ * upper bound on the number of subdirectories we may encounter
+ * (including . and .. in the FTS_SEEDOT case). We initialize
+ * nlinks to the current directory's link count, then decrement it
+ * every time we encounter a directory, so when we hit zero we can
+ * save some time by not calling fstat() on subsequent entries.
+ *
+ * If FTS_NOSTAT is not set, or the link count is less than two
+ * (which should not be possible) or equal to NLINK_MAX (which
+ * suggests that the actual value could be higher), or the current
+ * filesystem is not known to provide reliable link counts, we
+ * initialize nlinks to -1 and fstat() everything.
+ *
+ * In the rare case where we don't need to stat anything, even
+ * subdirectories, we initialize nlinks to 0 regardless of the
+ * actual link count.
+ *
+ * Note that we ignore the FTS_NOSTAT flag in the FTS_LOGICAL
+ * case, although we could choose to only stat symbolic links.
+ * Implementing this is left as an exercise for the reader.
*/
if (type == BNAMES) {
nlinks = 0;
/* Be quiet about nostat, GCC. */
nostat = 0;
} else if (ISSET(FTS_NOSTAT) && ISSET(FTS_PHYSICAL)) {
- if (fts_ufslinks(sp, cur))
+ if (cur->fts_nlink >= 2 && cur->fts_nlink < NLINK_MAX &&
+ cur->fts_nlink <= INT64_MAX && fts_ufslinks(sp, cur))
nlinks = cur->fts_nlink - (ISSET(FTS_SEEDOT) ? 0 : 2);
else
nlinks = -1;
diff --git a/lib/libc/posix1e/acl_id_to_name.c b/lib/libc/posix1e/acl_id_to_name.c
index 78e050a8648a..c90e6083cca1 100644
--- a/lib/libc/posix1e/acl_id_to_name.c
+++ b/lib/libc/posix1e/acl_id_to_name.c
@@ -67,7 +67,7 @@ _posix1e_acl_id_to_name(acl_tag_t tag, uid_t id, ssize_t buf_len, char *buf,
else
p = getpwuid(id);
if (!p)
- i = snprintf(buf, buf_len, "%d", id);
+ i = snprintf(buf, buf_len, "%ju", (uintmax_t)id);
else
i = snprintf(buf, buf_len, "%s", p->pw_name);
@@ -83,7 +83,7 @@ _posix1e_acl_id_to_name(acl_tag_t tag, uid_t id, ssize_t buf_len, char *buf,
else
g = getgrgid(id);
if (g == NULL)
- i = snprintf(buf, buf_len, "%d", id);
+ i = snprintf(buf, buf_len, "%ju", (uintmax_t)id);
else
i = snprintf(buf, buf_len, "%s", g->gr_name);
diff --git a/lib/libc/posix1e/acl_to_text_nfs4.c b/lib/libc/posix1e/acl_to_text_nfs4.c
index 157215c9dd52..4f19f3a9a7b2 100644
--- a/lib/libc/posix1e/acl_to_text_nfs4.c
+++ b/lib/libc/posix1e/acl_to_text_nfs4.c
@@ -69,7 +69,7 @@ format_who(char *str, size_t size, const acl_entry_t entry, int numeric)
else
pwd = NULL;
if (pwd == NULL)
- snprintf(str, size, "user:%d", (unsigned int)*id);
+ snprintf(str, size, "user:%ju", (uintmax_t)*id);
else
snprintf(str, size, "user:%s", pwd->pw_name);
acl_free(id);
@@ -89,7 +89,7 @@ format_who(char *str, size_t size, const acl_entry_t entry, int numeric)
else
grp = NULL;
if (grp == NULL)
- snprintf(str, size, "group:%d", (unsigned int)*id);
+ snprintf(str, size, "group:%ju", (uintmax_t)*id);
else
snprintf(str, size, "group:%s", grp->gr_name);
acl_free(id);
diff --git a/lib/libc/stdlib/rand.3 b/lib/libc/stdlib/rand.3
index 33eaa191b4fe..200e770b6daf 100644
--- a/lib/libc/stdlib/rand.3
+++ b/lib/libc/stdlib/rand.3
@@ -29,24 +29,24 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd February 1, 2020
+.Dd May 30, 2026
.Dt RAND 3
.Os
.Sh NAME
.Nm rand ,
-.Nm srand ,
-.Nm rand_r
+.Nm rand_r ,
+.Nm srand
.Nd bad random number generator
.Sh LIBRARY
.Lb libc
.Sh SYNOPSIS
.In stdlib.h
-.Ft void
-.Fn srand "unsigned seed"
.Ft int
.Fn rand void
.Ft int
.Fn rand_r "unsigned *ctx"
+.Ft void
+.Fn srand "unsigned seed"
.Sh DESCRIPTION
.Bf -symbolic
The functions described in this manual page are not cryptographically
diff --git a/lib/libc/tests/gen/Makefile b/lib/libc/tests/gen/Makefile
index 054b1b426b3d..9341fe8c9074 100644
--- a/lib/libc/tests/gen/Makefile
+++ b/lib/libc/tests/gen/Makefile
@@ -10,7 +10,9 @@ ATF_TESTS_C+= fpclassify2_test
.if ${COMPILER_FEATURES:Mblocks}
ATF_TESTS_C+= fts_blocks_test
.endif
+ATF_TESTS_C+= fts_children_test
ATF_TESTS_C+= fts_misc_test
+ATF_TESTS_C+= fts_open_test
ATF_TESTS_C+= fts_options_test
ATF_TESTS_C+= ftw_test
ATF_TESTS_C+= getentropy_test
diff --git a/lib/libc/tests/gen/fts_children_test.c b/lib/libc/tests/gen/fts_children_test.c
new file mode 100644
index 000000000000..171b1227104c
--- /dev/null
+++ b/lib/libc/tests/gen/fts_children_test.c
@@ -0,0 +1,323 @@
+/*
+ * Copyright (c) 2026 Jitendra Bhati
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+/*
+ * Tests for fts_children().
+ */
+
+#include <sys/stat.h>
+
+#include <errno.h>
+#include <fcntl.h>
+#include <fts.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include <atf-c.h>
+
+#include "fts_test.h"
+
+/*
+ * fts_children() before fts_read() returns the list of root entries.
+ */
+ATF_TC(before_read);
+ATF_TC_HEAD(before_read, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "fts_children before fts_read returns root entry list");
+}
+ATF_TC_BODY(before_read, tc)
+{
+ char *paths[] = { "dir", NULL };
+ FTS *fts;
+ FTSENT *children, *p;
+ int count;
+
+ ATF_REQUIRE_EQ(0, mkdir("dir", 0755));
+ ATF_REQUIRE_EQ(0, close(creat("dir/a", 0644)));
+
+ ATF_REQUIRE((fts = fts_open(paths, FTS_PHYSICAL, NULL)) != NULL);
+
+ errno = 0;
+ children = fts_children(fts, 0);
+ ATF_REQUIRE_MSG(children != NULL,
+ "fts_children before fts_read must return the root list");
+ ATF_CHECK_EQ(0, errno);
+
+ count = 0;
+ for (p = children; p != NULL; p = p->fts_link) {
+ ATF_CHECK_EQ_MSG(FTS_D, p->fts_info,
+ "root entry should be FTS_D, got %d", p->fts_info);
+ count++;
+ }
+ ATF_CHECK_EQ_MSG(1, count,
+ "expected 1 root entry, found %d", count);
+
+ ATF_REQUIRE_EQ_MSG(0, fts_close(fts), "fts_close(): %m");
+}
+
+/*
+ * fts_children() on an empty directory returns NULL with errno == 0.
+ * errno=0 distinguishes "empty" from an actual error.
+ */
+ATF_TC(empty_dir);
+ATF_TC_HEAD(empty_dir, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "fts_children on empty directory returns NULL with errno 0");
+}
+ATF_TC_BODY(empty_dir, tc)
+{
+ char *paths[] = { "dir", NULL };
+ FTS *fts;
+ FTSENT *ent, *children;
+
+ ATF_REQUIRE_EQ(0, mkdir("dir", 0755));
+
+ ATF_REQUIRE((fts = fts_open(paths, FTS_PHYSICAL, NULL)) != NULL);
+
+ ent = fts_read(fts);
+ ATF_REQUIRE(ent != NULL);
+ ATF_REQUIRE_EQ_MSG(FTS_D, ent->fts_info,
+ "expected FTS_D, got %d", ent->fts_info);
+
+ errno = 1; /* sentinel — fts_children must clear this */
+ children = fts_children(fts, 0);
+ ATF_CHECK_MSG(children == NULL,
+ "fts_children on empty dir must return NULL");
+ ATF_CHECK_EQ_MSG(0, errno,
+ "fts_children on empty dir must set errno=0, got %d", errno);
+
+ ATF_REQUIRE_EQ_MSG(0, fts_close(fts), "fts_close(): %m");
+}
+
+/*
+ * fts_children() on a non-empty directory returns a linked list of all
+ * children in comparator order.
+ */
+ATF_TC(nonempty_dir);
+ATF_TC_HEAD(nonempty_dir, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "fts_children on non-empty directory returns all children");
+}
+ATF_TC_BODY(nonempty_dir, tc)
+{
+ static const char *expected[] = { "a", "b", "c", NULL };
+ char *paths[] = { "dir", NULL };
+ FTS *fts;
+ FTSENT *ent, *children, *p;
+ int i;
+
+ ATF_REQUIRE_EQ(0, mkdir("dir", 0755));
+ ATF_REQUIRE_EQ(0, close(creat("dir/a", 0644)));
+ ATF_REQUIRE_EQ(0, close(creat("dir/b", 0644)));
+ ATF_REQUIRE_EQ(0, close(creat("dir/c", 0644)));
+
+ ATF_REQUIRE((fts = fts_open(paths, FTS_PHYSICAL,
+ fts_lexical_compar)) != NULL);
+
+ ent = fts_read(fts);
+ ATF_REQUIRE(ent != NULL);
+ ATF_REQUIRE_EQ(FTS_D, ent->fts_info);
+
+ children = fts_children(fts, 0);
+ ATF_REQUIRE_MSG(children != NULL, "fts_children(): %m");
+
+ i = 0;
+ for (p = children; p != NULL; p = p->fts_link, i++) {
+ ATF_REQUIRE_MSG(expected[i] != NULL,
+ "more children returned than expected");
+ ATF_CHECK_STREQ(expected[i], p->fts_name);
+ ATF_CHECK_EQ(FTS_F, p->fts_info);
+ }
+ ATF_CHECK_MSG(expected[i] == NULL,
+ "fewer children returned than expected");
+
+ ATF_REQUIRE_EQ_MSG(0, fts_close(fts), "fts_close(): %m");
+}
+
+/*
+ * fts_children() called twice on the same FTS_D node must return an
+ * equivalent list both times.
+ */
+ATF_TC(called_twice);
+ATF_TC_HEAD(called_twice, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "fts_children called twice returns equivalent results");
+}
+ATF_TC_BODY(called_twice, tc)
+{
+ char *paths[] = { "dir", NULL };
+ FTS *fts;
+ FTSENT *ent, *first, *second, *p;
+ int count1, count2;
+
+ ATF_REQUIRE_EQ(0, mkdir("dir", 0755));
+ ATF_REQUIRE_EQ(0, close(creat("dir/x", 0644)));
+ ATF_REQUIRE_EQ(0, close(creat("dir/y", 0644)));
+
+ ATF_REQUIRE((fts = fts_open(paths, FTS_PHYSICAL,
+ fts_lexical_compar)) != NULL);
+
+ ent = fts_read(fts);
+ ATF_REQUIRE(ent != NULL);
+ ATF_REQUIRE_EQ(FTS_D, ent->fts_info);
+
+ first = fts_children(fts, 0);
+ ATF_REQUIRE_MSG(first != NULL, "first fts_children call: %m");
+
+ count1 = 0;
+ for (p = first; p != NULL; p = p->fts_link)
+ count1++;
+
+ /*
+ * The second call frees the first list and rebuilds. Do not
+ * dereference 'first' after this point — it has been freed.
+ */
+ second = fts_children(fts, 0);
+ ATF_REQUIRE_MSG(second != NULL, "second fts_children call: %m");
+
+ count2 = 0;
+ for (p = second; p != NULL; p = p->fts_link)
+ count2++;
+
+ ATF_CHECK_EQ_MSG(count1, count2,
+ "first call returned %d children, second returned %d",
+ count1, count2);
+ ATF_CHECK_EQ(2, count2);
+
+ ATF_REQUIRE_EQ_MSG(0, fts_close(fts), "fts_close(): %m");
+}
+
+/*
+ * fts_children(FTS_NAMEONLY): only fts_name and fts_namelen are filled.
+ * fts_info is FTS_NSOK for every entry.
+ */
+ATF_TC(nameonly);
+ATF_TC_HEAD(nameonly, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "FTS_NAMEONLY fills only fts_name, fts_info is FTS_NSOK");
+}
+ATF_TC_BODY(nameonly, tc)
+{
+ char *paths[] = { "dir", NULL };
+ FTS *fts;
+ FTSENT *ent, *children, *p;
+ int count;
+
+ ATF_REQUIRE_EQ(0, mkdir("dir", 0755));
+ ATF_REQUIRE_EQ(0, close(creat("dir/f1", 0644)));
+ ATF_REQUIRE_EQ(0, close(creat("dir/f2", 0644)));
+
+ ATF_REQUIRE((fts = fts_open(paths, FTS_PHYSICAL,
+ fts_lexical_compar)) != NULL);
+
+ ent = fts_read(fts);
+ ATF_REQUIRE(ent != NULL);
+ ATF_REQUIRE_EQ(FTS_D, ent->fts_info);
+
+ children = fts_children(fts, FTS_NAMEONLY);
+ ATF_REQUIRE_MSG(children != NULL, "fts_children(FTS_NAMEONLY): %m");
+
+ count = 0;
+ for (p = children; p != NULL; p = p->fts_link) {
+ ATF_CHECK_MSG(p->fts_name[0] != '\0',
+ "FTS_NAMEONLY: fts_name is empty");
+ ATF_CHECK_EQ(strlen(p->fts_name), p->fts_namelen);
+ ATF_CHECK_EQ_MSG(FTS_NSOK, p->fts_info,
+ "FTS_NAMEONLY: expected FTS_NSOK, got %d", p->fts_info);
+ count++;
+ }
+ ATF_CHECK_EQ(2, count);
+
+ /* Normal traversal must still work after FTS_NAMEONLY. */
+ while (fts_read(fts) != NULL)
+ ;
+ ATF_CHECK_EQ_MSG(0, errno,
+ "traversal after FTS_NAMEONLY ended with errno %d", errno);
+
+ ATF_REQUIRE_EQ_MSG(0, fts_close(fts), "fts_close(): %m");
+}
+
+/*
+ * fts_children() on a non-directory node must return NULL with errno == 0.
+ */
+ATF_TC(nondirectory);
+ATF_TC_HEAD(nondirectory, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "fts_children on a non-directory node returns NULL with errno 0");
+}
+ATF_TC_BODY(nondirectory, tc)
+{
+ char *paths[] = { "dir", NULL };
+ FTS *fts;
+ FTSENT *ent;
+
+ ATF_REQUIRE_EQ(0, mkdir("dir", 0755));
+ ATF_REQUIRE_EQ(0, close(creat("dir/file", 0644)));
+
+ ATF_REQUIRE((fts = fts_open(paths, FTS_PHYSICAL,
+ fts_lexical_compar)) != NULL);
+
+ ent = fts_read(fts); /* FTS_D dir */
+ ATF_REQUIRE(ent != NULL);
+ ATF_REQUIRE_EQ(FTS_D, ent->fts_info);
+
+ ent = fts_read(fts); /* FTS_F file */
+ ATF_REQUIRE(ent != NULL);
+ ATF_REQUIRE_EQ(FTS_F, ent->fts_info);
+
+ errno = 1;
+ ATF_CHECK_MSG(fts_children(fts, 0) == NULL,
+ "fts_children on FTS_F must return NULL");
+ ATF_CHECK_EQ_MSG(0, errno,
+ "fts_children on FTS_F must set errno=0, got %d", errno);
+
+ ATF_REQUIRE_EQ_MSG(0, fts_close(fts), "fts_close(): %m");
+}
+
+/*
+ * fts_children() with an invalid options value must return NULL with
+ * errno == EINVAL.
+ */
+ATF_TC(invalid_options);
+ATF_TC_HEAD(invalid_options, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "fts_children with invalid options returns NULL with EINVAL");
+}
+ATF_TC_BODY(invalid_options, tc)
+{
+ char *paths[] = { ".", NULL };
+ FTS *fts;
+
+ ATF_REQUIRE((fts = fts_open(paths, FTS_PHYSICAL, NULL)) != NULL);
+
+ ATF_REQUIRE_ERRNO(EINVAL, fts_children(fts, 99) == NULL);
+
+ ATF_REQUIRE_EQ_MSG(0, fts_close(fts), "fts_close(): %m");
+}
+
+ATF_TP_ADD_TCS(tp)
+{
+ fts_check_debug();
+ ATF_TP_ADD_TC(tp, before_read);
+ ATF_TP_ADD_TC(tp, empty_dir);
+ ATF_TP_ADD_TC(tp, nonempty_dir);
+ ATF_TP_ADD_TC(tp, called_twice);
+ ATF_TP_ADD_TC(tp, nameonly);
+ ATF_TP_ADD_TC(tp, nondirectory);
+ ATF_TP_ADD_TC(tp, invalid_options);
+
+ return (atf_no_error());
+}
diff --git a/lib/libc/tests/gen/fts_open_test.c b/lib/libc/tests/gen/fts_open_test.c
new file mode 100644
index 000000000000..e6120b09006b
--- /dev/null
+++ b/lib/libc/tests/gen/fts_open_test.c
@@ -0,0 +1,230 @@
+/*
+ * Copyright (c) 2026 Jitendra Bhati
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+/*
+ * Tests for fts_open() error conditions and edge cases.
+ */
+
+#include <sys/stat.h>
+
+#include <errno.h>
+#include <fcntl.h>
+#include <fts.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include <atf-c.h>
+
+#include "fts_test.h"
+
+/*
+ * Option bits outside FTS_OPTIONMASK must fail with EINVAL.
+ */
+ATF_TC(invalid_options);
+ATF_TC_HEAD(invalid_options, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "fts_open with out-of-mask option bits fails with EINVAL");
+}
+ATF_TC_BODY(invalid_options, tc)
+{
+ char *paths[] = { ".", NULL };
+
+ ATF_REQUIRE_ERRNO(EINVAL, fts_open(paths, 0x10000, NULL) == NULL);
+}
+
+/*
+ * Empty argv (NULL as first element) must fail with EINVAL.
+ */
+ATF_TC(empty_argv);
+ATF_TC_HEAD(empty_argv, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "fts_open with NULL first argv element fails with EINVAL");
+}
+ATF_TC_BODY(empty_argv, tc)
+{
+ char *paths[] = { NULL };
+
+ ATF_REQUIRE_ERRNO(EINVAL,
+ fts_open(paths, FTS_PHYSICAL, NULL) == NULL);
+}
+
+/*
+ * An empty string in argv is a valid path but stat("") fails with ENOENT.
+ * fts_open() succeeds; the resulting FTSENT has fts_info == FTS_NS and
+ * fts_errno == ENOENT.
+ */
+ATF_TC(empty_path_string);
+ATF_TC_HEAD(empty_path_string, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "empty string in argv produces FTS_NS entry");
+}
+ATF_TC_BODY(empty_path_string, tc)
+{
+ char *paths[] = { "", NULL };
+ FTS *fts;
+ FTSENT *ent;
+
+ ATF_REQUIRE((fts = fts_open(paths, FTS_PHYSICAL, NULL)) != NULL);
+
+ ent = fts_read(fts);
+ ATF_REQUIRE(ent != NULL);
+ ATF_CHECK_EQ(FTS_NS, ent->fts_info);
+ ATF_CHECK_EQ(ENOENT, ent->fts_errno);
+
+ fts_close(fts);
+}
+
+/*
+ * A nonexistent path produces an FTS_NS entry rather than causing
+ * fts_open() itself to fail. fts_open() does not validate whether
+ * paths exist. errno must be 0 after the traversal ends normally.
+ */
+ATF_TC(nonexistent_path);
+ATF_TC_HEAD(nonexistent_path, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "nonexistent path produces FTS_NS entry, not fts_open failure");
+}
+ATF_TC_BODY(nonexistent_path, tc)
+{
+ char *paths[] = { "this-path-does-not-exist", NULL };
+ FTS *fts;
+ FTSENT *ent;
+
+ ATF_REQUIRE((fts = fts_open(paths, FTS_PHYSICAL, NULL)) != NULL);
+
+ ent = fts_read(fts);
+ ATF_REQUIRE(ent != NULL);
+ ATF_CHECK_EQ(FTS_NS, ent->fts_info);
+ ATF_CHECK_EQ(ENOENT, ent->fts_errno);
+
+ /*
+ * Next fts_read must return NULL with errno == 0 —
+ * end-of-traversal, not an error.
+ */
+ errno = 1; /* sentinel — fts_read must clear this */
+ ATF_CHECK_EQ(NULL, fts_read(fts));
+ ATF_CHECK_EQ(0, errno);
+
+ ATF_REQUIRE_EQ_MSG(0, fts_close(fts), "fts_close(): %m");
+}
+
+/*
+ * A path with a trailing slash must not crash and must traverse the
+ * directory normally. This is a regression test for SVN r49851.
+ */
+ATF_TC(trailing_slash);
+ATF_TC_HEAD(trailing_slash, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "trailing slash on root path must not crash (SVN r49851)");
+}
+ATF_TC_BODY(trailing_slash, tc)
+{
+ char *paths[] = { "dir/", NULL };
+ FTS *fts;
+ FTSENT *ent;
+ int seen_dir, seen_file;
+
+ ATF_REQUIRE_EQ(0, mkdir("dir", 0755));
+ ATF_REQUIRE_EQ(0, close(creat("dir/file", 0644)));
+
+ ATF_REQUIRE((fts = fts_open(paths, FTS_PHYSICAL, NULL)) != NULL);
+
+ seen_dir = 0;
+ seen_file = 0;
+ while ((ent = fts_read(fts)) != NULL) {
+ if (ent->fts_info == FTS_D || ent->fts_info == FTS_DP)
+ seen_dir = 1;
+ if (ent->fts_info == FTS_F)
+ seen_file = 1;
+ }
+
+ ATF_CHECK_EQ_MSG(0, errno,
+ "fts_read loop should end with errno 0, not %d", errno);
+ ATF_CHECK_MSG(seen_dir != 0, "directory was never visited");
+ ATF_CHECK_MSG(seen_file != 0, "file inside dir was never visited");
+
+ ATF_REQUIRE_EQ_MSG(0, fts_close(fts), "fts_close(): %m");
+}
+
+/*
+ * An unreadable directory must produce FTS_D then FTS_DNR. It must NOT
+ * produce FTS_DP because fts never successfully entered it.
+ *
+ * Requires an unprivileged user because root ignores directory permissions.
+ */
+ATF_TC(unreadable_dir);
+ATF_TC_HEAD(unreadable_dir, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "unreadable directory yields FTS_D then FTS_DNR, never FTS_DP");
+ atf_tc_set_md_var(tc, "require.user", "unprivileged");
+}
+ATF_TC_BODY(unreadable_dir, tc)
+{
+ ATF_REQUIRE_EQ(0, mkdir("unr", 0000));
+ fts_test(tc, &(struct fts_testcase){
+ (char *[]){ "unr", NULL },
+ FTS_PHYSICAL,
+ (struct fts_expect[]){
+ { FTS_D, "unr", "unr" },
+ { FTS_DNR, "unr", "unr" },
+ { 0 }
+ },
+ });
+}
+
+/*
+ * Multiple root paths must all be visited left-to-right, each tree
+ * traversed completely before moving to the next root.
+ */
+ATF_TC(multiple_roots);
+ATF_TC_HEAD(multiple_roots, tc)
+{
+ atf_tc_set_md_var(tc, "descr",
+ "fts_open visits multiple root paths left-to-right");
+}
+ATF_TC_BODY(multiple_roots, tc)
+{
+ ATF_REQUIRE_EQ(0, mkdir("a", 0755));
+ ATF_REQUIRE_EQ(0, mkdir("b", 0755));
+ ATF_REQUIRE_EQ(0, close(creat("a/x", 0644)));
+ ATF_REQUIRE_EQ(0, close(creat("b/y", 0644)));
+
+ fts_test(tc, &(struct fts_testcase){
+ (char *[]){ "a", "b", NULL },
+ FTS_PHYSICAL,
+ (struct fts_expect[]){
+ { FTS_D, "a", "a" },
+ { FTS_F, "x", "x" },
+ { FTS_DP, "a", "a" },
+ { FTS_D, "b", "b" },
+ { FTS_F, "y", "y" },
+ { FTS_DP, "b", "b" },
+ { 0 }
+ },
+ });
+}
+
+ATF_TP_ADD_TCS(tp)
+{
+ fts_check_debug();
+ ATF_TP_ADD_TC(tp, invalid_options);
+ ATF_TP_ADD_TC(tp, empty_argv);
+ ATF_TP_ADD_TC(tp, empty_path_string);
+ ATF_TP_ADD_TC(tp, nonexistent_path);
+ ATF_TP_ADD_TC(tp, trailing_slash);
+ ATF_TP_ADD_TC(tp, unreadable_dir);
+ ATF_TP_ADD_TC(tp, multiple_roots);
+
+ return (atf_no_error());
+}
diff --git a/lib/libc/tests/gen/fts_options_test.c b/lib/libc/tests/gen/fts_options_test.c
index fc3015138a49..863c0809d16e 100644
--- a/lib/libc/tests/gen/fts_options_test.c
+++ b/lib/libc/tests/gen/fts_options_test.c
@@ -36,6 +36,8 @@ fts_options_prepare(const struct atf_tc *tc)
ATF_REQUIRE_EQ(0, mkdir("dir", 0755));
ATF_REQUIRE_EQ(0, close(creat("file", 0644)));
ATF_REQUIRE_EQ(0, close(creat("dir/file", 0644)));
+ ATF_REQUIRE_EQ(0, mkdir("dir/sd", 0750));
+ ATF_REQUIRE_EQ(0, mkdir("dir/sd/sd", 0700));
ATF_REQUIRE_EQ(0, symlink("..", "dir/up"));
ATF_REQUIRE_EQ(0, symlink("dir", "dirl"));
ATF_REQUIRE_EQ(0, symlink("file", "filel"));
@@ -57,6 +59,10 @@ ATF_TC_BODY(fts_options_logical, tc)
{ FTS_DL, "dead", "dead" },
{ FTS_D, "dir", "dir" },
{ FTS_F, "file", "dir/file" },
+ { FTS_D, "sd", "dir/sd" },
+ { FTS_D, "sd", "dir/sd/sd" },
+ { FTS_DP, "sd", "dir/sd/sd" },
+ { FTS_DP, "sd", "dir/sd" },
{ FTS_D, "up", "dir/up" },
{ FTS_DL, "dead", "dir/up/dead" },
{ FTS_DC, "dir", "dir/up/dir" },
@@ -67,6 +73,10 @@ ATF_TC_BODY(fts_options_logical, tc)
{ FTS_DP, "dir", "dir" },
{ FTS_D, "dirl", "dirl" },
{ FTS_F, "file", "dirl/file" },
+ { FTS_D, "sd", "dirl/sd" },
+ { FTS_D, "sd", "dirl/sd/sd" },
+ { FTS_DP, "sd", "dirl/sd/sd" },
+ { FTS_DP, "sd", "dirl/sd" },
{ FTS_D, "up", "dirl/up" },
{ FTS_DL, "dead", "dirl/up/dead" },
{ FTS_DC, "dir", "dirl/up/dir" },
@@ -108,6 +118,10 @@ ATF_TC_BODY(fts_options_logical_nostat, tc)
{ FTS_DL, "dead", "dead" },
{ FTS_D, "dir", "dir" },
{ FTS_NSOK, "file", "dir/file" },
+ { FTS_D, "sd", "dir/sd" },
+ { FTS_D, "sd", "dir/sd/sd" },
+ { FTS_DP, "sd", "dir/sd/sd" },
+ { FTS_DP, "sd", "dir/sd" },
{ FTS_D, "up", "dir/up" },
{ FTS_DL, "dead", "dir/up/dead" },
{ FTS_DC, "dir", "dir/up/dir" },
@@ -118,6 +132,10 @@ ATF_TC_BODY(fts_options_logical_nostat, tc)
{ FTS_DP, "dir", "dir" },
{ FTS_D, "dirl", "dirl" },
{ FTS_NSOK, "file", "dirl/file" },
+ { FTS_D, "sd", "dirl/sd" },
+ { FTS_D, "sd", "dirl/sd/sd" },
+ { FTS_DP, "sd", "dirl/sd/sd" },
+ { FTS_DP, "sd", "dirl/sd" },
{ FTS_D, "up", "dirl/up" },
{ FTS_DL, "dead", "dirl/up/dead" },
{ FTS_DC, "dir", "dirl/up/dir" },
@@ -151,6 +169,14 @@ ATF_TC_BODY(fts_options_logical_seedot, tc)
{ FTS_DOT, ".", "dir/." },
{ FTS_DOT, "..", "dir/.." },
{ FTS_F, "file", "dir/file" },
+ { FTS_D, "sd", "dir/sd" },
+ { FTS_DOT, ".", "dir/sd/." },
+ { FTS_DOT, "..", "dir/sd/.." },
+ { FTS_D, "sd", "dir/sd/sd" },
+ { FTS_DOT, ".", "dir/sd/sd/." },
+ { FTS_DOT, "..", "dir/sd/sd/.." },
+ { FTS_DP, "sd", "dir/sd/sd" },
+ { FTS_DP, "sd", "dir/sd" },
{ FTS_D, "up", "dir/up" },
{ FTS_DOT, ".", "dir/up/." },
{ FTS_DOT, "..", "dir/up/.." },
@@ -165,6 +191,14 @@ ATF_TC_BODY(fts_options_logical_seedot, tc)
{ FTS_DOT, ".", "dirl/." },
{ FTS_DOT, "..", "dirl/.." },
{ FTS_F, "file", "dirl/file" },
+ { FTS_D, "sd", "dirl/sd" },
+ { FTS_DOT, ".", "dirl/sd/." },
+ { FTS_DOT, "..", "dirl/sd/.." },
+ { FTS_D, "sd", "dirl/sd/sd" },
+ { FTS_DOT, ".", "dirl/sd/sd/." },
+ { FTS_DOT, "..", "dirl/sd/sd/.." },
+ { FTS_DP, "sd", "dirl/sd/sd" },
+ { FTS_DP, "sd", "dirl/sd" },
{ FTS_D, "up", "dirl/up" },
{ FTS_DOT, ".", "dirl/up/." },
{ FTS_DOT, "..", "dirl/up/.." },
@@ -198,6 +232,10 @@ ATF_TC_BODY(fts_options_physical, tc)
{ FTS_SL, "dead", "dead" },
{ FTS_D, "dir", "dir" },
{ FTS_F, "file", "file" },
+ { FTS_D, "sd", "sd" },
+ { FTS_D, "sd", "sd" },
+ { FTS_DP, "sd", "sd" },
+ { FTS_DP, "sd", "sd" },
{ FTS_SL, "up", "up" },
{ FTS_DP, "dir", "dir" },
{ FTS_SL, "dirl", "dirl" },
@@ -224,6 +262,10 @@ ATF_TC_BODY(fts_options_physical_nochdir, tc)
{ FTS_SL, "dead", "dead" },
{ FTS_D, "dir", "dir" },
{ FTS_F, "file", "dir/file" },
+ { FTS_D, "sd", "dir/sd" },
+ { FTS_D, "sd", "dir/sd/sd" },
+ { FTS_DP, "sd", "dir/sd/sd" },
+ { FTS_DP, "sd", "dir/sd" },
{ FTS_SL, "up", "dir/up" },
{ FTS_DP, "dir", "dir" },
{ FTS_SL, "dirl", "dirl" },
@@ -250,10 +292,18 @@ ATF_TC_BODY(fts_options_physical_comfollow, tc)
{ FTS_DL, "dead", "dead" },
{ FTS_D, "dir", "dir" },
{ FTS_F, "file", "file" },
+ { FTS_D, "sd", "sd" },
+ { FTS_D, "sd", "sd" },
+ { FTS_DP, "sd", "sd" },
+ { FTS_DP, "sd", "sd" },
{ FTS_SL, "up", "up" },
{ FTS_DP, "dir", "dir" },
{ FTS_D, "dirl", "dirl" },
{ FTS_F, "file", "file" },
+ { FTS_D, "sd", "sd" },
+ { FTS_D, "sd", "sd" },
+ { FTS_DP, "sd", "sd" },
+ { FTS_DP, "sd", "sd" },
{ FTS_SL, "up", "up" },
{ FTS_DP, "dirl", "dirl" },
{ FTS_F, "file", "file" },
@@ -279,10 +329,18 @@ ATF_TC_BODY(fts_options_physical_comfollowdir, tc)
{ FTS_DL, "dead", "dead" },
{ FTS_D, "dir", "dir" },
{ FTS_F, "file", "file" },
+ { FTS_D, "sd", "sd" },
+ { FTS_D, "sd", "sd" },
+ { FTS_DP, "sd", "sd" },
+ { FTS_DP, "sd", "sd" },
{ FTS_SL, "up", "up" },
{ FTS_DP, "dir", "dir" },
{ FTS_D, "dirl", "dirl" },
{ FTS_F, "file", "file" },
+ { FTS_D, "sd", "sd" },
+ { FTS_D, "sd", "sd" },
+ { FTS_DP, "sd", "sd" },
+ { FTS_DP, "sd", "sd" },
{ FTS_SL, "up", "up" },
{ FTS_DP, "dirl", "dirl" },
{ FTS_F, "file", "file" },
@@ -308,6 +366,10 @@ ATF_TC_BODY(fts_options_physical_nostat, tc)
{ FTS_SL, "dead", "dead" },
{ FTS_D, "dir", "dir" },
{ FTS_NSOK, "file", "file" },
+ { FTS_D, "sd", "sd" },
+ { FTS_D, "sd", "sd" },
+ { FTS_DP, "sd", "sd" },
+ { FTS_DP, "sd", "sd" },
{ FTS_NSOK, "up", "up" },
{ FTS_DP, "dir", "dir" },
{ FTS_SL, "dirl", "dirl" },
@@ -334,6 +396,10 @@ ATF_TC_BODY(fts_options_physical_nostat_type, tc)
{ FTS_SL, "dead", "dead" },
{ FTS_D, "dir", "dir" },
{ FTS_F, "file", "file" },
+ { FTS_D, "sd", "sd" },
+ { FTS_D, "sd", "sd" },
+ { FTS_DP, "sd", "sd" },
+ { FTS_DP, "sd", "sd" },
{ FTS_SL, "up", "up" },
{ FTS_DP, "dir", "dir" },
{ FTS_SL, "dirl", "dirl" },
@@ -362,6 +428,14 @@ ATF_TC_BODY(fts_options_physical_seedot, tc)
{ FTS_DOT, ".", "." },
{ FTS_DOT, "..", ".." },
{ FTS_F, "file", "file" },
+ { FTS_D, "sd", "sd" },
+ { FTS_DOT, ".", "." },
+ { FTS_DOT, "..", ".." },
+ { FTS_D, "sd", "sd" },
+ { FTS_DOT, ".", "." },
+ { FTS_DOT, "..", ".." },
+ { FTS_DP, "sd", "sd" },
+ { FTS_DP, "sd", "sd" },
{ FTS_SL, "up", "up" },
{ FTS_DP, "dir", "dir" },
{ FTS_SL, "dirl", "dirl" },
diff --git a/lib/libsys/fcntl.2 b/lib/libsys/fcntl.2
index d67c38cfbc6c..b919e1b8674b 100644
--- a/lib/libsys/fcntl.2
+++ b/lib/libsys/fcntl.2
@@ -176,7 +176,9 @@ descriptor to also have the flag set.
.El
.It Dv F_SETFD
Set flags associated with
-.Fa fd .
+.Fa fd
+to
+.Fa arg .
The available flags are
.Dv FD_CLOEXEC ,
.Dv FD_CLOFORK
diff --git a/lib/libsys/getsockopt.2 b/lib/libsys/getsockopt.2
index 3867824681d7..85d94e014631 100644
--- a/lib/libsys/getsockopt.2
+++ b/lib/libsys/getsockopt.2
@@ -25,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd November 25, 2024
+.Dd April 21, 2026
.Dt GETSOCKOPT 2
.Os
.Sh NAME
@@ -220,6 +220,10 @@ Incoming TCP and UDP connections are distributed among the participating
listening sockets based on a hash function of local port number, and foreign IP
address and port number.
A maximum of 256 sockets can be bound to the same load-balancing group.
+.Dv PF_DIVERT
+sockets may also be bound to a group, see the
+.Xr divert 4
+manual page for details.
.Pp
.Dv SO_KEEPALIVE
enables the
diff --git a/lib/libunbound/config.h b/lib/libunbound/config.h
index 1b939b7f1074..43d1fd69e49e 100644
--- a/lib/libunbound/config.h
+++ b/lib/libunbound/config.h
@@ -49,13 +49,13 @@
internal symbols */
/* #undef EXPORT_ALL_SYMBOLS */
-/* Define to 1 if you have the 'accept4' function. */
+/* Define to 1 if you have the `accept4' function. */
#define HAVE_ACCEPT4 1
-/* Define to 1 if you have the 'arc4random' function. */
+/* Define to 1 if you have the `arc4random' function. */
#define HAVE_ARC4RANDOM 1
-/* Define to 1 if you have the 'arc4random_uniform' function. */
+/* Define to 1 if you have the `arc4random_uniform' function. */
#define HAVE_ARC4RANDOM_UNIFORM 1
/* Define to 1 if you have the <arpa/inet.h> header file. */
@@ -67,6 +67,9 @@
/* Whether the C compiler accepts the "format" attribute */
#define HAVE_ATTR_FORMAT 1
+/* Whether the C compiler accepts the "nonstring" attribute */
+#define HAVE_ATTR_NONSTRING 1
+
/* Whether the C compiler accepts the "noreturn" attribute */
#define HAVE_ATTR_NORETURN 1
@@ -79,7 +82,7 @@
/* If we have be64toh */
#define HAVE_BE64TOH 1
-/* Define to 1 if you have the 'BIO_set_callback_ex' function. */
+/* Define to 1 if you have the `BIO_set_callback_ex' function. */
#define HAVE_BIO_SET_CALLBACK_EX 1
/* Define to 1 if you have the <bsd/stdlib.h> header file. */
@@ -88,241 +91,245 @@
/* Define to 1 if you have the <bsd/string.h> header file. */
/* #undef HAVE_BSD_STRING_H */
-/* Define to 1 if you have the 'chown' function. */
+/* Define to 1 if you have the `chown' function. */
#define HAVE_CHOWN 1
-/* Define to 1 if you have the 'chroot' function. */
+/* Define to 1 if you have the `chroot' function. */
#define HAVE_CHROOT 1
-/* Define to 1 if you have the 'CRYPTO_cleanup_all_ex_data' function. */
+/* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */
/* #undef HAVE_CRYPTO_CLEANUP_ALL_EX_DATA */
-/* Define to 1 if you have the 'CRYPTO_THREADID_set_callback' function. */
+/* Define to 1 if you have the `CRYPTO_THREADID_set_callback' function. */
/* #undef HAVE_CRYPTO_THREADID_SET_CALLBACK */
-/* Define to 1 if you have the 'ctime_r' function. */
+/* Define to 1 if you have the `ctime_r' function. */
#define HAVE_CTIME_R 1
-/* Define to 1 if you have the 'daemon' function. */
+/* Define to 1 if you have the `daemon' function. */
#define HAVE_DAEMON 1
-/* Define to 1 if you have the declaration of 'arc4random', and to 0 if you
+/* Define to 1 if you have the declaration of `arc4random', and to 0 if you
don't. */
/* #undef HAVE_DECL_ARC4RANDOM */
-/* Define to 1 if you have the declaration of 'arc4random_uniform', and to 0
+/* Define to 1 if you have the declaration of `arc4random_uniform', and to 0
if you don't. */
/* #undef HAVE_DECL_ARC4RANDOM_UNIFORM */
-/* Define to 1 if you have the declaration of 'evsignal_assign', and to 0 if
+/* Define to 1 if you have the declaration of `evsignal_assign', and to 0 if
you don't. */
/* #undef HAVE_DECL_EVSIGNAL_ASSIGN */
-/* Define to 1 if you have the declaration of 'inet_ntop', and to 0 if you
+/* Define to 1 if you have the declaration of `inet_ntop', and to 0 if you
don't. */
#define HAVE_DECL_INET_NTOP 1
-/* Define to 1 if you have the declaration of 'inet_pton', and to 0 if you
+/* Define to 1 if you have the declaration of `inet_pton', and to 0 if you
don't. */
#define HAVE_DECL_INET_PTON 1
-/* Define to 1 if you have the declaration of 'nghttp2_session_server_new',
+/* Define to 1 if you have the declaration of `nghttp2_session_server_new',
and to 0 if you don't. */
/* #undef HAVE_DECL_NGHTTP2_SESSION_SERVER_NEW */
-/* Define to 1 if you have the declaration of 'ngtcp2_conn_server_new', and to
+/* Define to 1 if you have the declaration of `ngtcp2_conn_server_new', and to
0 if you don't. */
/* #undef HAVE_DECL_NGTCP2_CONN_SERVER_NEW */
-/* Define to 1 if you have the declaration of 'ngtcp2_crypto_encrypt_cb', and
+/* Define to 1 if you have the declaration of `ngtcp2_crypto_encrypt_cb', and
to 0 if you don't. */
/* #undef HAVE_DECL_NGTCP2_CRYPTO_ENCRYPT_CB */
-/* Define to 1 if you have the declaration of 'NID_ED25519', and to 0 if you
+/* Define to 1 if you have the declaration of `NID_ED25519', and to 0 if you
don't. */
#define HAVE_DECL_NID_ED25519 1
-/* Define to 1 if you have the declaration of 'NID_ED448', and to 0 if you
+/* Define to 1 if you have the declaration of `NID_ED448', and to 0 if you
don't. */
#define HAVE_DECL_NID_ED448 1
-/* Define to 1 if you have the declaration of 'NID_secp384r1', and to 0 if you
+/* Define to 1 if you have the declaration of `NID_secp384r1', and to 0 if you
don't. */
#define HAVE_DECL_NID_SECP384R1 1
-/* Define to 1 if you have the declaration of 'NID_X9_62_prime256v1', and to 0
+/* Define to 1 if you have the declaration of `NID_X9_62_prime256v1', and to 0
if you don't. */
#define HAVE_DECL_NID_X9_62_PRIME256V1 1
-/* Define to 1 if you have the declaration of 'reallocarray', and to 0 if you
+/* Define to 1 if you have the declaration of `reallocarray', and to 0 if you
don't. */
#define HAVE_DECL_REALLOCARRAY 1
-/* Define to 1 if you have the declaration of 'redisConnect', and to 0 if you
+/* Define to 1 if you have the declaration of `redisConnect', and to 0 if you
don't. */
/* #undef HAVE_DECL_REDISCONNECT */
-/* Define to 1 if you have the declaration of 'sk_SSL_COMP_pop_free', and to 0
+/* Define to 1 if you have the declaration of `sk_SSL_COMP_pop_free', and to 0
if you don't. */
#define HAVE_DECL_SK_SSL_COMP_POP_FREE 1
/* Define to 1 if you have the declaration of
- 'SSL_COMP_get_compression_methods', and to 0 if you don't. */
+ `SSL_COMP_get_compression_methods', and to 0 if you don't. */
#define HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS 1
-/* Define to 1 if you have the declaration of 'SSL_CTX_set_ecdh_auto', and to
+/* Define to 1 if you have the declaration of `SSL_CTX_set_ecdh_auto', and to
0 if you don't. */
#define HAVE_DECL_SSL_CTX_SET_ECDH_AUTO 1
-/* Define to 1 if you have the declaration of 'strlcat', and to 0 if you
+/* Define to 1 if you have the declaration of `SSL_CTX_set_tmp_ecdh', and to 0
+ if you don't. */
+#define HAVE_DECL_SSL_CTX_SET_TMP_ECDH 1
+
+/* Define to 1 if you have the declaration of `strlcat', and to 0 if you
don't. */
/* #undef HAVE_DECL_STRLCAT */
-/* Define to 1 if you have the declaration of 'strlcpy', and to 0 if you
+/* Define to 1 if you have the declaration of `strlcpy', and to 0 if you
don't. */
/* #undef HAVE_DECL_STRLCPY */
-/* Define to 1 if you have the declaration of 'XML_StopParser', and to 0 if
+/* Define to 1 if you have the declaration of `XML_StopParser', and to 0 if
you don't. */
#define HAVE_DECL_XML_STOPPARSER 1
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
-/* Define to 1 if you have the 'DSA_SIG_set0' function. */
+/* Define to 1 if you have the `DSA_SIG_set0' function. */
#define HAVE_DSA_SIG_SET0 1
/* Define to 1 if you have the <endian.h> header file. */
#define HAVE_ENDIAN_H 1
-/* Define to 1 if you have the 'endprotoent' function. */
+/* Define to 1 if you have the `endprotoent' function. */
#define HAVE_ENDPROTOENT 1
-/* Define to 1 if you have the 'endpwent' function. */
+/* Define to 1 if you have the `endpwent' function. */
#define HAVE_ENDPWENT 1
-/* Define to 1 if you have the 'endservent' function. */
+/* Define to 1 if you have the `endservent' function. */
#define HAVE_ENDSERVENT 1
-/* Define to 1 if you have the 'ENGINE_cleanup' function. */
+/* Define to 1 if you have the `ENGINE_cleanup' function. */
/* #undef HAVE_ENGINE_CLEANUP */
-/* Define to 1 if you have the 'ERR_free_strings' function. */
+/* Define to 1 if you have the `ERR_free_strings' function. */
/* #undef HAVE_ERR_FREE_STRINGS */
-/* Define to 1 if you have the 'ERR_load_crypto_strings' function. */
+/* Define to 1 if you have the `ERR_load_crypto_strings' function. */
/* #undef HAVE_ERR_LOAD_CRYPTO_STRINGS */
-/* Define to 1 if you have the 'event_assign' function. */
+/* Define to 1 if you have the `event_assign' function. */
/* #undef HAVE_EVENT_ASSIGN */
-/* Define to 1 if you have the 'event_base_free' function. */
+/* Define to 1 if you have the `event_base_free' function. */
/* #undef HAVE_EVENT_BASE_FREE */
-/* Define to 1 if you have the 'event_base_get_method' function. */
+/* Define to 1 if you have the `event_base_get_method' function. */
/* #undef HAVE_EVENT_BASE_GET_METHOD */
-/* Define to 1 if you have the 'event_base_new' function. */
+/* Define to 1 if you have the `event_base_new' function. */
/* #undef HAVE_EVENT_BASE_NEW */
-/* Define to 1 if you have the 'event_base_once' function. */
+/* Define to 1 if you have the `event_base_once' function. */
/* #undef HAVE_EVENT_BASE_ONCE */
/* Define to 1 if you have the <event.h> header file. */
/* #undef HAVE_EVENT_H */
-/* Define to 1 if you have the 'EVP_aes_256_cbc' function. */
+/* Define to 1 if you have the `EVP_aes_256_cbc' function. */
#define HAVE_EVP_AES_256_CBC 1
-/* Define to 1 if you have the 'EVP_cleanup' function. */
+/* Define to 1 if you have the `EVP_cleanup' function. */
/* #undef HAVE_EVP_CLEANUP */
-/* Define to 1 if you have the 'EVP_default_properties_is_fips_enabled'
+/* Define to 1 if you have the `EVP_default_properties_is_fips_enabled'
function. */
#define HAVE_EVP_DEFAULT_PROPERTIES_IS_FIPS_ENABLED 1
-/* Define to 1 if you have the 'EVP_DigestVerify' function. */
+/* Define to 1 if you have the `EVP_DigestVerify' function. */
#define HAVE_EVP_DIGESTVERIFY 1
-/* Define to 1 if you have the 'EVP_dss1' function. */
+/* Define to 1 if you have the `EVP_dss1' function. */
/* #undef HAVE_EVP_DSS1 */
-/* Define to 1 if you have the 'EVP_EncryptInit_ex' function. */
+/* Define to 1 if you have the `EVP_EncryptInit_ex' function. */
#define HAVE_EVP_ENCRYPTINIT_EX 1
-/* Define to 1 if you have the 'EVP_MAC_CTX_set_params' function. */
+/* Define to 1 if you have the `EVP_MAC_CTX_set_params' function. */
#define HAVE_EVP_MAC_CTX_SET_PARAMS 1
-/* Define to 1 if you have the 'EVP_MD_CTX_new' function. */
+/* Define to 1 if you have the `EVP_MD_CTX_new' function. */
#define HAVE_EVP_MD_CTX_NEW 1
-/* Define to 1 if you have the 'EVP_sha1' function. */
+/* Define to 1 if you have the `EVP_sha1' function. */
#define HAVE_EVP_SHA1 1
-/* Define to 1 if you have the 'EVP_sha256' function. */
+/* Define to 1 if you have the `EVP_sha256' function. */
#define HAVE_EVP_SHA256 1
-/* Define to 1 if you have the 'EVP_sha512' function. */
+/* Define to 1 if you have the `EVP_sha512' function. */
#define HAVE_EVP_SHA512 1
-/* Define to 1 if you have the 'ev_default_loop' function. */
+/* Define to 1 if you have the `ev_default_loop' function. */
/* #undef HAVE_EV_DEFAULT_LOOP */
-/* Define to 1 if you have the 'ev_loop' function. */
+/* Define to 1 if you have the `ev_loop' function. */
/* #undef HAVE_EV_LOOP */
/* Define to 1 if you have the <expat.h> header file. */
#define HAVE_EXPAT_H 1
-/* Define to 1 if you have the 'explicit_bzero' function. */
+/* Define to 1 if you have the `explicit_bzero' function. */
#define HAVE_EXPLICIT_BZERO 1
-/* Define to 1 if you have the 'fcntl' function. */
+/* Define to 1 if you have the `fcntl' function. */
#define HAVE_FCNTL 1
-/* Define to 1 if you have the 'FIPS_mode' function. */
+/* Define to 1 if you have the `FIPS_mode' function. */
/* #undef HAVE_FIPS_MODE */
-/* Define to 1 if you have the 'fork' function. */
+/* Define to 1 if you have the `fork' function. */
#define HAVE_FORK 1
-/* Define to 1 if fseeko (and ftello) are declared in stdio.h. */
+/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
#define HAVE_FSEEKO 1
-/* Define to 1 if you have the 'fsync' function. */
+/* Define to 1 if you have the `fsync' function. */
#define HAVE_FSYNC 1
/* Whether getaddrinfo is available */
#define HAVE_GETADDRINFO 1
-/* Define to 1 if you have the 'getauxval' function. */
+/* Define to 1 if you have the `getauxval' function. */
/* #undef HAVE_GETAUXVAL */
-/* Define to 1 if you have the 'getentropy' function. */
+/* Define to 1 if you have the `getentropy' function. */
/* #undef HAVE_GETENTROPY */
-/* Define to 1 if you have the 'getifaddrs' function. */
+/* Define to 1 if you have the `getifaddrs' function. */
#define HAVE_GETIFADDRS 1
/* Define to 1 if you have the <getopt.h> header file. */
#define HAVE_GETOPT_H 1
-/* Define to 1 if you have the 'getpwnam' function. */
+/* Define to 1 if you have the `getpwnam' function. */
#define HAVE_GETPWNAM 1
-/* Define to 1 if you have the 'getrlimit' function. */
+/* Define to 1 if you have the `getrlimit' function. */
#define HAVE_GETRLIMIT 1
-/* Define to 1 if you have the 'gettid' function. */
+/* Define to 1 if you have the `gettid' function. */
/* #undef HAVE_GETTID */
-/* Define to 1 if you have the 'glob' function. */
+/* Define to 1 if you have the `glob' function. */
#define HAVE_GLOB 1
/* Define to 1 if you have the <glob.h> header file. */
#define HAVE_GLOB_H 1
-/* Define to 1 if you have the 'gmtime_r' function. */
+/* Define to 1 if you have the `gmtime_r' function. */
#define HAVE_GMTIME_R 1
/* Define to 1 if you have the <grp.h> header file. */
@@ -331,7 +338,7 @@
/* Define to 1 if you have the <hiredis/hiredis.h> header file. */
/* #undef HAVE_HIREDIS_HIREDIS_H */
-/* Define to 1 if you have the 'HMAC_Init_ex' function. */
+/* Define to 1 if you have the `HMAC_Init_ex' function. */
#define HAVE_HMAC_INIT_EX 1
/* If we have htobe64 */
@@ -340,19 +347,19 @@
/* Define to 1 if you have the <ifaddrs.h> header file. */
#define HAVE_IFADDRS_H 1
-/* Define to 1 if you have the 'if_nametoindex' function. */
+/* Define to 1 if you have the `if_nametoindex' function. */
#define HAVE_IF_NAMETOINDEX 1
-/* Define to 1 if you have the 'inet_aton' function. */
+/* Define to 1 if you have the `inet_aton' function. */
#define HAVE_INET_ATON 1
-/* Define to 1 if you have the 'inet_ntop' function. */
+/* Define to 1 if you have the `inet_ntop' function. */
#define HAVE_INET_NTOP 1
-/* Define to 1 if you have the 'inet_pton' function. */
+/* Define to 1 if you have the `inet_pton' function. */
#define HAVE_INET_PTON 1
-/* Define to 1 if you have the 'initgroups' function. */
+/* Define to 1 if you have the `initgroups' function. */
#define HAVE_INITGROUPS 1
/* Define to 1 if you have the <inttypes.h> header file. */
@@ -364,10 +371,10 @@
/* Define to 1 if you have the <iphlpapi.h> header file. */
/* #undef HAVE_IPHLPAPI_H */
-/* Define to 1 if you have the 'isblank' function. */
+/* Define to 1 if you have the `isblank' function. */
#define HAVE_ISBLANK 1
-/* Define to 1 if you have the 'kill' function. */
+/* Define to 1 if you have the `kill' function. */
#define HAVE_KILL 1
/* Use portable libbsd functions */
@@ -385,7 +392,7 @@
/* Define to 1 if you have the <linux/net_tstamp.h> header file. */
/* #undef HAVE_LINUX_NET_TSTAMP_H */
-/* Define to 1 if you have the 'localtime_r' function. */
+/* Define to 1 if you have the `localtime_r' function. */
#define HAVE_LOCALTIME_R 1
/* Define to 1 if you have the <login_cap.h> header file. */
@@ -394,7 +401,7 @@
/* If have GNU libc compatible malloc */
#define HAVE_MALLOC 1
-/* Define to 1 if you have the 'memmove' function. */
+/* Define to 1 if you have the `memmove' function. */
#define HAVE_MEMMOVE 1
/* Define to 1 if you have the <minix/config.h> header file. */
@@ -436,55 +443,61 @@
/* Define this to use ngtcp2. */
/* #undef HAVE_NGTCP2 */
-/* Define to 1 if you have the 'ngtcp2_ccerr_default' function. */
+/* Define to 1 if you have the `ngtcp2_ccerr_default' function. */
/* #undef HAVE_NGTCP2_CCERR_DEFAULT */
-/* Define to 1 if you have the 'ngtcp2_conn_encode_0rtt_transport_params'
+/* Define to 1 if you have the `ngtcp2_conn_encode_0rtt_transport_params'
function. */
/* #undef HAVE_NGTCP2_CONN_ENCODE_0RTT_TRANSPORT_PARAMS */
-/* Define to 1 if you have the 'ngtcp2_conn_get_max_local_streams_uni'
+/* Define to 1 if you have the `ngtcp2_conn_get_max_local_streams_uni'
function. */
/* #undef HAVE_NGTCP2_CONN_GET_MAX_LOCAL_STREAMS_UNI */
-/* Define to 1 if you have the 'ngtcp2_conn_get_num_scid' function. */
+/* Define to 1 if you have the `ngtcp2_conn_get_num_scid' function. */
/* #undef HAVE_NGTCP2_CONN_GET_NUM_SCID */
-/* Define to 1 if you have the 'ngtcp2_conn_in_closing_period' function. */
+/* Define to 1 if you have the `ngtcp2_conn_in_closing_period' function. */
/* #undef HAVE_NGTCP2_CONN_IN_CLOSING_PERIOD */
-/* Define to 1 if you have the 'ngtcp2_conn_in_draining_period' function. */
+/* Define to 1 if you have the `ngtcp2_conn_in_draining_period' function. */
/* #undef HAVE_NGTCP2_CONN_IN_DRAINING_PERIOD */
/* Define if ngtcp2_conn_shutdown_stream has 4 arguments. */
/* #undef HAVE_NGTCP2_CONN_SHUTDOWN_STREAM4 */
-/* Define to 1 if you have the 'ngtcp2_conn_tls_early_data_rejected' function.
+/* Define to 1 if you have the `ngtcp2_conn_tls_early_data_rejected' function.
*/
/* #undef HAVE_NGTCP2_CONN_TLS_EARLY_DATA_REJECTED */
-/* Define to 1 if you have the 'ngtcp2_crypto_encrypt_cb' function. */
+/* Define to 1 if you have the `ngtcp2_crypto_encrypt_cb' function. */
/* #undef HAVE_NGTCP2_CRYPTO_ENCRYPT_CB */
/* Define to 1 if you have the
- 'ngtcp2_crypto_quictls_configure_client_context' function. */
+ `ngtcp2_crypto_quictls_configure_client_context' function. */
/* #undef HAVE_NGTCP2_CRYPTO_QUICTLS_CONFIGURE_CLIENT_CONTEXT */
/* Define to 1 if you have the
- 'ngtcp2_crypto_quictls_configure_server_context' function. */
+ `ngtcp2_crypto_quictls_configure_server_context' function. */
/* #undef HAVE_NGTCP2_CRYPTO_QUICTLS_CONFIGURE_SERVER_CONTEXT */
/* Define to 1 if you have the
- 'ngtcp2_crypto_quictls_from_ossl_encryption_level' function. */
+ `ngtcp2_crypto_quictls_from_ossl_encryption_level' function. */
/* #undef HAVE_NGTCP2_CRYPTO_QUICTLS_FROM_OSSL_ENCRYPTION_LEVEL */
-/* Define to 1 if the system has the type 'ngtcp2_encryption_level'. */
+/* Define to 1 if you have the `ngtcp2_crypto_quictls_init' function. */
+/* #undef HAVE_NGTCP2_CRYPTO_QUICTLS_INIT */
+
+/* Define to 1 if the system has the type `ngtcp2_encryption_level'. */
/* #undef HAVE_NGTCP2_ENCRYPTION_LEVEL */
/* Define to 1 if you have the <ngtcp2/ngtcp2_crypto_openssl.h> header file.
*/
/* #undef HAVE_NGTCP2_NGTCP2_CRYPTO_OPENSSL_H */
+/* Define to 1 if you have the <ngtcp2/ngtcp2_crypto_ossl.h> header file. */
+/* #undef HAVE_NGTCP2_NGTCP2_CRYPTO_OSSL_H */
+
/* Define to 1 if you have the <ngtcp2/ngtcp2_crypto_quictls.h> header file.
*/
/* #undef HAVE_NGTCP2_NGTCP2_CRYPTO_QUICTLS_H */
@@ -495,13 +508,13 @@
/* Use libnss for crypto */
/* #undef HAVE_NSS */
-/* Define to 1 if you have the 'OpenSSL_add_all_digests' function. */
+/* Define to 1 if you have the `OpenSSL_add_all_digests' function. */
/* #undef HAVE_OPENSSL_ADD_ALL_DIGESTS */
/* Define to 1 if you have the <openssl/bn.h> header file. */
#define HAVE_OPENSSL_BN_H 1
-/* Define to 1 if you have the 'OPENSSL_config' function. */
+/* Define to 1 if you have the `OPENSSL_config' function. */
#define HAVE_OPENSSL_CONFIG 1
/* Define to 1 if you have the <openssl/conf.h> header file. */
@@ -522,10 +535,10 @@
/* Define to 1 if you have the <openssl/err.h> header file. */
#define HAVE_OPENSSL_ERR_H 1
-/* Define to 1 if you have the 'OPENSSL_init_crypto' function. */
+/* Define to 1 if you have the `OPENSSL_init_crypto' function. */
#define HAVE_OPENSSL_INIT_CRYPTO 1
-/* Define to 1 if you have the 'OPENSSL_init_ssl' function. */
+/* Define to 1 if you have the `OPENSSL_init_ssl' function. */
#define HAVE_OPENSSL_INIT_SSL 1
/* Define to 1 if you have the <openssl/param_build.h> header file. */
@@ -540,10 +553,10 @@
/* Define to 1 if you have the <openssl/ssl.h> header file. */
#define HAVE_OPENSSL_SSL_H 1
-/* Define to 1 if you have the 'OSSL_PARAM_BLD_new' function. */
+/* Define to 1 if you have the `OSSL_PARAM_BLD_new' function. */
#define HAVE_OSSL_PARAM_BLD_NEW 1
-/* Define to 1 if you have the 'poll' function. */
+/* Define to 1 if you have the `poll' function. */
#define HAVE_POLL 1
/* Define to 1 if you have the <poll.h> header file. */
@@ -552,13 +565,28 @@
/* Define if you have POSIX threads libraries and header files. */
#define HAVE_PTHREAD 1
+/* Define to 1 if you have the <pthread_np.h> header file. */
+#define HAVE_PTHREAD_NP_H 1
+
/* Have PTHREAD_PRIO_INHERIT. */
#define HAVE_PTHREAD_PRIO_INHERIT 1
-/* Define to 1 if the system has the type 'pthread_rwlock_t'. */
+/* Define to 1 if the system has the type `pthread_rwlock_t'. */
#define HAVE_PTHREAD_RWLOCK_T 1
-/* Define to 1 if the system has the type 'pthread_spinlock_t'. */
+/* Define if pthread_setname_np has the common 2 arguments. */
+#define HAVE_PTHREAD_SETNAME_NP 1
+
+/* Define if pthread_setname_np has only 1 argument. */
+/* #undef HAVE_PTHREAD_SETNAME_NP1 */
+
+/* Define if pthread_setname_np has 3 arguments. */
+/* #undef HAVE_PTHREAD_SETNAME_NP3 */
+
+/* Define if pthread_setname_np exists as pthread_set_name_np instead. */
+#define HAVE_PTHREAD_SET_NAME_NP 1
+
+/* Define to 1 if the system has the type `pthread_spinlock_t'. */
#define HAVE_PTHREAD_SPINLOCK_T 1
/* Define to 1 if you have the <pwd.h> header file. */
@@ -567,101 +595,98 @@
/* Define if you have Python libraries and header files. */
/* #undef HAVE_PYTHON */
-/* Define to 1 if you have the 'random' function. */
+/* Define to 1 if you have the `random' function. */
#define HAVE_RANDOM 1
-/* Define to 1 if you have the 'RAND_cleanup' function. */
+/* Define to 1 if you have the `RAND_cleanup' function. */
/* #undef HAVE_RAND_CLEANUP */
/* If we have reallocarray(3) */
#define HAVE_REALLOCARRAY 1
-/* Define to 1 if you have the 'recvmsg' function. */
+/* Define to 1 if you have the `recvmsg' function. */
#define HAVE_RECVMSG 1
-/* Define to 1 if you have the 'sendmsg' function. */
+/* Define to 1 if you have the `sendmsg' function. */
#define HAVE_SENDMSG 1
-/* Define to 1 if you have the 'setregid' function. */
+/* Define to 1 if you have the `setregid' function. */
/* #undef HAVE_SETREGID */
-/* Define to 1 if you have the 'setresgid' function. */
+/* Define to 1 if you have the `setresgid' function. */
#define HAVE_SETRESGID 1
-/* Define to 1 if you have the 'setresuid' function. */
+/* Define to 1 if you have the `setresuid' function. */
#define HAVE_SETRESUID 1
-/* Define to 1 if you have the 'setreuid' function. */
+/* Define to 1 if you have the `setreuid' function. */
/* #undef HAVE_SETREUID */
-/* Define to 1 if you have the 'setrlimit' function. */
+/* Define to 1 if you have the `setrlimit' function. */
#define HAVE_SETRLIMIT 1
-/* Define to 1 if you have the 'setsid' function. */
+/* Define to 1 if you have the `setsid' function. */
#define HAVE_SETSID 1
-/* Define to 1 if you have the 'setusercontext' function. */
+/* Define to 1 if you have the `setusercontext' function. */
#define HAVE_SETUSERCONTEXT 1
-/* Define to 1 if you have the 'SHA512_Update' function. */
+/* Define to 1 if you have the `SHA512_Update' function. */
/* #undef HAVE_SHA512_UPDATE */
-/* Define to 1 if you have the 'shmget' function. */
+/* Define to 1 if you have the `shmget' function. */
#define HAVE_SHMGET 1
-/* Define to 1 if you have the 'sigprocmask' function. */
+/* Define to 1 if you have the `sigprocmask' function. */
#define HAVE_SIGPROCMASK 1
-/* Define to 1 if you have the 'sleep' function. */
+/* Define to 1 if you have the `sleep' function. */
#define HAVE_SLEEP 1
-/* Define to 1 if you have the 'snprintf' function. */
+/* Define to 1 if you have the `snprintf' function. */
#define HAVE_SNPRINTF 1
-/* Define to 1 if you have the 'socketpair' function. */
+/* Define to 1 if you have the `socketpair' function. */
#define HAVE_SOCKETPAIR 1
/* Using Solaris threads */
/* #undef HAVE_SOLARIS_THREADS */
-/* Define to 1 if you have the 'srandom' function. */
+/* Define to 1 if you have the `srandom' function. */
#define HAVE_SRANDOM 1
/* Define if you have the SSL libraries installed. */
#define HAVE_SSL /**/
-/* Define to 1 if you have the 'SSL_CTX_set_alpn_protos' function. */
+/* Define to 1 if you have the `SSL_CTX_set_alpn_protos' function. */
#define HAVE_SSL_CTX_SET_ALPN_PROTOS 1
-/* Define to 1 if you have the 'SSL_CTX_set_alpn_select_cb' function. */
+/* Define to 1 if you have the `SSL_CTX_set_alpn_select_cb' function. */
#define HAVE_SSL_CTX_SET_ALPN_SELECT_CB 1
-/* Define to 1 if you have the 'SSL_CTX_set_ciphersuites' function. */
+/* Define to 1 if you have the `SSL_CTX_set_ciphersuites' function. */
#define HAVE_SSL_CTX_SET_CIPHERSUITES 1
-/* Define to 1 if you have the 'SSL_CTX_set_security_level' function. */
+/* Define to 1 if you have the `SSL_CTX_set_security_level' function. */
#define HAVE_SSL_CTX_SET_SECURITY_LEVEL 1
-/* Define to 1 if you have the 'SSL_CTX_set_tlsext_ticket_key_evp_cb'
+/* Define to 1 if you have the `SSL_CTX_set_tlsext_ticket_key_evp_cb'
function. */
#define HAVE_SSL_CTX_SET_TLSEXT_TICKET_KEY_EVP_CB 1
-/* Define to 1 if you have the 'SSL_CTX_set_tmp_ecdh' function. */
-/* #undef HAVE_SSL_CTX_SET_TMP_ECDH */
-
-/* Define to 1 if you have the 'SSL_get0_alpn_selected' function. */
+/* Define to 1 if you have the `SSL_get0_alpn_selected' function. */
#define HAVE_SSL_GET0_ALPN_SELECTED 1
-/* Define to 1 if you have the 'SSL_get0_peername' function. */
+/* Define to 1 if you have the `SSL_get0_peername' function. */
#define HAVE_SSL_GET0_PEERNAME 1
-/* Define to 1 if you have the 'SSL_get1_peer_certificate' function. */
+/* Define to 1 if you have the `SSL_get1_peer_certificate' function. */
#define HAVE_SSL_GET1_PEER_CERTIFICATE 1
-/* Define to 1 if you have the 'SSL_is_quic' function. */
+/* Define to 1 if you have the `SSL_is_quic' function. */
/* #undef HAVE_SSL_IS_QUIC */
-/* Define to 1 if you have the 'SSL_set1_host' function. */
+/* Define to 1 if you have the `SSL_set1_host' function. */
#define HAVE_SSL_SET1_HOST 1
/* Define to 1 if you have the <stdarg.h> header file. */
@@ -682,7 +707,7 @@
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
-/* Define to 1 if you have the 'strftime' function. */
+/* Define to 1 if you have the `strftime' function. */
#define HAVE_STRFTIME 1
/* Define to 1 if you have the <strings.h> header file. */
@@ -691,41 +716,47 @@
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
-/* Define to 1 if you have the 'strlcat' function. */
+/* Define to 1 if you have the `strlcat' function. */
#define HAVE_STRLCAT 1
-/* Define to 1 if you have the 'strlcpy' function. */
+/* Define to 1 if you have the `strlcpy' function. */
#define HAVE_STRLCPY 1
-/* Define to 1 if you have the 'strptime' function. */
+/* Define to 1 if you have the `strptime' function. */
#define HAVE_STRPTIME 1
-/* Define to 1 if you have the 'strsep' function. */
+/* Define to 1 if you have the `strsep' function. */
#define HAVE_STRSEP 1
-/* Define to 1 if 'ipi_spec_dst' is a member of 'struct in_pktinfo'. */
+/* Define to 1 if `ipi_spec_dst' is a member of `struct in_pktinfo'. */
/* #undef HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST */
-/* Define to 1 if 'tokenlen' is a member of 'struct ngtcp2_pkt_hd'. */
+/* Define to 1 if `tokenlen' is a member of `struct ngtcp2_pkt_hd'. */
/* #undef HAVE_STRUCT_NGTCP2_PKT_HD_TOKENLEN */
-/* Define to 1 if 'max_tx_udp_payload_size' is a member of 'struct
+/* Define to 1 if `max_tx_udp_payload_size' is a member of `struct
ngtcp2_settings'. */
/* #undef HAVE_STRUCT_NGTCP2_SETTINGS_MAX_TX_UDP_PAYLOAD_SIZE */
-/* Define to 1 if 'tokenlen' is a member of 'struct ngtcp2_settings'. */
+/* Define to 1 if `tokenlen' is a member of `struct ngtcp2_settings'. */
/* #undef HAVE_STRUCT_NGTCP2_SETTINGS_TOKENLEN */
-/* Define to 1 if 'original_dcid_present' is a member of 'struct
+/* Define to 1 if `original_dcid_present' is a member of `struct
ngtcp2_transport_params'. */
/* #undef HAVE_STRUCT_NGTCP2_TRANSPORT_PARAMS_ORIGINAL_DCID_PRESENT */
-/* Define to 1 if the system has the type 'struct ngtcp2_version_cid'. */
+/* Define to 1 if the system has the type `struct ngtcp2_version_cid'. */
/* #undef HAVE_STRUCT_NGTCP2_VERSION_CID */
-/* Define to 1 if 'sun_len' is a member of 'struct sockaddr_un'. */
+/* Define to 1 if `sun_len' is a member of `struct sockaddr_un'. */
#define HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 1
+/* Define to 1 if `st_mtimensec' is a member of `struct stat'. */
+#define HAVE_STRUCT_STAT_ST_MTIMENSEC 1
+
+/* Define to 1 if `st_mtim.tv_nsec' is a member of `struct stat'. */
+#define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1
+
/* Define if you have Swig libraries and header files. */
/* #undef HAVE_SWIG */
@@ -783,16 +814,16 @@
/* Define to 1 if you have the <time.h> header file. */
#define HAVE_TIME_H 1
-/* Define to 1 if you have the 'tzset' function. */
+/* Define to 1 if you have the `tzset' function. */
#define HAVE_TZSET 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
-/* Define to 1 if you have the 'usleep' function. */
+/* Define to 1 if you have the `usleep' function. */
#define HAVE_USLEEP 1
-/* Define to 1 if you have the 'vfork' function. */
+/* Define to 1 if you have the `vfork' function. */
#define HAVE_VFORK 1
/* Define to 1 if you have the <vfork.h> header file. */
@@ -810,22 +841,22 @@
/* Define to 1 if you have the <winsock2.h> header file. */
/* #undef HAVE_WINSOCK2_H */
-/* Define to 1 if 'fork' works. */
+/* Define to 1 if `fork' works. */
#define HAVE_WORKING_FORK 1
-/* Define to 1 if 'vfork' works. */
+/* Define to 1 if `vfork' works. */
#define HAVE_WORKING_VFORK 1
-/* Define to 1 if you have the 'writev' function. */
+/* Define to 1 if you have the `writev' function. */
#define HAVE_WRITEV 1
/* Define to 1 if you have the <ws2tcpip.h> header file. */
/* #undef HAVE_WS2TCPIP_H */
-/* Define to 1 if you have the 'X509_VERIFY_PARAM_set1_host' function. */
+/* Define to 1 if you have the `X509_VERIFY_PARAM_set1_host' function. */
#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1
-/* Define to 1 if you have the '_beginthreadex' function. */
+/* Define to 1 if you have the `_beginthreadex' function. */
/* #undef HAVE__BEGINTHREADEX */
/* If HMAC_Init_ex() returns void */
@@ -884,7 +915,7 @@
#define PACKAGE_NAME "unbound"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "unbound 1.24.1"
+#define PACKAGE_STRING "unbound 1.25.1"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "unbound"
@@ -893,7 +924,7 @@
#define PACKAGE_URL ""
/* Define to the version of this package. */
-#define PACKAGE_VERSION "1.24.1"
+#define PACKAGE_VERSION "1.25.1"
/* default pidfile location */
#define PIDFILE "/var/unbound/unbound.pid"
@@ -916,7 +947,7 @@
#define ROOT_CERT_FILE "/var/unbound/icannbundle.pem"
/* version number for resource files */
-#define RSRC_PACKAGE_VERSION 1,23,1,0
+#define RSRC_PACKAGE_VERSION 1,25,1,0
/* Directory to chdir to */
#define RUN_DIR "/var/unbound"
@@ -924,16 +955,16 @@
/* Shared data */
#define SHARE_DIR "/var/unbound"
-/* The size of 'pthread_t', as computed by sizeof. */
+/* The size of `pthread_t', as computed by sizeof. */
#define SIZEOF_PTHREAD_T 8
-/* The size of 'size_t', as computed by sizeof. */
+/* The size of `size_t', as computed by sizeof. */
#define SIZEOF_SIZE_T 8
-/* The size of 'time_t', as computed by sizeof. */
+/* The size of `time_t', as computed by sizeof. */
#define SIZEOF_TIME_T 8
-/* The size of 'unsigned long', as computed by sizeof. */
+/* The size of `unsigned long', as computed by sizeof. */
#define SIZEOF_UNSIGNED_LONG 8
/* define if (v)snprintf does not return length needed, (but length used) */
@@ -942,7 +973,7 @@
/* Define to 1 if libsodium supports sodium_set_misuse_handler */
/* #undef SODIUM_MISUSE_HANDLER */
-/* Define to 1 if all of the C89 standard headers exist (not just the ones
+/* Define to 1 if all of the C90 standard headers exist (not just the ones
required in a freestanding environment). This macro is provided for
backward compatibility; new code need not use it. */
#define STDC_HEADERS 1
@@ -1024,6 +1055,9 @@
/* Define this to enable client TCP Fast Open. */
/* #undef USE_MSG_FASTOPEN */
+/* Define this to use ngtcp2_crypto_ossl. */
+/* #undef USE_NGTCP2_CRYPTO_OSSL */
+
/* Define this to enable client TCP Fast Open. */
/* #undef USE_OSX_MSG_FASTOPEN */
@@ -1036,7 +1070,7 @@
/* Define this to enable SHA256 and SHA512 support. */
#define USE_SHA2 1
-/* Enable extensions on AIX, Interix, z/OS. */
+/* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE
# define _ALL_SOURCE 1
#endif
@@ -1097,15 +1131,11 @@
#ifndef __STDC_WANT_IEC_60559_DFP_EXT__
# define __STDC_WANT_IEC_60559_DFP_EXT__ 1
#endif
-/* Enable extensions specified by C23 Annex F. */
-#ifndef __STDC_WANT_IEC_60559_EXT__
-# define __STDC_WANT_IEC_60559_EXT__ 1
-#endif
/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */
#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1
#endif
-/* Enable extensions specified by C23 Annex H and ISO/IEC TS 18661-3:2015. */
+/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */
#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1
#endif
@@ -1146,36 +1176,30 @@
/* Define if you want PyUnbound. */
/* #undef WITH_PYUNBOUND */
-/* Define to 1 if 'lex' declares 'yytext' as a 'char *' by default, not a
- 'char[]'. */
+/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
+ `char[]'. */
#define YYTEXT_POINTER 1
/* Number of bits in a file offset, on hosts where this is settable. */
/* #undef _FILE_OFFSET_BITS */
-/* Define to 1 if necessary to make fseeko visible. */
+/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
/* #undef _LARGEFILE_SOURCE */
-/* Define to 1 on platforms where this makes off_t a 64-bit type. */
+/* Define for large files, on AIX-style hosts. */
/* #undef _LARGE_FILES */
/* Enable for compile on Minix */
#define _NETBSD_SOURCE 1
-/* Number of bits in time_t, on hosts where this is settable. */
-/* #undef _TIME_BITS */
-
-/* Define to 1 on platforms where this makes time_t a 64-bit type. */
-/* #undef __MINGW_USE_VC2005_COMPAT */
-
/* defined to use gcc ansi snprintf and sscanf that understands %lld when
compiled for windows. */
/* #undef __USE_MINGW_ANSI_STDIO */
-/* Define to empty if 'const' does not conform to ANSI C. */
+/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
-/* Define as 'int' if <sys/types.h> doesn't define. */
+/* Define to `int' if <sys/types.h> doesn't define. */
/* #undef gid_t */
/* in_addr_t */
@@ -1184,28 +1208,28 @@
/* in_port_t */
/* #undef in_port_t */
-/* Define to '__inline__' or '__inline' if that's what the C compiler
+/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
/* #undef inline */
#endif
-/* Define to 'short' if <sys/types.h> does not define. */
+/* Define to `short' if <sys/types.h> does not define. */
/* #undef int16_t */
-/* Define to 'int' if <sys/types.h> does not define. */
+/* Define to `int' if <sys/types.h> does not define. */
/* #undef int32_t */
-/* Define to 'long long' if <sys/types.h> does not define. */
+/* Define to `long long' if <sys/types.h> does not define. */
/* #undef int64_t */
-/* Define to 'signed char' if <sys/types.h> does not define. */
+/* Define to `signed char' if <sys/types.h> does not define. */
/* #undef int8_t */
/* Define if replacement function should be used. */
/* #undef malloc */
-/* Define to 'long int' if <sys/types.h> does not define. */
+/* Define to `long int' if <sys/types.h> does not define. */
/* #undef off_t */
/* Define as a signed integer type capable of holding a process identifier. */
@@ -1214,34 +1238,34 @@
/* Define to 'int' if not defined */
/* #undef rlim_t */
-/* Define as 'unsigned int' if <stddef.h> doesn't define. */
+/* Define to `unsigned int' if <sys/types.h> does not define. */
/* #undef size_t */
/* Define to 'int' if not defined */
/* #undef socklen_t */
-/* Define to 'int' if <sys/types.h> does not define. */
+/* Define to `int' if <sys/types.h> does not define. */
/* #undef ssize_t */
/* Define to 'unsigned char if not defined */
/* #undef u_char */
-/* Define as 'int' if <sys/types.h> doesn't define. */
+/* Define to `int' if <sys/types.h> doesn't define. */
/* #undef uid_t */
-/* Define to 'unsigned short' if <sys/types.h> does not define. */
+/* Define to `unsigned short' if <sys/types.h> does not define. */
/* #undef uint16_t */
-/* Define to 'unsigned int' if <sys/types.h> does not define. */
+/* Define to `unsigned int' if <sys/types.h> does not define. */
/* #undef uint32_t */
-/* Define to 'unsigned long long' if <sys/types.h> does not define. */
+/* Define to `unsigned long long' if <sys/types.h> does not define. */
/* #undef uint64_t */
-/* Define to 'unsigned char' if <sys/types.h> does not define. */
+/* Define to `unsigned char' if <sys/types.h> does not define. */
/* #undef uint8_t */
-/* Define as 'fork' if 'vfork' does not work. */
+/* Define as `fork' if `vfork' does not work. */
/* #undef vfork */
#if defined(OMITTED__D_GNU_SOURCE) && !defined(_GNU_SOURCE)
@@ -1382,6 +1406,17 @@
#endif /* !HAVE_ATTR_UNUSED */
+#if defined(DOXYGEN)
+# define ATTR_NONSTRING(x) x
+#elif defined(__cplusplus)
+# define ATTR_NONSTRING(x) __attribute__((nonstring)) x
+#elif defined(HAVE_ATTR_NONSTRING)
+# define ATTR_NONSTRING(x) __attribute__((nonstring)) x
+#else /* !HAVE_ATTR_NONSTRING */
+# define ATTR_NONSTRING(x) x
+#endif /* !HAVE_ATTR_NONSTRING */
+
+
#ifndef HAVE_FSEEKO
#define fseeko fseek
#define ftello ftell
diff --git a/lib/libutil/login.conf.5 b/lib/libutil/login.conf.5
index d4bbc1d67780..9b136291dc1e 100644
--- a/lib/libutil/login.conf.5
+++ b/lib/libutil/login.conf.5
@@ -17,7 +17,7 @@
.\" 5. Modifications may be freely made to this file providing the above
.\" conditions are met.
.\"
-.Dd December 15, 2025
+.Dd May 27, 2026
.Dt LOGIN.CONF 5
.Os
.Sh NAME
@@ -194,17 +194,18 @@ login environment.
.It "cputime time CPU usage limit."
.It "datasize size Maximum data size limit."
.It "filesize size Maximum file size limit."
+.It "kqueues number Maximum number of kernel event queues."
.It "maxproc number Maximum number of processes."
.It "memorylocked size Maximum locked in core memory size limit."
.It "memoryuse size Maximum of core memory use size limit."
.It "openfiles number Maximum number of open files per process."
+.It "pipebuf size Maximum size of pipe buffers."
+.It "pseudoterminals number Maximum number of pseudo-terminals."
.It "sbsize size Maximum permitted socketbuffer size."
-.It "vmemoryuse size Maximum permitted total VM usage per process."
.It "stacksize size Maximum stack size limit."
-.It "pseudoterminals number Maximum number of pseudo-terminals."
.It "swapuse size Maximum swap space size limit."
.It "umtxp number Maximum number of process-shared pthread locks."
-.It "pipebuf size Maximum size of pipe buffers."
+.It "vmemoryuse size Maximum permitted total VM usage per process."
.El
.Pp
These resource limit entries actually specify both the maximum
diff --git a/lib/libutil/login_class.c b/lib/libutil/login_class.c
index 90e4e01f7c3b..8a465e2eb24e 100644
--- a/lib/libutil/login_class.c
+++ b/lib/libutil/login_class.c
@@ -63,9 +63,9 @@ static struct login_res {
{ "vmemoryuse", login_getcapsize, RLIMIT_VMEM },
{ "pseudoterminals", login_getcapnum, RLIMIT_NPTS },
{ "swapuse", login_getcapsize, RLIMIT_SWAP },
- { "kqueues", login_getcapsize, RLIMIT_KQUEUES },
+ { "kqueues", login_getcapnum, RLIMIT_KQUEUES },
{ "umtxp", login_getcapnum, RLIMIT_UMTXP },
- { "pipebuf", login_getcapnum, RLIMIT_PIPEBUF },
+ { "pipebuf", login_getcapsize, RLIMIT_PIPEBUF },
{ "vms", login_getcapnum, RLIMIT_VMM },
{ NULL, 0, 0 }
};