Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libbsd for openSUSE:Factory checked in at 2022-10-14 15:40:37 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libbsd (Old) and /work/SRC/openSUSE:Factory/.libbsd.new.2275 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libbsd" Fri Oct 14 15:40:37 2022 rev:10 rq:1010204 version:0.11.7 Changes: -------- --- /work/SRC/openSUSE:Factory/libbsd/libbsd.changes 2022-04-22 21:53:30.266754733 +0200 +++ /work/SRC/openSUSE:Factory/.libbsd.new.2275/libbsd.changes 2022-10-14 15:41:21.951800832 +0200 @@ -1,0 +2,23 @@ +Fri Oct 7 12:04:07 UTC 2022 - Dirk M??ller <dmuel...@suse.com> + +- update to 0.11.7: + * man: Discourage using the library in non-overlay mode + * include: Adjust reallocarray() per glibc adoption + * include: Adjust arc4random() per glibc adoption + * include: explicit_bzero() requires _DEFAULT_SOURCE + * include: Simplify glibc version dependent macro handling + * doc: Switch references from pkg-config to pkgconf + * doc: Add missing empty line to separate README sections + * doc: Refer to the main git repository as primary + * test: Fix explicit_bzero() test on the Hurd + * fgetwln: Add comment about lack of getwline(3) for recommendation + * setmode: Dot not use saveset after free + * man: Rewrite gerprogname(3bsd) from scratch + * man: Lowercase man page title + * man: Document that some arc4random(3) functions are now in glibc 2.36 + * Sync arc4random(3) implementation from OpenBSD + * Fix ELF support for big endian SH + * man: Use -compact also for alternative functions in libbsd(7) + * getentropy: Fix function cast for getauxval() + +------------------------------------------------------------------- Old: ---- libbsd-0.11.6.tar.xz libbsd-0.11.6.tar.xz.asc New: ---- libbsd-0.11.7.tar.xz libbsd-0.11.7.tar.xz.asc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libbsd.spec ++++++ --- /var/tmp/diff_new_pack.VH48Nb/_old 2022-10-14 15:41:22.335801474 +0200 +++ /var/tmp/diff_new_pack.VH48Nb/_new 2022-10-14 15:41:22.347801494 +0200 @@ -18,7 +18,7 @@ %define lname libbsd0 Name: libbsd -Version: 0.11.6 +Version: 0.11.7 Release: 0 Summary: Library with functions commonly found on BSD systems License: BSD-3-Clause ++++++ libbsd-0.11.6.tar.xz -> libbsd-0.11.7.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/.dist-version new/libbsd-0.11.7/.dist-version --- old/libbsd-0.11.6/.dist-version 2022-03-30 23:12:19.000000000 +0200 +++ new/libbsd-0.11.7/.dist-version 2022-10-06 04:08:52.000000000 +0200 @@ -1 +1 @@ -0.11.6 +0.11.7 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/COPYING new/libbsd-0.11.7/COPYING --- old/libbsd-0.11.6/COPYING 2022-03-30 22:58:40.000000000 +0200 +++ new/libbsd-0.11.7/COPYING 2022-10-04 04:29:37.000000000 +0200 @@ -38,39 +38,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Files: - man/getprogname.3bsd -Copyright: - Copyright ?? 2001 Christopher G. Demetriou - All rights reserved. -License: BSD-4-clause-Christopher-G-Demetriou - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. All advertising materials mentioning features or use of this software - must display the following acknowledgement: - This product includes software developed for the - NetBSD Project. See http://www.netbsd.org/ for - information about NetBSD. - 4. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - . - THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Files: include/bsd/err.h include/bsd/stdlib.h include/bsd/sys/param.h @@ -402,7 +369,7 @@ Copyright ?? 2014 Theo de Raadt <dera...@openbsd.org> Copyright ?? 2014 Google Inc. Copyright ?? 2015 Michael Felt <aixto...@gmail.com> - Copyright ?? 2015 Guillem Jover <guil...@hadrons.org> + Copyright ?? 2015, 2022 Guillem Jover <guil...@hadrons.org> License: ISC Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/ChangeLog new/libbsd-0.11.7/ChangeLog --- old/libbsd-0.11.6/ChangeLog 2022-03-30 23:12:20.000000000 +0200 +++ new/libbsd-0.11.7/ChangeLog 2022-10-06 04:08:53.000000000 +0200 @@ -1,3 +1,302 @@ +commit 084911ce875f444a5739fae6255770b6a575aba4 +Author: Guillem Jover <guil...@hadrons.org> +Date: Thu Oct 6 04:07:52 2022 +0200 + + Release libbsd 0.11.7 + + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 3538d38fe7062c35d4f405fee2ce40588c0d8205 +Author: Guillem Jover <guil...@hadrons.org> +Date: Thu Oct 6 03:59:33 2022 +0200 + + man: Discourage using the library in non-overlay mode + + This makes code using it non-portable, and requires the namespeced + headers from libbsd, instead of any generic system headers. It also + requires more code changes than the overlay mode. + + man/libbsd.7 | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 03fccd150512ad22c9e27e5d597bf02190ee93cf +Author: Guillem Jover <guil...@hadrons.org> +Date: Wed Oct 5 12:08:31 2022 +0200 + + include: Adjust reallocarray() per glibc adoption + + On glibc 2.29 reallocarray() was moved to _DEFAULT_SOURCE. + + Closes: !20 + Based-on-patch-by: Callum Farmer <gm...@opensuse.org> + Signed-off-by: Guillem Jover <guil...@hadrons.org> + + include/bsd/stdlib.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit 6b6e686b23214ef37c30d5e1568156ba18e76f29 +Author: Callum Farmer <gm...@opensuse.org> +Date: Wed Oct 5 12:08:31 2022 +0200 + + include: Adjust arc4random() per glibc adoption + + Some arc4random functions were added in glibc 2.36. + + Signed-off-by: Callum Farmer <gm...@opensuse.org> + Signed-off-by: Guillem Jover <guil...@hadrons.org> + + include/bsd/stdlib.h | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +commit da1f45ac71ac0db7f2ad48fd3dbf24e719723ee1 +Author: Callum Farmer <gm...@opensuse.org> +Date: Mon Oct 3 16:09:18 2022 +0100 + + include: explicit_bzero() requires _DEFAULT_SOURCE + + Signed-off-by: Callum Farmer <gm...@opensuse.org> + Signed-off-by: Guillem Jover <guil...@hadrons.org> + + include/bsd/string.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 2f9eddc277187e25167331ae3bde4a491fd87fa2 +Author: Guillem Jover <guil...@hadrons.org> +Date: Wed Oct 5 02:05:46 2022 +0200 + + include: Simplify glibc version dependent macro handling + + We test once whether __GLIBC__ is not defined, so we do not need to test + whether it is on the OR branch afterwards. We decouple the glibc version + restriction check from the _*_SOURCE variable, as that contains an + implicit opposite version check. + + include/bsd/stdlib.h | 3 ++- + include/bsd/string.h | 3 ++- + 2 files changed, 4 insertions(+), 2 deletions(-) + +commit 28298ac0372f320174eb591e0e2879abcc568521 +Author: Guillem Jover <guil...@hadrons.org> +Date: Wed Oct 5 01:35:08 2022 +0200 + + doc: Switch references from pkg-config to pkgconf + + The former used to be the reference implementation, but it has been + stagnant to the point of not showing much signs of life. Switch to + the currently active and more complete implementation for references. + + man/libbsd.7 | 6 +++--- + man/setproctitle.3bsd | 2 +- + src/setproctitle_ctor.c | 2 +- + 3 files changed, 5 insertions(+), 5 deletions(-) + +commit ef981f930b0e7ab64eef1985d5e812bada3a6332 +Author: Guillem Jover <guil...@hadrons.org> +Date: Tue Oct 4 04:28:05 2022 +0200 + + doc: Add missing empty line to separate README sections + + README | 3 +++ + 1 file changed, 3 insertions(+) + +commit 6928d7895edfe8a62d3c73d8938713c5ddb29774 +Author: Guillem Jover <guil...@hadrons.org> +Date: Tue Oct 4 04:27:44 2022 +0200 + + doc: Refer to the main git repository as primary + + README | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit d5865759f8698f1c75339451a26fa3ae00276a51 +Author: Guillem Jover <guil...@hadrons.org> +Date: Thu Aug 25 00:52:43 2022 +0200 + + test: Fix explicit_bzero() test on the Hurd + + On the Hurd a small read(3) might end up (indirectly) copying the data + on the stack, which we will end up finding even when we have cleared + the buffer. + + To avoid these side effects, we add a new function, that we force not + to be inlined, so that we can reuse the same stack space, that will + blank any possible stack side effects. This should be portable + regardless of stack growing up or down. + + Diagnosis-by: Samuel Thibault <sthiba...@debian.org> + + COPYING | 2 +- + test/explicit_bzero.c | 15 +++++++++++++++ + 2 files changed, 16 insertions(+), 1 deletion(-) + +commit be327c6ebe408ae144e9c93aab9cb65fce116f33 +Author: Guillem Jover <guil...@hadrons.org> +Date: Wed Aug 24 01:58:58 2022 +0200 + + fgetwln: Add comment about lack of getwline(3) for recommendation + + Ideally we'd recommend getwline(3), but unfortunately even though it + was part of the ISO/IEC TR 24731-2:2010 draft, it did not make it into + C11 and is not widely implemented. + + src/fgetwln.c | 3 +++ + 1 file changed, 3 insertions(+) + +commit a14612d96819d5e0561bff2da89a6fdea990223c +Author: Guillem Jover <guil...@hadrons.org> +Date: Tue Aug 23 23:49:34 2022 +0200 + + setmode: Dot not use saveset after free + + While we are only doing a pointer difference and not dereferencing it, + it's easier and more correct to do the pointer difference before passing + it to reallocarray(). + + Warned-by: gcc + + src/setmode.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +commit f4baceb82c1de18eed363930632284455ddfec4b +Author: Guillem Jover <guil...@hadrons.org> +Date: Wed Aug 3 03:05:52 2022 +0200 + + man: Rewrite gerprogname(3bsd) from scratch + + This gets rid of one of the last man pages with a BSD-4-clause license. + + COPYING | 33 ---------------- + man/getprogname.3bsd | 104 ++++++++++++++++++++++----------------------------- + 2 files changed, 44 insertions(+), 93 deletions(-) + +commit f35c5458477ba5c60b00ab1f4b5199296fae3826 +Author: Guillem Jover <guil...@hadrons.org> +Date: Wed Aug 3 02:21:16 2022 +0200 + + man: Lowercase man page title + + While using fully uppercase man page titles has been the usual + convention for a very long time, it is rather ugly and something that + some other projects are switching away from. + + man/arc4random.3bsd | 2 +- + man/bitstring.3bsd | 2 +- + man/byteorder.3bsd | 2 +- + man/closefrom.3bsd | 2 +- + man/errc.3bsd | 2 +- + man/expand_number.3bsd | 2 +- + man/explicit_bzero.3bsd | 2 +- + man/fgetln.3bsd | 2 +- + man/fgetwln.3bsd | 2 +- + man/flopen.3bsd | 2 +- + man/fmtcheck.3bsd | 2 +- + man/fparseln.3bsd | 2 +- + man/fpurge.3bsd | 2 +- + man/funopen.3bsd | 2 +- + man/getbsize.3bsd | 2 +- + man/getpeereid.3bsd | 2 +- + man/getprogname.3bsd | 2 +- + man/heapsort.3bsd | 2 +- + man/humanize_number.3bsd | 2 +- + man/libbsd.7 | 2 +- + man/nlist.3bsd | 2 +- + man/pidfile.3bsd | 2 +- + man/pwcache.3bsd | 2 +- + man/queue.3bsd | 2 +- + man/radixsort.3bsd | 2 +- + man/readpassphrase.3bsd | 2 +- + man/reallocarray.3bsd | 2 +- + man/reallocf.3bsd | 2 +- + man/setmode.3bsd | 2 +- + man/setproctitle.3bsd | 2 +- + man/stringlist.3bsd | 2 +- + man/strlcpy.3bsd | 2 +- + man/strmode.3bsd | 2 +- + man/strnstr.3bsd | 2 +- + man/strtoi.3bsd | 2 +- + man/strtonum.3bsd | 2 +- + man/strtou.3bsd | 2 +- + man/timeradd.3bsd | 2 +- + man/timeval.3bsd | 2 +- + man/tree.3bsd | 2 +- + man/unvis.3bsd | 2 +- + man/vis.3bsd | 2 +- + man/wcslcpy.3bsd | 2 +- + 43 files changed, 43 insertions(+), 43 deletions(-) + +commit b466b14afb7645d06823982e7695f63cfa1e075c +Author: Guillem Jover <guil...@hadrons.org> +Date: Wed Aug 3 01:23:09 2022 +0200 + + man: Document that some arc4random(3) functions are now in glibc 2.36 + + man/libbsd.7 | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +commit 1f6a48b209d9d494070bb1446b6b5c49bfaa31ba +Author: Guillem Jover <guil...@hadrons.org> +Date: Wed Aug 3 02:03:05 2022 +0200 + + Sync arc4random(3) implementation from OpenBSD + + Closes: #12 + + man/arc4random.3bsd | 6 +++--- + src/arc4random.c | 14 ++++++++++---- + src/chacha_private.h | 4 ++-- + 3 files changed, 15 insertions(+), 9 deletions(-) + +commit 873639ebb5bc3688e5e78d71e5c0c49469498f46 +Author: Fabrice Fontaine <fontaine.fabr...@gmail.com> +Date: Tue Jun 7 19:27:13 2022 +0200 + + Fix ELF support for big endian SH + + Fix the following build failure with big endian SH (e.g. sh4aeb): + + ,--- + In file included from nlist.c:44: + nlist.c: In function '__elf_is_okay__': + local-elf.h:223:25: error: 'ELFDATA2LMSB' undeclared (first use in this function); did you mean 'ELFDATA2LSB'? + 223 | #define ELF_TARG_DATA ELFDATA2LMSB + | ^~~~~~~~~~~~ + `--- + + Fixes: http://autobuild.buildroot.org/results/2980fb79c208454195d77383f1ece9afbd7f981b + Closes: !19 + Signed-off-by: Fabrice Fontaine <fontaine.fabr...@gmail.com> + Signed-off-by: Guillem Jover <guil...@hadrons.org> + + src/local-elf.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit c9c78fdfd0f8551dceec4f26a007ae14bec0e5b7 +Author: Guillem Jover <guil...@hadrons.org> +Date: Mon Apr 4 11:49:52 2022 +0200 + + man: Use -compact also for alternative functions in libbsd(7) + + The other function lists use the compact mode, let's be uniform about + this. + + man/libbsd.7 | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit 5f21307570dff129c2e982a3ab8640d09302b2bf +Author: Guillem Jover <guil...@hadrons.org> +Date: Thu Mar 31 20:46:56 2022 +0200 + + getentropy: Fix function cast for getauxval() + + Fix also the Hurd implementation, missed in the original fix. + + Extends: commit 72a82ee262795c9162e712885381a111fcf988bc + Warned-by: gcc + + src/getentropy_hurd.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + commit 84acf21568e32488a73bf20d5d2ccce643a2d18f Author: Guillem Jover <guil...@hadrons.org> Date: Wed Mar 30 23:09:35 2022 +0200 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/Makefile.in new/libbsd-0.11.7/Makefile.in --- old/libbsd-0.11.6/Makefile.in 2022-03-30 23:12:11.000000000 +0200 +++ new/libbsd-0.11.7/Makefile.in 2022-10-06 04:08:43.000000000 +0200 @@ -165,8 +165,7 @@ $(top_srcdir)/build-aux/ltmain.sh \ $(top_srcdir)/build-aux/missing COPYING README TODO \ build-aux/compile build-aux/config.guess build-aux/config.sub \ - build-aux/depcomp build-aux/install-sh build-aux/ltmain.sh \ - build-aux/missing + build-aux/install-sh build-aux/ltmain.sh build-aux/missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/README new/libbsd-0.11.7/README --- old/libbsd-0.11.6/README 2022-01-23 21:03:12.000000000 +0100 +++ new/libbsd-0.11.7/README 2022-10-04 04:29:37.000000000 +0200 @@ -9,6 +9,7 @@ this is not provided by its libc or libmd libraries, the canonical implementation to use is <https://www.hadrons.org/software/libmd/>. + Releases -------- @@ -30,7 +31,7 @@ Source Repository ----------------- -The master repository can be browsed at: +The primary repository can be browsed at: <https://cgit.freedesktop.org/libbsd> @@ -38,6 +39,7 @@ <https://anongit.freedesktop.org/git/libbsd> + Building from git source ------------------------ @@ -55,6 +57,7 @@ the source should be roughly equivalent to the distributed tar source. + Building from tar source ------------------------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/build-aux/ltmain.sh new/libbsd-0.11.7/build-aux/ltmain.sh --- old/libbsd-0.11.6/build-aux/ltmain.sh 2022-03-30 23:05:43.000000000 +0200 +++ new/libbsd-0.11.7/build-aux/ltmain.sh 2022-10-06 04:08:41.000000000 +0200 @@ -2,7 +2,7 @@ ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in ## by inline-source v2019-02-19.15 -# libtool (GNU libtool) 2.4.6 +# libtool (GNU libtool) 2.4.7 # Provide generalized library-building support services. # Written by Gordon Matzigkeit <g...@gnu.ai.mit.edu>, 1996 @@ -31,8 +31,8 @@ PROGRAM=libtool PACKAGE=libtool -VERSION="2.4.6 Debian-2.4.7-2" -package_revision=2.4.6 +VERSION="2.4.7 Debian-2.4.7-4" +package_revision=2.4.7 ## ------ ## @@ -2217,7 +2217,7 @@ # End: # Set a version string. -scriptversion='(GNU libtool) 2.4.6' +scriptversion='(GNU libtool) 2.4.7' # func_echo ARG... @@ -2308,7 +2308,7 @@ compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) - version: $progname $scriptversion Debian-2.4.7-2 + version: $progname $scriptversion Debian-2.4.7-4 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/configure new/libbsd-0.11.7/configure --- old/libbsd-0.11.6/configure 2022-03-30 23:12:12.000000000 +0200 +++ new/libbsd-0.11.7/configure 2022-10-06 04:08:42.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for libbsd 0.11.6. +# Generated by GNU Autoconf 2.71 for libbsd 0.11.7. # # Report bugs to <lib...@lists.freedesktop.org>. # @@ -621,8 +621,8 @@ # Identity of this package. PACKAGE_NAME='libbsd' PACKAGE_TARNAME='libbsd' -PACKAGE_VERSION='0.11.6' -PACKAGE_STRING='libbsd 0.11.6' +PACKAGE_VERSION='0.11.7' +PACKAGE_STRING='libbsd 0.11.7' PACKAGE_BUGREPORT='lib...@lists.freedesktop.org' PACKAGE_URL='' @@ -1370,7 +1370,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libbsd 0.11.6 to adapt to many kinds of systems. +\`configure' configures libbsd 0.11.7 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1441,7 +1441,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libbsd 0.11.6:";; + short | recursive ) echo "Configuration of libbsd 0.11.7:";; esac cat <<\_ACEOF @@ -1553,7 +1553,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libbsd configure 0.11.6 +libbsd configure 0.11.7 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2041,7 +2041,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libbsd $as_me 0.11.6, which was +It was created by libbsd $as_me 0.11.7, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3316,7 +3316,7 @@ # Define the identity of the package. PACKAGE='libbsd' - VERSION='0.11.6' + VERSION='0.11.7' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -3464,7 +3464,7 @@ LIBBSD_ABI_MAJOR=0 LIBBSD_ABI_MINOR=11 -LIBBSD_ABI_PATCH=6 +LIBBSD_ABI_PATCH=7 LIBBSD_ABI="$LIBBSD_ABI_MAJOR:$LIBBSD_ABI_MINOR:$LIBBSD_ABI_PATCH" @@ -5106,8 +5106,8 @@ -macro_version='2.4.6' -macro_revision='2.4.6' +macro_version='2.4.7' +macro_revision='2.4.7' @@ -17429,7 +17429,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libbsd $as_me 0.11.6, which was +This file was extended by libbsd $as_me 0.11.7, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17497,7 +17497,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -libbsd config.status 0.11.6 +libbsd config.status 0.11.7 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/configure.ac new/libbsd-0.11.7/configure.ac --- old/libbsd-0.11.6/configure.ac 2022-03-30 23:09:22.000000000 +0200 +++ new/libbsd-0.11.7/configure.ac 2022-10-06 04:06:31.000000000 +0200 @@ -13,7 +13,7 @@ LIBBSD_ABI_MAJOR=0 LIBBSD_ABI_MINOR=11 -LIBBSD_ABI_PATCH=6 +LIBBSD_ABI_PATCH=7 LIBBSD_ABI="$LIBBSD_ABI_MAJOR:$LIBBSD_ABI_MINOR:$LIBBSD_ABI_PATCH" AC_SUBST([LIBBSD_ABI]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/include/bsd/stdlib.h new/libbsd-0.11.7/include/bsd/stdlib.h --- old/libbsd-0.11.6/include/bsd/stdlib.h 2021-02-06 23:30:44.000000000 +0100 +++ new/libbsd-0.11.7/include/bsd/stdlib.h 2022-10-05 12:31:49.000000000 +0200 @@ -51,11 +51,15 @@ #include <stdint.h> __BEGIN_DECLS +#if !defined(__GLIBC__) || \ + !__GLIBC_PREREQ(2, 36) || \ + !defined(_DEFAULT_SOURCE) uint32_t arc4random(void); -void arc4random_stir(void); -void arc4random_addrandom(unsigned char *dat, int datlen); void arc4random_buf(void *_buf, size_t n); uint32_t arc4random_uniform(uint32_t upper_bound); +#endif +void arc4random_stir(void); +void arc4random_addrandom(unsigned char *dat, int datlen); int dehumanize_number(const char *str, int64_t *size); @@ -72,7 +76,9 @@ void *reallocf(void *ptr, size_t size); #if !defined(__GLIBC__) || \ - (defined(__GLIBC__) && (!__GLIBC_PREREQ(2, 26) || !defined(_GNU_SOURCE))) + !__GLIBC_PREREQ(2, 26) || \ + (__GLIBC_PREREQ(2, 26) && !__GLIBC_PREREQ(2, 29) && !defined(_GNU_SOURCE)) || \ + (__GLIBC_PREREQ(2, 29) && !defined(_DEFAULT_SOURCE)) void *reallocarray(void *ptr, size_t nmemb, size_t size); #endif void *recallocarray(void *ptr, size_t oldnmemb, size_t nmemb, size_t size); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/include/bsd/string.h new/libbsd-0.11.7/include/bsd/string.h --- old/libbsd-0.11.6/include/bsd/string.h 2018-03-21 23:01:33.000000000 +0100 +++ new/libbsd-0.11.7/include/bsd/string.h 2022-10-05 12:15:36.000000000 +0200 @@ -47,7 +47,8 @@ void strmode(mode_t mode, char *str); #if !defined(__GLIBC__) || \ - (defined(__GLIBC__) && (!__GLIBC_PREREQ(2, 25) || !defined(_GNU_SOURCE))) + !__GLIBC_PREREQ(2, 25) || \ + !defined(_DEFAULT_SOURCE) void explicit_bzero(void *buf, size_t len); #endif __END_DECLS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/m4/ltversion.m4 new/libbsd-0.11.7/m4/ltversion.m4 --- old/libbsd-0.11.6/m4/ltversion.m4 2022-03-30 23:05:43.000000000 +0200 +++ new/libbsd-0.11.7/m4/ltversion.m4 2022-10-06 04:08:41.000000000 +0200 @@ -10,15 +10,15 @@ # @configure_input@ -# serial 4179 ltversion.m4 +# serial 4245 ltversion.m4 # This file is part of GNU Libtool -m4_define([LT_PACKAGE_VERSION], [2.4.6]) -m4_define([LT_PACKAGE_REVISION], [2.4.6]) +m4_define([LT_PACKAGE_VERSION], [2.4.7]) +m4_define([LT_PACKAGE_REVISION], [2.4.7]) AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.4.6' -macro_revision='2.4.6' +[macro_version='2.4.7' +macro_revision='2.4.7' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/man/arc4random.3bsd new/libbsd-0.11.7/man/arc4random.3bsd --- old/libbsd-0.11.6/man/arc4random.3bsd 2019-08-11 23:47:47.000000000 +0200 +++ new/libbsd-0.11.7/man/arc4random.3bsd 2022-08-03 11:39:31.000000000 +0200 @@ -1,4 +1,4 @@ -.\" $OpenBSD: arc4random.3,v 1.34 2014/07/19 16:11:16 naddy Exp $ +.\" $OpenBSD: arc4random.3,v 1.37 2019/09/29 16:30:35 jmc Exp $ .\" .\" Copyright 1997 Niels Provos <pro...@physnet.uni-hamburg.de> .\" All rights reserved. @@ -30,8 +30,8 @@ .\" .\" Manual page, using -mandoc macros .\" -.Dd $Mdocdate: July 19 2014 $ -.Dt ARC4RANDOM 3bsd +.Dd $Mdocdate: September 29 2019 $ +.Dt arc4random 3bsd .Os .Sh NAME .Nm arc4random , @@ -39,7 +39,7 @@ .Nm arc4random_uniform , .Nm arc4random_stir , .Nm arc4random_addrandom -.Nd arc4 random number generator +.Nd random number generator .Sh LIBRARY .ds str-Lb-libbsd Utility functions from BSD systems (libbsd, \-lbsd) .ds doc-str-Lb-libbsd \*[str-Lb-libbsd] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/man/bitstring.3bsd new/libbsd-0.11.7/man/bitstring.3bsd --- old/libbsd-0.11.6/man/bitstring.3bsd 2020-12-21 19:15:35.000000000 +0100 +++ new/libbsd-0.11.7/man/bitstring.3bsd 2022-08-03 11:39:31.000000000 +0200 @@ -31,7 +31,7 @@ .\" $FreeBSD$ .\" .Dd July 19, 1993 -.Dt BITSTRING 3bsd +.Dt bitstring 3bsd .Os .Sh NAME .Nm bit_alloc , diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/man/byteorder.3bsd new/libbsd-0.11.7/man/byteorder.3bsd --- old/libbsd-0.11.6/man/byteorder.3bsd 2020-12-21 19:15:35.000000000 +0100 +++ new/libbsd-0.11.7/man/byteorder.3bsd 2022-08-03 11:39:31.000000000 +0200 @@ -25,7 +25,7 @@ .\" $FreeBSD$ .\" .Dd April 29, 2002 -.Dt BYTEORDER 3bsd +.Dt byteorder 3bsd .Os .Sh NAME .Nm be16enc , be16dec , be32enc , be32dec , be64enc , be64dec , diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/man/closefrom.3bsd new/libbsd-0.11.7/man/closefrom.3bsd --- old/libbsd-0.11.6/man/closefrom.3bsd 2019-08-11 23:47:47.000000000 +0200 +++ new/libbsd-0.11.7/man/closefrom.3bsd 2022-08-03 11:39:31.000000000 +0200 @@ -26,7 +26,7 @@ .\" $FreeBSD$ .\" .Dd June 12, 2009 -.Dt CLOSEFROM 3bsd +.Dt closefrom 3bsd .Os .Sh NAME .Nm closefrom diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/man/errc.3bsd new/libbsd-0.11.7/man/errc.3bsd --- old/libbsd-0.11.6/man/errc.3bsd 2019-08-11 23:47:47.000000000 +0200 +++ new/libbsd-0.11.7/man/errc.3bsd 2022-08-03 11:39:31.000000000 +0200 @@ -28,7 +28,7 @@ .\" SUCH DAMAGE. .\" .Dd $Mdocdate: April 23 2014 $ -.Dt ERRC 3bsd +.Dt errc 3bsd .Os .Sh NAME .Nm errc , diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/man/expand_number.3bsd new/libbsd-0.11.7/man/expand_number.3bsd --- old/libbsd-0.11.6/man/expand_number.3bsd 2019-08-11 23:47:47.000000000 +0200 +++ new/libbsd-0.11.7/man/expand_number.3bsd 2022-08-03 11:39:31.000000000 +0200 @@ -26,7 +26,7 @@ .\" $FreeBSD$ .\" .Dd August 15, 2010 -.Dt EXPAND_NUMBER 3bsd +.Dt expand_number 3bsd .Os .Sh NAME .Nm expand_number diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/man/explicit_bzero.3bsd new/libbsd-0.11.7/man/explicit_bzero.3bsd --- old/libbsd-0.11.6/man/explicit_bzero.3bsd 2019-08-11 23:47:47.000000000 +0200 +++ new/libbsd-0.11.7/man/explicit_bzero.3bsd 2022-08-03 11:39:31.000000000 +0200 @@ -30,7 +30,7 @@ .\" $OpenBSD: bzero.3,v 1.10 2014/01/22 21:06:45 tedu Exp $ .\" .Dd $Mdocdate: January 22 2014 $ -.Dt EXPLICIT_BZERO 3bsd +.Dt explicit_bzero 3bsd .Os .Sh NAME .Nm explicit_bzero diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/man/fgetln.3bsd new/libbsd-0.11.7/man/fgetln.3bsd --- old/libbsd-0.11.6/man/fgetln.3bsd 2019-08-11 23:47:47.000000000 +0200 +++ new/libbsd-0.11.7/man/fgetln.3bsd 2022-08-03 11:39:31.000000000 +0200 @@ -29,7 +29,7 @@ .\" $FreeBSD: /repoman/r/ncvs/src/lib/libc/stdio/fgetln.3,v 1.8 2004/07/16 06:07:12 tjr Exp $ .\" .Dd April 19, 1994 -.Dt FGETLN 3bsd +.Dt fgetln 3bsd .Os .Sh NAME .Nm fgetln diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/man/fgetwln.3bsd new/libbsd-0.11.7/man/fgetwln.3bsd --- old/libbsd-0.11.6/man/fgetwln.3bsd 2019-08-11 23:47:47.000000000 +0200 +++ new/libbsd-0.11.7/man/fgetwln.3bsd 2022-08-03 11:39:31.000000000 +0200 @@ -29,7 +29,7 @@ .\" $FreeBSD$ .\" .Dd July 16, 2004 -.Dt FGETWLN 3bsd +.Dt fgetwln 3bsd .Os .Sh NAME .Nm fgetwln diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/man/flopen.3bsd new/libbsd-0.11.7/man/flopen.3bsd --- old/libbsd-0.11.6/man/flopen.3bsd 2019-08-11 23:47:47.000000000 +0200 +++ new/libbsd-0.11.7/man/flopen.3bsd 2022-08-03 11:39:31.000000000 +0200 @@ -26,7 +26,7 @@ .\" $FreeBSD$ .\" .Dd July 28, 2017 -.Dt FLOPEN 3bsd +.Dt flopen 3bsd .Os .Sh NAME .Nm flopen , diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/man/fmtcheck.3bsd new/libbsd-0.11.7/man/fmtcheck.3bsd --- old/libbsd-0.11.6/man/fmtcheck.3bsd 2019-08-11 23:47:47.000000000 +0200 +++ new/libbsd-0.11.7/man/fmtcheck.3bsd 2022-08-03 11:39:31.000000000 +0200 @@ -27,7 +27,7 @@ .\" POSSIBILITY OF SUCH DAMAGE. .\" .Dd June 14, 2014 -.Dt FMTCHECK 3bsd +.Dt fmtcheck 3bsd .Os .Sh NAME .Nm fmtcheck diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/man/fparseln.3bsd new/libbsd-0.11.7/man/fparseln.3bsd --- old/libbsd-0.11.6/man/fparseln.3bsd 2019-08-11 23:47:47.000000000 +0200 +++ new/libbsd-0.11.7/man/fparseln.3bsd 2022-08-03 11:39:31.000000000 +0200 @@ -23,7 +23,7 @@ .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .Dd November 30, 2002 -.Dt FPARSELN 3bsd +.Dt fparseln 3bsd .Os .Sh NAME .Nm fparseln diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/man/fpurge.3bsd new/libbsd-0.11.7/man/fpurge.3bsd --- old/libbsd-0.11.6/man/fpurge.3bsd 2019-08-11 23:47:47.000000000 +0200 +++ new/libbsd-0.11.7/man/fpurge.3bsd 2022-08-03 11:39:31.000000000 +0200 @@ -32,7 +32,7 @@ .\" SUCH DAMAGE. .\" .Dd $Mdocdate: November 4 2015 $ -.Dt FPURGE 3bsd +.Dt fpurge 3bsd .Os .Sh NAME .Nm fpurge diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/man/funopen.3bsd new/libbsd-0.11.7/man/funopen.3bsd --- old/libbsd-0.11.6/man/funopen.3bsd 2019-08-11 23:47:47.000000000 +0200 +++ new/libbsd-0.11.7/man/funopen.3bsd 2022-08-03 11:39:31.000000000 +0200 @@ -31,7 +31,7 @@ .\" $FreeBSD$ .\" .Dd March 19, 2004 -.Dt FUNOPEN 3bsd +.Dt funopen 3bsd .Os .Sh NAME .Nm funopen , diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/man/getbsize.3bsd new/libbsd-0.11.7/man/getbsize.3bsd --- old/libbsd-0.11.6/man/getbsize.3bsd 2019-08-11 23:47:47.000000000 +0200 +++ new/libbsd-0.11.7/man/getbsize.3bsd 2022-08-03 11:39:31.000000000 +0200 @@ -29,7 +29,7 @@ .\" $FreeBSD$ .\" .Dd November 16, 2012 -.Dt GETBSIZE 3bsd +.Dt getbsize 3bsd .Os .Sh NAME .Nm getbsize diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/man/getpeereid.3bsd new/libbsd-0.11.7/man/getpeereid.3bsd --- old/libbsd-0.11.6/man/getpeereid.3bsd 2019-08-11 23:47:47.000000000 +0200 +++ new/libbsd-0.11.7/man/getpeereid.3bsd 2022-08-03 11:39:31.000000000 +0200 @@ -26,7 +26,7 @@ .\" $FreeBSD$ .\" .Dd July 15, 2001 -.Dt GETPEEREID 3bsd +.Dt getpeereid 3bsd .Os .Sh NAME .Nm getpeereid diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/man/getprogname.3bsd new/libbsd-0.11.7/man/getprogname.3bsd --- old/libbsd-0.11.6/man/getprogname.3bsd 2019-08-11 23:47:47.000000000 +0200 +++ new/libbsd-0.11.7/man/getprogname.3bsd 2022-08-03 11:39:31.000000000 +0200 @@ -1,6 +1,4 @@ -.\" -.\" Copyright (c) 2001 Christopher G. Demetriou -.\" All rights reserved. +.\" Copyright (c) 2022 Guillem Jover <guil...@hadrons.org> .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -10,34 +8,27 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed for the -.\" NetBSD Project. See http://www.netbsd.org/ for -.\" information about NetBSD. -.\" 4. The name of the author may not be used to endorse or promote products +.\" 3. The name of the author may not be used to endorse or promote products .\" derived from this software without specific prior written permission. +.\" . +.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, +.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY +.\" AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL +.\" THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +.\" EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +.\" PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +.\" OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +.\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +.\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.\" $FreeBSD$ -.\" -.Dd May 1, 2001 -.Dt GETPROGNAME 3bsd +.Dd August 03, 2022 +.Dt getprogname 3bsd .Os .Sh NAME .Nm getprogname , .Nm setprogname -.Nd get or set the program name +.Nd get and set program name .Sh LIBRARY .ds str-Lb-libbsd Utility functions from BSD systems (libbsd, \-lbsd) .ds doc-str-Lb-libbsd \*[str-Lb-libbsd] @@ -54,46 +45,39 @@ .Sh DESCRIPTION The .Fn getprogname -and -.Fn setprogname -functions manipulate the name of the current program. -They are used by error-reporting routines to produce -consistent output. -.Pp -The -.Fn getprogname -function returns the name of the program. -If the name has not been set yet, it will return -.Dv NULL . +returns a string with the current program name, +excluding any directory component. +The function will return +.Dv NULL +if it was unable to get the program name from any known source. .Pp The .Fn setprogname -function sets the name of the program to be the last component of the -.Fa progname -argument. -Since a pointer to the given string is kept as the program name, -it should not be modified for the rest of the program's lifetime. +function sets the current program name, +stripping any directory component prefix. +The function will keep a reference to the passed string pointer, +so it must not be freed or modified while these functions might +be called. .Pp -In -.Fx , -the name of the program is set by the start-up code that is run before -.Fn main ; -thus, -running -.Fn setprogname -is not necessary. -Programs that desire maximum portability should still call it; -on another operating system, -these functions may be implemented in a portability library. -Calling -.Fn setprogname -allows the aforementioned library to learn the program name without -modifications to the start-up code. +The implementations on most BSDs will try to initialize the program name +at program startup time, and +.Nm libbsd +will try to infer it from various known sources depending on the +target system. +But it is not a portable assumption that the program name will be set +without calling +.Fn setprogname , +so portable programs should always call it after starting up. .Sh SEE ALSO -.Xr err 3 , -.Xr setproctitle 3bsd +.Xr setproctitle 3bsd . .Sh HISTORY -These functions first appeared in +The +.Fn setprogname +and +.Fn getprogname +functions first appeared in .Nx 1.6 , -and made their way into -.Fx 4.4 . +.Fx 4.4 , +.Dx 2.1 +and +.Ox 5.4 . diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/man/heapsort.3bsd new/libbsd-0.11.7/man/heapsort.3bsd --- old/libbsd-0.11.6/man/heapsort.3bsd 2019-08-11 23:47:47.000000000 +0200 +++ new/libbsd-0.11.7/man/heapsort.3bsd 2022-08-03 11:39:31.000000000 +0200 @@ -33,7 +33,7 @@ .\" $FreeBSD$ .\" .Dd September 30, 2003 -.Dt HEAPSORT 3bsd +.Dt heapsort 3bsd .Os .Sh NAME .Nm heapsort , mergesort diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/man/humanize_number.3bsd new/libbsd-0.11.7/man/humanize_number.3bsd --- old/libbsd-0.11.6/man/humanize_number.3bsd 2019-08-11 23:47:47.000000000 +0200 +++ new/libbsd-0.11.7/man/humanize_number.3bsd 2022-08-03 11:39:31.000000000 +0200 @@ -28,7 +28,7 @@ .\" POSSIBILITY OF SUCH DAMAGE. .\" .Dd February 9, 2008 -.Dt HUMANIZE_NUMBER 3bsd +.Dt humanize_number 3bsd .Os .Sh NAME .Nm dehumanize_number , diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/man/libbsd.7 new/libbsd-0.11.7/man/libbsd.7 --- old/libbsd-0.11.6/man/libbsd.7 2022-03-30 22:58:21.000000000 +0200 +++ new/libbsd-0.11.7/man/libbsd.7 2022-10-06 03:59:10.000000000 +0200 @@ -24,8 +24,8 @@ .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF .\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd Mar 30, 2022 -.Dt LIBBSD 7 +.Dd August 3, 2022 +.Dt libbsd 7 .Os .Sh NAME .Nm libbsd @@ -42,7 +42,7 @@ that the code is portable and requires no modification to the original BSD code. This can be done easily with the -.Xr pkg-config 1 +.Xr pkgconf 1 library named .Pa libbsd-overlay . Or by adding the system-specific include directory with the @@ -59,12 +59,12 @@ .In unistd.h . .Pp The other way to use the library is to use the namespaced headers, -this is less portable as it makes using +which is a discouraged way, being less portable as it makes using .Nm libbsd mandatory and it will not work on BSD-based systems, and requires modifying original BSD code. This can be done with the -.Xr pkg-config 1 +.Xr pkgconf 1 library named .Pa libbsd . The includes in this case should be namespaced with @@ -79,7 +79,7 @@ .Fn setproctitle_init 3 function gets invoked automatically at startup time. This can be done with the -.Xr pkg-config 1 +.Xr pkgconf 1 library named .Pa libbsd-ctor . .Sh HEADERS @@ -134,7 +134,8 @@ at build-time. .Pp This is the list of functions that provide multiple implementations: -.Bl -tag -width 4m +.Pp +.Bl -tag -width 4m -compact .It Fn strnvis 3 .It Fn strnunvis 3 .Nx @@ -239,6 +240,17 @@ 2.26, and .Nm musl 1.2.2. +.It Fn arc4random 3 +.It Fn arc4random_buf 3 +.It Fn arc4random_uniform 3 +These functions are provided by +.Nm glibc +2.36. +Note that it does not provide the +.Fn arc4random_stir 3 +and +.Fn arc4random_addrandom 3 +functions. .El .Sh SEE ALSO .Xr arc4random 3bsd , diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/man/nlist.3bsd new/libbsd-0.11.7/man/nlist.3bsd --- old/libbsd-0.11.6/man/nlist.3bsd 2019-08-11 23:47:47.000000000 +0200 +++ new/libbsd-0.11.7/man/nlist.3bsd 2022-08-03 11:39:31.000000000 +0200 @@ -29,7 +29,7 @@ .\" $FreeBSD: /repoman/r/ncvs/src/lib/libc/gen/nlist.3,v 1.7 2001/10/01 16:08:51 ru Exp $ .\" .Dd April 19, 1994 -.Dt NLIST 3bsd +.Dt nlist 3bsd .Os .Sh NAME .Nm nlist diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/man/pidfile.3bsd new/libbsd-0.11.7/man/pidfile.3bsd --- old/libbsd-0.11.6/man/pidfile.3bsd 2019-08-11 23:47:47.000000000 +0200 +++ new/libbsd-0.11.7/man/pidfile.3bsd 2022-08-03 11:39:31.000000000 +0200 @@ -25,7 +25,7 @@ .\" $FreeBSD$ .\" .Dd February 8, 2012 -.Dt PIDFILE 3bsd +.Dt pidfile 3bsd .Os .Sh NAME .Nm pidfile_open , diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/man/pwcache.3bsd new/libbsd-0.11.7/man/pwcache.3bsd --- old/libbsd-0.11.6/man/pwcache.3bsd 2021-02-07 01:54:13.000000000 +0100 +++ new/libbsd-0.11.7/man/pwcache.3bsd 2022-08-03 11:39:31.000000000 +0200 @@ -28,7 +28,7 @@ .\" SUCH DAMAGE. .\" .Dd $Mdocdate: September 13 2018 $ -.Dt USER_FROM_UID 3 +.Dt user_from_uid 3 .Os .Sh NAME .Nm user_from_uid , diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/man/queue.3bsd new/libbsd-0.11.7/man/queue.3bsd --- old/libbsd-0.11.6/man/queue.3bsd 2021-12-01 04:34:10.000000000 +0100 +++ new/libbsd-0.11.7/man/queue.3bsd 2022-08-03 11:39:31.000000000 +0200 @@ -29,7 +29,7 @@ .\" $FreeBSD$ .\" .Dd September 8, 2016 -.Dt QUEUE 3bsd +.Dt queue 3bsd .Os .Sh NAME .Nm SLIST_CLASS_ENTRY , diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/man/radixsort.3bsd new/libbsd-0.11.7/man/radixsort.3bsd --- old/libbsd-0.11.6/man/radixsort.3bsd 2019-08-11 23:47:47.000000000 +0200 +++ new/libbsd-0.11.7/man/radixsort.3bsd 2022-08-03 11:39:31.000000000 +0200 @@ -30,7 +30,7 @@ .\" from: @(#)radixsort.3 8.2 (Berkeley) 1/27/94 .\" .Dd January 27, 1994 -.Dt RADIXSORT 3bsd +.Dt radixsort 3bsd .Os .Sh NAME .Nm radixsort , diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/man/readpassphrase.3bsd new/libbsd-0.11.7/man/readpassphrase.3bsd --- old/libbsd-0.11.6/man/readpassphrase.3bsd 2019-08-11 23:47:47.000000000 +0200 +++ new/libbsd-0.11.7/man/readpassphrase.3bsd 2022-08-03 11:39:31.000000000 +0200 @@ -19,7 +19,7 @@ .\" Materiel Command, USAF, under agreement number F39502-99-1-0512. .\" .Dd $Mdocdate: March 6 2014 $ -.Dt READPASSPHRASE 3bsd +.Dt readpassphrase 3bsd .Os .Sh NAME .Nm readpassphrase diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/man/reallocarray.3bsd new/libbsd-0.11.7/man/reallocarray.3bsd --- old/libbsd-0.11.6/man/reallocarray.3bsd 2021-02-07 01:54:13.000000000 +0100 +++ new/libbsd-0.11.7/man/reallocarray.3bsd 2022-08-03 11:39:31.000000000 +0200 @@ -33,7 +33,7 @@ .\" $OpenBSD: malloc.3,v 1.126 2019/09/14 13:16:50 otto Exp $ .\" .Dd $Mdocdate: September 14 2019 $ -.Dt REALLOCARRAY 3bsd +.Dt reallocarray 3bsd .Os .Sh NAME .Nm reallocarray , diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/man/reallocf.3bsd new/libbsd-0.11.7/man/reallocf.3bsd --- old/libbsd-0.11.6/man/reallocf.3bsd 2019-08-11 23:47:47.000000000 +0200 +++ new/libbsd-0.11.7/man/reallocf.3bsd 2022-08-03 11:39:31.000000000 +0200 @@ -33,7 +33,7 @@ .\" $FreeBSD: src/lib/libc/stdlib/malloc.3,v 1.80.2.2.2.1 2010/06/14 02:09:06 kensmith Exp $ .\" .Dd September 26, 2009 -.Dt REALLOCF 3bsd +.Dt reallocf 3bsd .Os .Sh NAME .Nm reallocf diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/man/setmode.3bsd new/libbsd-0.11.7/man/setmode.3bsd --- old/libbsd-0.11.6/man/setmode.3bsd 2019-08-11 23:47:47.000000000 +0200 +++ new/libbsd-0.11.7/man/setmode.3bsd 2022-08-03 11:39:31.000000000 +0200 @@ -31,7 +31,7 @@ .\" $FreeBSD: src/lib/libc/gen/setmode.3,v 1.12 2007/01/09 00:27:55 imp Exp $ .\" .Dd January 4, 2009 -.Dt SETMODE 3bsd +.Dt setmode 3bsd .Os .Sh NAME .Nm getmode , diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/man/setproctitle.3bsd new/libbsd-0.11.7/man/setproctitle.3bsd --- old/libbsd-0.11.6/man/setproctitle.3bsd 2019-08-11 23:47:47.000000000 +0200 +++ new/libbsd-0.11.7/man/setproctitle.3bsd 2022-10-05 01:36:28.000000000 +0200 @@ -21,7 +21,7 @@ .\" .\" The following requests are required for all man pages. .Dd December 16, 1995 -.Dt SETPROCTITLE 3bsd +.Dt setproctitle 3bsd .Os .Sh NAME .Nm setproctitle @@ -54,7 +54,7 @@ and with .Fn main arguments), if the automatic constructor support has not -been linked in through the libbsd-ctor pkg-config file. +been linked in through the libbsd-ctor pkgconf file. .Pp The title is set from the executable's name, followed by the result of a diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/man/stringlist.3bsd new/libbsd-0.11.7/man/stringlist.3bsd --- old/libbsd-0.11.6/man/stringlist.3bsd 2019-08-11 23:47:47.000000000 +0200 +++ new/libbsd-0.11.7/man/stringlist.3bsd 2022-08-03 11:39:31.000000000 +0200 @@ -27,7 +27,7 @@ .\" POSSIBILITY OF SUCH DAMAGE. .\" .Dd May 6, 2010 -.Dt STRINGLIST 3bsd +.Dt stringlist 3bsd .Os .Sh NAME .Nm stringlist , diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/man/strlcpy.3bsd new/libbsd-0.11.7/man/strlcpy.3bsd --- old/libbsd-0.11.6/man/strlcpy.3bsd 2019-08-11 23:47:47.000000000 +0200 +++ new/libbsd-0.11.7/man/strlcpy.3bsd 2022-08-03 11:39:31.000000000 +0200 @@ -15,7 +15,7 @@ .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" .Dd $Mdocdate: May 31 2007 $ -.Dt STRLCPY 3bsd +.Dt strlcpy 3bsd .Os .Sh NAME .Nm strlcpy , diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/man/strmode.3bsd new/libbsd-0.11.7/man/strmode.3bsd --- old/libbsd-0.11.6/man/strmode.3bsd 2019-08-11 23:47:47.000000000 +0200 +++ new/libbsd-0.11.7/man/strmode.3bsd 2022-08-03 11:39:31.000000000 +0200 @@ -29,7 +29,7 @@ .\" $FreeBSD: src/lib/libc/string/strmode.3,v 1.9 2003/07/01 15:28:05 maxim Exp $ .\" .Dd July 28, 1994 -.Dt STRMODE 3bsd +.Dt strmode 3bsd .Os .Sh NAME .Nm strmode diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/man/strnstr.3bsd new/libbsd-0.11.7/man/strnstr.3bsd --- old/libbsd-0.11.6/man/strnstr.3bsd 2019-08-11 23:47:47.000000000 +0200 +++ new/libbsd-0.11.7/man/strnstr.3bsd 2022-08-03 11:39:31.000000000 +0200 @@ -34,7 +34,7 @@ .\" $FreeBSD$ .\" .Dd October 11, 2001 -.Dt STRSTR 3bsd +.Dt strstr 3bsd .Os .Sh NAME .Nm strnstr diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/man/strtoi.3bsd new/libbsd-0.11.7/man/strtoi.3bsd --- old/libbsd-0.11.6/man/strtoi.3bsd 2019-08-11 23:47:47.000000000 +0200 +++ new/libbsd-0.11.7/man/strtoi.3bsd 2022-08-03 11:39:31.000000000 +0200 @@ -37,7 +37,7 @@ .\" NetBSD: strtol.3,v 1.31 2015/03/11 09:57:35 wiz Exp .\" .Dd November 13, 2015 -.Dt STRTOI 3bsd +.Dt strtoi 3bsd .Os .Sh NAME .Nm strtoi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/man/strtonum.3bsd new/libbsd-0.11.7/man/strtonum.3bsd --- old/libbsd-0.11.6/man/strtonum.3bsd 2019-08-11 23:47:47.000000000 +0200 +++ new/libbsd-0.11.7/man/strtonum.3bsd 2022-08-03 11:39:31.000000000 +0200 @@ -16,7 +16,7 @@ .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" .Dd January 18, 2015 -.Dt STRTONUM 3bsd +.Dt strtonum 3bsd .Os .Sh NAME .Nm strtonum diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/man/strtou.3bsd new/libbsd-0.11.7/man/strtou.3bsd --- old/libbsd-0.11.6/man/strtou.3bsd 2019-08-11 23:47:47.000000000 +0200 +++ new/libbsd-0.11.7/man/strtou.3bsd 2022-08-03 11:39:31.000000000 +0200 @@ -37,7 +37,7 @@ .\" NetBSD: strtoul.3,v 1.29 2015/03/10 13:00:58 christos Exp .\" .Dd November 13, 2015 -.Dt STRTOU 3bsd +.Dt strtou 3bsd .Os .Sh NAME .Nm strtou diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/man/timeradd.3bsd new/libbsd-0.11.7/man/timeradd.3bsd --- old/libbsd-0.11.6/man/timeradd.3bsd 2019-08-11 23:47:47.000000000 +0200 +++ new/libbsd-0.11.7/man/timeradd.3bsd 2022-08-03 11:39:31.000000000 +0200 @@ -31,7 +31,7 @@ .\" $FreeBSD: src/share/man/man3/timeradd.3,v 1.3 2003/09/08 19:57:19 ru Exp $ .\" .Dd June 7, 2010 -.Dt TIMERADD 3bsd +.Dt timeradd 3bsd .Os .Sh NAME .Nm timeradd , diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/man/timeval.3bsd new/libbsd-0.11.7/man/timeval.3bsd --- old/libbsd-0.11.6/man/timeval.3bsd 2019-08-11 23:47:47.000000000 +0200 +++ new/libbsd-0.11.7/man/timeval.3bsd 2022-08-03 11:39:31.000000000 +0200 @@ -28,7 +28,7 @@ .\" POSSIBILITY OF SUCH DAMAGE. .\" .Dd April 12, 2011 -.Dt TIMEVAL 3bsd +.Dt timeval 3bsd .Os .Sh NAME .Nm timeval , diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/man/tree.3bsd new/libbsd-0.11.7/man/tree.3bsd --- old/libbsd-0.11.6/man/tree.3bsd 2021-12-01 13:55:28.000000000 +0100 +++ new/libbsd-0.11.7/man/tree.3bsd 2022-08-03 11:39:31.000000000 +0200 @@ -24,7 +24,7 @@ .\" * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" */ .Dd May 10, 2019 -.Dt TREE 3bsd +.Dt tree 3bsd .Os .Sh NAME .Nm SPLAY_PROTOTYPE , diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/man/unvis.3bsd new/libbsd-0.11.7/man/unvis.3bsd --- old/libbsd-0.11.6/man/unvis.3bsd 2019-08-11 23:47:47.000000000 +0200 +++ new/libbsd-0.11.7/man/unvis.3bsd 2022-08-03 11:39:31.000000000 +0200 @@ -30,7 +30,7 @@ .\" @(#)unvis.3 8.2 (Berkeley) 12/11/93 .\" .Dd March 12, 2011 -.Dt UNVIS 3bsd +.Dt unvis 3bsd .Os .Sh NAME .Nm unvis , diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/man/vis.3bsd new/libbsd-0.11.7/man/vis.3bsd --- old/libbsd-0.11.6/man/vis.3bsd 2020-12-21 19:15:35.000000000 +0100 +++ new/libbsd-0.11.7/man/vis.3bsd 2022-08-03 11:39:31.000000000 +0200 @@ -30,7 +30,7 @@ .\" @(#)vis.3 8.1 (Berkeley) 6/9/93 .\" .Dd April 22, 2017 -.Dt VIS 3bsd +.Dt vis 3bsd .Os .Sh NAME .Nm vis , diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/man/wcslcpy.3bsd new/libbsd-0.11.7/man/wcslcpy.3bsd --- old/libbsd-0.11.6/man/wcslcpy.3bsd 2019-08-11 23:47:47.000000000 +0200 +++ new/libbsd-0.11.7/man/wcslcpy.3bsd 2022-08-03 11:39:31.000000000 +0200 @@ -36,7 +36,7 @@ .\" $FreeBSD$ .\" .Dd March 4, 2009 -.Dt WCSLCPY 3bsd +.Dt wcslcpy 3bsd .Os .Sh NAME .Nm wcslcat , diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/src/arc4random.c new/libbsd-0.11.7/src/arc4random.c --- old/libbsd-0.11.6/src/arc4random.c 2018-10-26 11:05:24.000000000 +0200 +++ new/libbsd-0.11.7/src/arc4random.c 2022-08-03 11:39:31.000000000 +0200 @@ -1,4 +1,4 @@ -/* $OpenBSD: arc4random.c,v 1.53 2015/09/10 18:53:50 bcook Exp $ */ +/* $OpenBSD: arc4random.c,v 1.58 2022/07/31 13:41:45 tb Exp $ */ /* * Copyright (c) 1996, David Mazieres <d...@uun.org> @@ -50,6 +50,8 @@ #define BLOCKSZ 64 #define RSBUFSZ (16*BLOCKSZ) +#define REKEY_BASE (1024*1024) /* NB. should be a power of 2 */ + /* Marked MAP_INHERIT_ZERO, so zero'd out in fork children. */ static struct _rs { size_t rs_have; /* valid bytes at end of rs_buf */ @@ -74,10 +76,10 @@ if (rs == NULL) { if (_rs_allocate(&rs, &rsx) == -1) - abort(); + _exit(1); } - chacha_keysetup(&rsx->rs_chacha, buf, KEYSZ * 8, 0); + chacha_keysetup(&rsx->rs_chacha, buf, KEYSZ * 8); chacha_ivsetup(&rsx->rs_chacha, buf + KEYSZ); } @@ -108,6 +110,7 @@ _rs_stir(void) { unsigned char rnd[KEYSZ + IVSZ]; + uint32_t rekey_fuzz = 0; if (getentropy(rnd, sizeof rnd) == -1) _getentropy_fail(); @@ -122,7 +125,10 @@ rs->rs_have = 0; memset(rsx->rs_buf, 0, sizeof(rsx->rs_buf)); - rs->rs_count = 1600000; + /* rekey interval should not be predictable */ + chacha_encrypt_bytes(&rsx->rs_chacha, (uint8_t *)&rekey_fuzz, + (uint8_t *)&rekey_fuzz, sizeof(rekey_fuzz)); + rs->rs_count = REKEY_BASE + (rekey_fuzz % REKEY_BASE); } static inline void diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/src/chacha_private.h new/libbsd-0.11.7/src/chacha_private.h --- old/libbsd-0.11.6/src/chacha_private.h 2018-05-22 17:58:24.000000000 +0200 +++ new/libbsd-0.11.7/src/chacha_private.h 2022-08-03 11:39:31.000000000 +0200 @@ -4,7 +4,7 @@ Public domain. */ -/* $OpenBSD: chacha_private.h,v 1.2 2013/10/04 07:02:27 djm Exp $ */ +/* $OpenBSD: chacha_private.h,v 1.3 2022/02/28 21:56:29 dtucker Exp $ */ typedef unsigned char u8; typedef unsigned int u32; @@ -52,7 +52,7 @@ static const char tau[16] = "expand 16-byte k"; static void -chacha_keysetup(chacha_ctx *x,const u8 *k,u32 kbits,u32 ivbits) +chacha_keysetup(chacha_ctx *x,const u8 *k,u32 kbits) { const char *constants; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/src/fgetwln.c new/libbsd-0.11.7/src/fgetwln.c --- old/libbsd-0.11.6/src/fgetwln.c 2021-12-01 04:34:10.000000000 +0100 +++ new/libbsd-0.11.7/src/fgetwln.c 2022-10-04 04:29:07.000000000 +0200 @@ -87,6 +87,9 @@ *lenp = wused; return wused ? fb->wbuf : NULL; } +/* XXX: Ideally we'd recommend getwline(3), but unfortunately even though it + * was part of the ISO/IEC TR 24731-2:2010 draft, it did not make it into C11 + * and is not widely implemented. */ libbsd_link_warning(fgetwln, "The fgetwln() function cannot be safely ported, use fgetwc(3) " "instead, as it is supported by C99 and POSIX.1-2001."); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/src/getentropy_hurd.c new/libbsd-0.11.7/src/getentropy_hurd.c --- old/libbsd-0.11.6/src/getentropy_hurd.c 2021-02-07 01:54:13.000000000 +0100 +++ new/libbsd-0.11.7/src/getentropy_hurd.c 2022-03-31 20:46:56.000000000 +0200 @@ -415,17 +415,17 @@ #ifdef HAVE_GETAUXVAL #ifdef AT_RANDOM /* Not as random as you think but we take what we are given */ - p = (char *) getauxval(AT_RANDOM); + p = (char *) ((intptr_t) getauxval(AT_RANDOM)); if (p) HR(p, 16); #endif #ifdef AT_SYSINFO_EHDR - p = (char *) getauxval(AT_SYSINFO_EHDR); + p = (char *) ((intptr_t) getauxval(AT_SYSINFO_EHDR)); if (p) HR(p, pgs); #endif #ifdef AT_BASE - p = (char *) getauxval(AT_BASE); + p = (char *) ((intptr_t) getauxval(AT_BASE)); if (p) HD(p); #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/src/local-elf.h new/libbsd-0.11.7/src/local-elf.h --- old/libbsd-0.11.6/src/local-elf.h 2022-03-30 23:03:15.000000000 +0200 +++ new/libbsd-0.11.7/src/local-elf.h 2022-06-08 11:51:41.000000000 +0200 @@ -230,7 +230,7 @@ #if defined(__LITTLE_ENDIAN__) #define ELF_TARG_DATA ELFDATA2LSB #elif defined(__BIG_ENDIAN__) -#define ELF_TARG_DATA ELFDATA2LMSB +#define ELF_TARG_DATA ELFDATA2MSB #else #error Unknown SH endianness #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/src/setmode.c new/libbsd-0.11.7/src/setmode.c --- old/libbsd-0.11.6/src/setmode.c 2017-06-22 00:45:36.000000000 +0200 +++ new/libbsd-0.11.7/src/setmode.c 2022-08-23 23:49:09.000000000 +0200 @@ -36,6 +36,7 @@ #include <sys/types.h> #include <sys/stat.h> +#include <stddef.h> #include <ctype.h> #include <errno.h> #include <signal.h> @@ -144,12 +145,13 @@ #define ADDCMD(a, b, c, d) do { \ if (set >= endset) { \ + ptrdiff_t setdiff = set - saveset; \ BITCMD *newset; \ setlen += SET_LEN_INCR; \ newset = reallocarray(saveset, setlen, sizeof(BITCMD)); \ if (newset == NULL) \ goto out; \ - set = newset + (set - saveset); \ + set = newset + setdiff; \ saveset = newset; \ endset = newset + (setlen - 2); \ } \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/src/setproctitle_ctor.c new/libbsd-0.11.7/src/setproctitle_ctor.c --- old/libbsd-0.11.6/src/setproctitle_ctor.c 2021-12-01 04:34:10.000000000 +0100 +++ new/libbsd-0.11.7/src/setproctitle_ctor.c 2022-10-05 01:36:28.000000000 +0200 @@ -38,7 +38,7 @@ * * To avoid any other possible fallout, the constructor is split into a * new static library that needs to be linked explicitly into programs - * using setproctitle(). As an additional safety measure the pkg-config + * using setproctitle(). As an additional safety measure the pkgconf(1) * linker flags will mark the program as not allowing to be dlopen()ed * so that we make sure to avoid the problem described above. */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libbsd-0.11.6/test/explicit_bzero.c new/libbsd-0.11.7/test/explicit_bzero.c --- old/libbsd-0.11.6/test/explicit_bzero.c 2022-01-29 14:52:39.000000000 +0100 +++ new/libbsd-0.11.7/test/explicit_bzero.c 2022-10-04 04:29:37.000000000 +0200 @@ -1,6 +1,7 @@ /* $OpenBSD: explicit_bzero.c,v 1.7 2021/03/27 11:17:58 bcook Exp $ */ /* * Copyright (c) 2014 Google Inc. + * Copyright (c) 2022 Guillem Jover <guil...@hadrons.org> * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -123,6 +124,18 @@ ASSERT_EQ(0, close(fds[0])); } +static void __attribute__((__noinline__)) +blank_stack_side_effects(char *buf, size_t len) +{ + char scratch[SECRETBYTES * 4]; + + /* If the read(3) in populate_secret() wrote into the stack, as it + * might happen on the Hurd for small data, then we might incorrectly + * detect the wrong secret on the stack. */ + memset(scratch, 0xFF, sizeof(scratch)); + ASSERT_EQ(NULL, memmem(scratch, sizeof(scratch), buf, len)); +} + static int count_secrets(const char *buf) { @@ -143,6 +156,7 @@ char *res; assert_on_stack(); populate_secret(buf, sizeof(buf)); + blank_stack_side_effects(buf, sizeof(buf)); res = memmem(altstack, ALTSTACK_SIZE, buf, sizeof(buf)); ASSERT_NE(NULL, res); return (res); @@ -155,6 +169,7 @@ char *res; assert_on_stack(); populate_secret(buf, sizeof(buf)); + blank_stack_side_effects(buf, sizeof(buf)); res = memmem(altstack, ALTSTACK_SIZE, buf, sizeof(buf)); ASSERT_NE(NULL, res); explicit_bzero(buf, sizeof(buf));