aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/libbz2/Makefile13
-rw-r--r--lib/libbz2/bzip2.pc.in11
-rw-r--r--lib/libc/gen/fts.3146
-rw-r--r--lib/libc/gen/fts.c3
-rw-r--r--lib/libc/gen/getgrouplist.333
-rw-r--r--lib/libc/gen/initgroups.38
-rw-r--r--lib/libcasper/services/cap_fileargs/cap_fileargs.h2
-rw-r--r--lib/libsys/getgroups.225
-rw-r--r--lib/libunbound/config.h4
-rw-r--r--lib/msun/src/e_remainder.c4
10 files changed, 193 insertions, 56 deletions
diff --git a/lib/libbz2/Makefile b/lib/libbz2/Makefile
index d773f202dd67..2aedbaed4328 100644
--- a/lib/libbz2/Makefile
+++ b/lib/libbz2/Makefile
@@ -13,4 +13,17 @@ CFLAGS+= -I${BZ2DIR}
WARNS?= 3
+BZIP2_VERSION!= sed -n '/bzip2\/libbzip2 version /{s/.*version //;s/ of.*//p;q;}' ${BZ2DIR}/bzlib.h
+
+bzip2.pc: bzip2.pc.in
+ sed -e 's,@prefix@,/usr,g ; \
+ s,@exec_prefix@,$${prefix},g ; \
+ s,@libdir@,${LIBDIR},g ; \
+ s,@sharedlibdir@,${SHLIBDIR},g ; \
+ s,@includedir@,${INCLUDEDIR},g ; \
+ s,@VERSION@,${BZIP2_VERSION},g ;' \
+ ${.ALLSRC} > ${.TARGET}
+
+PCFILES= bzip2.pc
+
.include <bsd.lib.mk>
diff --git a/lib/libbz2/bzip2.pc.in b/lib/libbz2/bzip2.pc.in
new file mode 100644
index 000000000000..d91c9931a58a
--- /dev/null
+++ b/lib/libbz2/bzip2.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+sharedlibdir=@sharedlibdir@
+includedir=@includedir@
+
+Name: bzip2
+Description: bzip2 compression library
+Version: @VERSION@
+Libs: -L${libdir} -lbz2
+Cflags: -I${includedir}
diff --git a/lib/libc/gen/fts.3 b/lib/libc/gen/fts.3
index b937607b48e0..da304e59ee72 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 1, 2025
+.Dd October 6, 2025
.Dt FTS 3
.Os
.Sh NAME
@@ -69,14 +69,15 @@ on a file hierarchy, which is then supplied to
the other
.Nm
functions.
-The function
+The
.Fn fts_read
-returns a pointer to a structure describing one of the files in the file
-hierarchy.
-The function
+function returns a pointer to a structure describing one of the files
+in the file hierarchy.
+The
.Fn fts_children
-returns a pointer to a linked list of structures, each of which describes
-one of the files contained in a directory in the hierarchy.
+function returns a pointer to a linked list of structures, each of
+which describes one of the files contained in a directory in the
+hierarchy.
In general, directories are visited two distinguishable times; in pre-order
(before any of their descendants are visited) and in post-order (after all
of their descendants have been visited).
@@ -544,10 +545,10 @@ from descending into directories that have a different device number
than the file from which the descent began.
.El
.Pp
-The argument
-.Fn compar
-specifies a user-defined function which may be used to order the traversal
-of the hierarchy.
+The
+.Fa compar
+argument points to a user-defined function which may be used to order
+the traversal of the hierarchy.
It
takes two pointers to pointers to
.Vt FTSENT
@@ -625,6 +626,15 @@ structure is returned, and
.Va errno
may or may not have been set (see
.Fa fts_info ) .
+Note that
+.Fn fts_read
+will not set
+.Va errno
+to 0 if called again with the same
+.Fa ftsp
+argument after the
+.Dv FTS_STOP
+flag has been set or the end of the stream has been reached.
.Pp
The
.Vt FTSENT
@@ -639,9 +649,9 @@ directory, in which case they will not be overwritten until after a call to
.Fn fts_read
after the
.Vt FTSENT
-structure has been returned by the function
+structure has been returned by the
.Fn fts_read
-in post-order.
+function in post-order.
.Ss Fn fts_children
The
.Fn fts_children
@@ -717,10 +727,10 @@ and
fields.
.El
.Ss Fn fts_set
-The function
+The
.Fn fts_set
-allows the user application to determine further processing for the
-file
+function allows the user application to determine further processing
+for the file
.Fa f
of the stream
.Fa ftsp .
@@ -786,6 +796,39 @@ The file may be one of those most recently returned by either
or
.Fn fts_read .
.El
+.Ss Fn fts_set_clientptr , Fn fts_get_clientptr
+The
+.Fn fts_set_clientptr
+function sets the client data pointer for the stream
+.Fa ftsp
+to
+.Fa clientdata .
+The
+.Fn fts_get_clientptr
+function returns the client data pointer associated with
+.Fa ftsp .
+This can be used to pass per-stream data to the comparison function.
+.Pp
+For performance reasons,
+.Fn fts_get_clientptr
+may be shadowed by a preprocessor macro.
+.Ss Fn fts_get_stream
+The
+.Fn fts_get_stream
+function returns the
+.Nm
+stream associated with the file entry
+.Fa f .
+A typical use for this would be for a comparison function to first call
+.Fn fts_get_stream
+on one of its arguments, then call
+.Fn fts_get_clientptr
+to obtain the client data pointer, which in turn points to information
+necessary to correctly order the two entries.
+.Pp
+For performance reasons,
+.Fn fts_get_stream
+may be shadowed by a preprocessor macro.
.Ss Fn fts_close
The
.Fn fts_close
@@ -797,6 +840,75 @@ or
.Fn fts_open_b
was called to open
.Fa ftsp .
+.Sh RETURN VALUES
+The
+.Fn fts_open
+and
+.Fn fts_open_b
+functions return a pointer to the new
+.Nm
+stream on success and
+.Dv NULL
+on failure.
+.Pp
+The
+.Fn fts_read
+function returns a pointer to the next file entry on success, or if an
+error occurs that relates specifically to that file entry.
+On reaching the end of the file hierarchy, it returns
+.Dv NULL
+and sets the external variable
+.Va errno
+to 0.
+On failure, it returns
+.Dv NULL
+and sets
+.Va errno
+to an appropriate non-zero value.
+If called again after the
+.Dv FTS_STOP
+flag has been set or the end of the stream has been reached,
+.Fn fts_read
+returns
+.Dv NULL
+and leaves
+.Va errno
+untouched.
+.Pp
+The
+.Fn fts_children
+function returns a pointer to a linked list of file entries on
+success.
+On reaching the end of the file hierarchy, it returns
+.Dv NULL
+and sets the external variable
+.Va errno
+to 0.
+On failure, it returns
+.Dv NULL
+and sets
+.Va errno
+to an appropriate non-zero value.
+.Pp
+The
+.Fn fts_set
+function returns 0 on success and \-1 if its
+.Fa instr
+argument is invalid.
+.Pp
+The
+.Fn fts_get_clientptr
+function returns the client data pointer associated with its argument,
+or
+.Dv NULL
+if none has been set.
+.Pp
+The
+.Fn fts_get_stream
+function returns a pointer to the
+.Nm
+stream associated with its argument.
+.Pp
The
.Fn fts_close
function
@@ -853,7 +965,7 @@ functions may fail and set
as follows:
.Bl -tag -width Er
.It Bq Er EINVAL
-The options were invalid, or the list were empty.
+The options were invalid, or the list was empty.
.El
.Sh SEE ALSO
.Xr find 1 ,
diff --git a/lib/libc/gen/fts.c b/lib/libc/gen/fts.c
index cce959ba836a..4aa386d777cd 100644
--- a/lib/libc/gen/fts.c
+++ b/lib/libc/gen/fts.c
@@ -106,7 +106,6 @@ struct _fts_private {
* This assumption only holds for UFS-like filesystems that implement
* links and directories this way, so we must punt for others.
*/
-
static const char *ufslike_filesystems[] = {
"ufs",
"zfs",
@@ -679,7 +678,6 @@ fts_children(FTS *sp, int instr)
void *
(fts_get_clientptr)(FTS *sp)
{
-
return (fts_get_clientptr(sp));
}
@@ -696,7 +694,6 @@ FTS *
void
fts_set_clientptr(FTS *sp, void *clientptr)
{
-
sp->fts_clientptr = clientptr;
}
diff --git a/lib/libc/gen/getgrouplist.3 b/lib/libc/gen/getgrouplist.3
index e3939fc2481a..9e05ff7e7a29 100644
--- a/lib/libc/gen/getgrouplist.3
+++ b/lib/libc/gen/getgrouplist.3
@@ -33,7 +33,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd August 29, 2025
+.Dd October 9, 2025
.Dt GETGROUPLIST 3
.Os
.Sh NAME
@@ -48,30 +48,37 @@
.Sh DESCRIPTION
The
.Fn getgrouplist
-function reads through the group database to retrieve the supplementary groups
-for the user specified in
-.Fa name ,
+function retrieves from the group database the supplementary groups for the user
+specified in
+.Fa name
and returns the effective group list, whose first group is the value of
.Fa basegid
-and the others are the retrieved supplementary groups.
+and the others are the supplementary groups.
.Fa basegid
-typically is the user's group number from the password database.
+typically is the user's initial numerical group ID from the password database.
.Pp
The effective group list is returned in the array pointed to by
.Fa groups .
-The caller specifies the size of the
+The caller specifies the length of the
.Fa groups
array in the integer pointed to by
-.Fa ngroups ;
-the actual number of groups found is returned in
+.Fa ngroups .
+The number of groups of the effective group list, which may be greater than the
+.Fa groups
+array's length, is returned through
.Fa ngroups .
.Sh RETURN VALUES
The
.Fn getgrouplist
-function
-returns 0 on success and \-1 if the size of the group list is too small to
-hold all the user's groups.
-Here, the group array will be filled with as many groups as will fit.
+function returns 0 on success and \-1 if the length of the group list is too
+small to hold all the user's groups.
+In the latter case, the
+.Fa groups
+array is filled with as many groups as possible from the start of the effective
+group list, and the length pointed to by
+.Fa ngroups
+is set to the full length of the latter, thus to a value strictly greater than
+before the call.
.Sh FILES
.Bl -tag -width /etc/group -compact
.It Pa /etc/group
diff --git a/lib/libc/gen/initgroups.3 b/lib/libc/gen/initgroups.3
index 4f538fb180ec..74133e7d7048 100644
--- a/lib/libc/gen/initgroups.3
+++ b/lib/libc/gen/initgroups.3
@@ -33,7 +33,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd September 17, 2025
+.Dd October 9, 2025
.Dt INITGROUPS 3
.Os
.Sh NAME
@@ -67,9 +67,9 @@ The
.Fn initgroups
function may fail and set
.Va errno
-to any of the errors specified for the library function
-.Xr setgroups 2 .
-It may also return:
+to any of the errors specified for the
+.Xr setgroups 2
+system call, or to:
.Bl -tag -width Er
.It Bq Er ENOMEM
The
diff --git a/lib/libcasper/services/cap_fileargs/cap_fileargs.h b/lib/libcasper/services/cap_fileargs/cap_fileargs.h
index 8207671d9753..d3a0150044d7 100644
--- a/lib/libcasper/services/cap_fileargs/cap_fileargs.h
+++ b/lib/libcasper/services/cap_fileargs/cap_fileargs.h
@@ -75,7 +75,7 @@ fileargs_init(int argc __unused, char *argv[] __unused, int flags, mode_t mode,
cap_rights_t *rightsp __unused, int operations __unused) {
fileargs_t *fa;
- fa = malloc(sizeof(*fa));
+ fa = (fileargs_t *)malloc(sizeof(*fa));
if (fa != NULL) {
fa->fa_flags = flags;
fa->fa_mode = mode;
diff --git a/lib/libsys/getgroups.2 b/lib/libsys/getgroups.2
index 4881a65d532e..4e94b32d4e7b 100644
--- a/lib/libsys/getgroups.2
+++ b/lib/libsys/getgroups.2
@@ -33,7 +33,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd September 17, 2025
+.Dd October 10, 2025
.Dt GETGROUPS 2
.Os
.Sh NAME
@@ -107,10 +107,8 @@ array.
The
.Fn getgroups
system call conforms to
-.St -p1003.1-2008
-with the additional properties that supplementary groups are reported in
-strictly ascending order and the returned size coincides with the cardinal of
-the set.
+.St -p1003.1-2008 ,
+not reporting the effective group ID.
.Sh HISTORY
The
.Fn getgroups
@@ -121,8 +119,8 @@ Since
.Fx 14.3 ,
the
.Fn getgroups
-system call has treated the supplementary groups as a set, reporting them in
-strictly ascending order and returning the cardinal of the set.
+system call has been reporting the supplementary groups in strictly ascending
+order.
.Pp
Before
.Fx 15.0 ,
@@ -138,15 +136,14 @@ system call gets the supplementary groups set in the
array.
In particular, as evoked in
.Sx HISTORY ,
-it does not anymore retrieve the effective GID in the first slot of
+it does not anymore retrieve the effective group ID in the first slot of
.Fa gidset .
-Programs should not make any assumption about which group is placed in the first
-slot of
-.Fa gidset
-other than it being the supplementary group with smallest GID.
+Programs that process this slot in a specific way must be modified to obtain the
+effective group ID through other means, such as a call to
+.Xr getegid 2 .
.Pp
-The effective GID is present in the supplementary groups set if and only if it
-was explicitly set as a supplementary group.
+The effective group ID is present in the supplementary groups set if and only if
+it was explicitly set as a supplementary group.
The function
.Fn initgroups
enforces that, while the
diff --git a/lib/libunbound/config.h b/lib/libunbound/config.h
index 51105977b20a..1cedf5b4de36 100644
--- a/lib/libunbound/config.h
+++ b/lib/libunbound/config.h
@@ -884,7 +884,7 @@
#define PACKAGE_NAME "unbound"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "unbound 1.23.1"
+#define PACKAGE_STRING "unbound 1.24.0"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "unbound"
@@ -893,7 +893,7 @@
#define PACKAGE_URL ""
/* Define to the version of this package. */
-#define PACKAGE_VERSION "1.23.1"
+#define PACKAGE_VERSION "1.24.0"
/* default pidfile location */
#define PIDFILE "/var/unbound/unbound.pid"
diff --git a/lib/msun/src/e_remainder.c b/lib/msun/src/e_remainder.c
index a5fb7141d01a..cc6cd320073e 100644
--- a/lib/msun/src/e_remainder.c
+++ b/lib/msun/src/e_remainder.c
@@ -64,8 +64,8 @@ remainder(double x, double p)
if(x>=p_half) x -= p;
}
}
- GET_HIGH_WORD(hx,x);
- if ((hx&0x7fffffff)==0) hx = 0;
+ EXTRACT_WORDS(hx, lx, x);
+ if (((hx&0x7fffffff)|lx) == 0) hx = 0;
SET_HIGH_WORD(x,hx^sx);
return x;
}