19 hours agousr.sbin/makefs: Sync with sys/vfs/hammer2 master
Tomohiro Kusumi [Sat, 28 Jan 2023 08:16:20 +0000 (00:16 -0800)]
usr.sbin/makefs: Sync with sys/vfs/hammer2

Sync with following sys/vfs/hammer2 commits.

$ git log --pretty="%h %s" 66f2c621b4a3c452381030521ca3bb6dadfba431.. -- sys/vfs/hammer2/
1d5238a4ed sys/vfs/hammer2: Fix -Wpointer-sign warnings on hammer2_dirhash()
1b796c7004 sys/vfs/hammer2: Fix -Wpointer-sign warnings

41 hours agosys/vfs/hammer2: Fix -Wpointer-sign warnings on hammer2_dirhash()
Tomohiro Kusumi [Fri, 27 Jan 2023 08:34:13 +0000 (00:34 -0800)]
sys/vfs/hammer2: Fix -Wpointer-sign warnings on hammer2_dirhash()

Warned on Linux user space.

Change hammer2_dirhash() and user space dirhash() to take
const char* instead of const unsigned char* for entry "name".

* hammer2_dirhash() callers always pass char* or const char*,
 except for one in sbin/newfs_hammer2/mkfs_hammer2.c where filename[]
 in ondisk inode (unterminated unsigned char array) is used.

* hammer2_dirhash() only compares name with ascii characters,
 and passes substring to hammer2_icrc32() which takes const void*,
 so it doesn't need to be unsigned.

* Also change hammer2_inode_create_pfs() (another function whose
 callers only pass char* or const char* for PFS "name") to take
 const char* instead of const uint8_t* so that hammer2_dirhash()
 doesn't get warned after changes above.

2 days agosys/vfs/hammer2: Fix -Wpointer-sign warnings
Tomohiro Kusumi [Thu, 26 Jan 2023 08:08:08 +0000 (00:08 -0800)]
sys/vfs/hammer2: Fix -Wpointer-sign warnings

Warned on Linux user space.

The name pointer points to namecache name which is of char*.
vnops passes name pointer to hammer2_dirent_create() which takes char*.

warning: pointer targets in passing argument 2 of 'hammer2_dirent_create' differ in signedness [-Wpointer-sign]

3 days agousr.sbin/makefs: Fix -Wformat warnings
Tomohiro Kusumi [Wed, 25 Jan 2023 09:39:56 +0000 (01:39 -0800)]
usr.sbin/makefs: Fix -Wformat warnings

Warned on Linux user space.
makefs(8) HAMMER2 specific part of what was fixed in 4ed61d288d.

warning: format '%jx' expects argument of type 'uintmax_t', but ... [-Wformat=]

3 days agousr.sbin/makefs: Sync with sys/vfs/hammer2
Tomohiro Kusumi [Wed, 25 Jan 2023 09:30:21 +0000 (01:30 -0800)]
usr.sbin/makefs: Sync with sys/vfs/hammer2

Sync with following sys/vfs/hammer2 commits.

$ git log --pretty="%h %s" 347169d4ac18a2d8b3a5e7ac93ccd9823cdac4c9.. -- sys/vfs/hammer2/
4ed61d288d sys/vfs/hammer2: Fix -Wformat warnings
f6ce9317ec sys/vfs/hammer2: Fix -Wint-in-bool-context warning
523dfb54e3 sys/vfs/hammer2: Remove -Wunused-but-set-variable local variables

3 days agousr.sbin/makefs: Remove -Wunused-but-set-variable local variable
Tomohiro Kusumi [Wed, 25 Jan 2023 08:32:59 +0000 (00:32 -0800)]
usr.sbin/makefs: Remove -Wunused-but-set-variable local variable

Warned on Linux user space.

3 days agosys/vfs/hammer2: Fix -Wformat warnings
Tomohiro Kusumi [Wed, 25 Jan 2023 08:22:09 +0000 (00:22 -0800)]
sys/vfs/hammer2: Fix -Wformat warnings

Warned on Linux user space.

warning: format '%jx' expects argument of type 'uintmax_t', but ... [-Wformat=]

3 days agosys/vfs/hammer2: Fix -Wint-in-bool-context warning
Tomohiro Kusumi [Wed, 25 Jan 2023 08:16:40 +0000 (00:16 -0800)]
sys/vfs/hammer2: Fix -Wint-in-bool-context warning

Warned on Linux user space.

warning: '*' in boolean context, suggest '&&' instead [-Wint-in-bool-context]

3 days agosys/vfs/hammer2: Remove -Wunused-but-set-variable local variables
Tomohiro Kusumi [Wed, 25 Jan 2023 08:12:13 +0000 (00:12 -0800)]
sys/vfs/hammer2: Remove -Wunused-but-set-variable local variables

Warned on Linux user space.

4 days agousr.sbin/makefs: Use `char *` not `void *` for buf b_data
Tomohiro Kusumi [Tue, 24 Jan 2023 06:42:02 +0000 (22:42 -0800)]
usr.sbin/makefs: Use `char *` not `void *` for buf b_data

, drop casts in msdos

Only struct m_buf change applies in this commit.
"drop casts in msdos" part had already been applied.

taken-from FreeBSD ef63362055dcf60ea2eb532991584c67aab911e2

4 days agousr.sbin/makefs: Rename struct buf -> m_buf
Tomohiro Kusumi [Tue, 24 Jan 2023 04:21:09 +0000 (20:21 -0800)]
usr.sbin/makefs: Rename struct buf -> m_buf

to reduce unnecessary diff vs FreeBSD makefs.

4 days agousr.sbin/makefs: Rename struct vnode -> m_vnode
Tomohiro Kusumi [Tue, 24 Jan 2023 04:12:11 +0000 (20:12 -0800)]
usr.sbin/makefs: Rename struct vnode -> m_vnode

to reduce unnecessary diff vs FreeBSD makefs.

8 days agousr.sbin/makefs: Sync with sys/vfs/hammer2
Tomohiro Kusumi [Fri, 20 Jan 2023 07:19:36 +0000 (23:19 -0800)]
usr.sbin/makefs: Sync with sys/vfs/hammer2

Sync with following sys/vfs/hammer2 commits.

$ git log --pretty="%h %s" 00e4ae5c88a85b6def00615f726e7a037ba13934.. -- sys/vfs/hammer2/
3f53c53686 sys/vfs/hammer2: Avoid void* pointer arithmetic

11 days agoAdd details about forward(5) support by MTA and dma(8) lack of support.
Pierre-Alain TORET [Fri, 13 Jan 2023 16:30:38 +0000 (17:30 +0100)]
Add details about forward(5) support by MTA and dma(8) lack of support.

2 weeks agoworld - Add /etc/rc.local.d to rcorder startup and shutdown ops
Matthew Dillon [Thu, 12 Jan 2023 05:42:08 +0000 (21:42 -0800)]
world - Add /etc/rc.local.d to rcorder startup and shutdown ops

* System now rcorders across both /etc/rc.d and /etc/rc.local.d
  during startup and shutdown.

* Allows the sysadmin to put control scripts in /etc/rc.local.d
  formatted similarly to how they are in /etc/rc.d

Submitted-by: Stephen Welker <stephen.welker@nemostar.com.au>
2 weeks agosys/vfs/hammer2: Avoid void* pointer arithmetic
Tomohiro Kusumi [Mon, 9 Jan 2023 08:12:47 +0000 (00:12 -0800)]
sys/vfs/hammer2: Avoid void* pointer arithmetic

Warned on NetBSD.
error: pointer of type 'void *' used in arithmetic [-Werror=pointer-arith]

This commit only fixes HAMMER2 code.
There are obviously bunch of others in DragonFly tree.

3 weeks agokernel - Fix early console probe when serial port does not exist
Matthew Dillon [Sun, 8 Jan 2023 02:02:05 +0000 (18:02 -0800)]
kernel - Fix early console probe when serial port does not exist

* Newer machines may ship without any legacy serial ports at all,
  but our default sio0.flags (in the kernel config) are set to 0x10
  to enable console operation if syscons isn't available.

  If the serial port does not actually exist, this will panic or
  livelock the kernel in early boot.

* Fix in two ways.  First, force sioN.disabled to TRUE if the sio
  device probe fails.  If the serial console probe is still reached,
  the serial console probe will also ensure that he serial port is
  able to drain before assigning it.

* Fixes Ryzen 7000 series headless booting.  You can also workaround
  the issue by setting sio0.flags=0 in /boot/loader.conf if you do
  not have a fixed kernel.

3 weeks agobsd-family-tree: Sync with FreeBSD
Pierre-Alain TORET [Sat, 7 Jan 2023 20:52:48 +0000 (21:52 +0100)]
bsd-family-tree: Sync with FreeBSD

3 weeks agopkill.1: Add FreeBSD's IMPLEMENTATION NOTES section.
Sascha Wildner [Sat, 7 Jan 2023 18:55:40 +0000 (19:55 +0100)]
pkill.1: Add FreeBSD's IMPLEMENTATION NOTES section.

Dragonfly-bug: <https://bugs.dragonflybsd.org/issues/3160>
Reminded-by: daftaupe
3 weeks agoamd - Add family 19h temperature sensor support, fix 17h support
Matthew Dillon [Sat, 7 Jan 2023 18:42:38 +0000 (10:42 -0800)]
amd - Add family 19h temperature sensor support, fix 17h support

* Add family 19h temperature sensor support.  Note that the
  CCD address offset for models 0x60-0x6f and 0x70-0x7f is
  0x308, not 0x154.

* Fix temperature sensor address base for CCD temps for
  some 17h models.  0x10-0x1f, 0x40-4f, and 0x10-1f models
  use an offset of 0x300, not 0x154.

* Address offset corrections obtained from linux

3 weeks agobuild - Fix make concurrency for csh
Matthew Dillon [Fri, 6 Jan 2023 07:59:59 +0000 (23:59 -0800)]
build - Fix make concurrency for csh

* Fix a make concurrency issue by making all objects depend on
  the generated headers.

3 weeks agobuild - Fix make concurrency for libpcap
Matthew Dillon [Fri, 6 Jan 2023 07:59:20 +0000 (23:59 -0800)]
build - Fix make concurrency for libpcap

* Fix a make concurrency issue

3 weeks agovtnet - Fix panic when larger MTUs are specified
Matthew Dillon [Thu, 5 Jan 2023 21:54:12 +0000 (13:54 -0800)]
vtnet - Fix panic when larger MTUs are specified

* Fix a panic when using vtnet with larger MTUs.

Reported-by: daftaupe
4 weeks agoBump copyrights. Happy new year!!
Sascha Wildner [Sat, 31 Dec 2022 18:23:00 +0000 (19:23 +0100)]
Bump copyrights. Happy new year!!

5 weeks agoinstaller: Remove the long-time broken package handling code.
Antonio Huete Jimenez [Wed, 21 Dec 2022 19:17:49 +0000 (20:17 +0100)]
installer: Remove the long-time broken package handling code.

5 weeks agoBump DEVELOPMENT to 6.5 v6.5.0
Antonio Huete Jimenez [Tue, 20 Dec 2022 22:24:25 +0000 (23:24 +0100)]

5 weeks agobuild - syntax cleanup
Matthew Dillon [Tue, 20 Dec 2022 18:41:19 +0000 (10:41 -0800)]
build - syntax cleanup

* Clear up a little syntax

5 weeks agokernel - Change an assertion to a kprintf
Matthew Dillon [Tue, 20 Dec 2022 18:38:55 +0000 (10:38 -0800)]
kernel - Change an assertion to a kprintf

* There is a path that can sometimes inject IP packets with a non-atomic
  header into ip_input that we haven't found yet.  For now, change the
  assertion to a kprintf() and discard such packets.

5 weeks agoBump CSTD to gnu11 for world and kernel.
Sascha Wildner [Mon, 19 Dec 2022 11:13:58 +0000 (12:13 +0100)]
Bump CSTD to gnu11 for world and kernel.

In practice, I don't think this will change a lot for base code, and I
am doing it mainly for contrib/ code which might in certain cases use
different paths (for example zstd will). Also affected might be dports
which use base's share/mk infrastructure, of which there are a few.

I have compared the object directories with all temporary files (.s, .i)
between a LINT64 kernel compiled with -std=gnu11 vs. one built with c99
and there were no differences whatsoever.

Thanks to tuxillo for testing with a full bulk build.

Note that the kernel was previously using c99 and has now been switched
to gnu11, not c11. This is because we were always using GNU extensions
in kernel code, so c99 should really have been gnu99 always.

Also note that we could in theory have switched to gnu17 directly since
c17 only addressed some defects in c11 and did not add new features,
but I chose to use 11 because our secondary compiler does not support

Reminded-by: Peeter Must
5 weeks agoMake the -std=... option for the compiler settable for the kernel, too.
Sascha Wildner [Mon, 19 Dec 2022 11:10:09 +0000 (12:10 +0100)]
Make the -std=... option for the compiler settable for the kernel, too.

No functional changes.

6 weeks agodsynth - Ignore ports installed on the host during pkgscan
Matthew Dillon [Sat, 17 Dec 2022 19:28:54 +0000 (11:28 -0800)]
dsynth - Ignore ports installed on the host during pkgscan

* Set LOCALBASE=<some_empty_dir> in the make commands issued by the
  package scan so the host's installed packages are not probed.

Reported-by: daftaupe
6 weeks agousr.sbin/makefs: Whitespace cleanup (remove space before tab)
Tomohiro Kusumi [Sat, 17 Dec 2022 10:01:08 +0000 (02:01 -0800)]
usr.sbin/makefs: Whitespace cleanup (remove space before tab)

taken-from FreeBSD 06a400d76be90bc0ccf6110a1e614d60bafb0f6c

6 weeks agoworld - Fix buildworld bootstrapping on older systems
Matthew Dillon [Wed, 14 Dec 2022 00:14:33 +0000 (16:14 -0800)]
world - Fix buildworld bootstrapping on older systems

* Adjustments for the buildworld bootstrap stages when building on
  older systems that do not have sys/byteswap.h.

* Note that the first __DragonFly_Version rev containing
  sys/byteswap,h is 500908 in comments (no functional changes
  to sys/param.h)

7 weeks agoftp: Adjustments after vendor import
Antonio Huete Jimenez [Tue, 6 Dec 2022 22:30:58 +0000 (23:30 +0100)]
ftp: Adjustments after vendor import

7 weeks agoMerge branch 'vendor/TNFTP'
Antonio Huete Jimenez [Tue, 6 Dec 2022 22:24:19 +0000 (23:24 +0100)]
Merge branch 'vendor/TNFTP'

7 weeks agovendor/TNFTP: Import tnftp-20210827 vendor/TNFTP
Antonio Huete Jimenez [Tue, 6 Dec 2022 20:16:03 +0000 (21:16 +0100)]
vendor/TNFTP: Import tnftp-20210827

For a detailed list of changes, please check ChangeLog.

7 weeks agocsh: Adjustments after import
Antonio Huete Jimenez [Tue, 6 Dec 2022 19:26:45 +0000 (20:26 +0100)]
csh: Adjustments after import

7 weeks agoMerge branch 'vendor/TCSH'
Antonio Huete Jimenez [Sun, 4 Dec 2022 23:40:03 +0000 (00:40 +0100)]
Merge branch 'vendor/TCSH'

7 weeks agoVendor branch: upgrade tcsh from 6.22.02 to 6.24.02 vendor/TCSH
Antonio Huete Jimenez [Sun, 4 Dec 2022 20:46:58 +0000 (21:46 +0100)]
Vendor branch: upgrade tcsh from 6.22.02 to 6.24.02

2 months agoevdev - Change default mask to fix duplicate mouse movement events in X
Matthew Dillon [Mon, 28 Nov 2022 22:10:22 +0000 (14:10 -0800)]
evdev - Change default mask to fix duplicate mouse movement events in X

* Change the default mask from sysmouse + kbdmux to hw_mouse + hw_kbd,
  which makes it the same as FreeBSD.

* Allows X to now autoconfigure evdev and not receive duplicate mouse
  movement events (really all events but X filters out the duplicate
  button and keyboard events already).

2 months agoopenssh: Adjustments after import
Antonio Huete Jimenez [Mon, 28 Nov 2022 18:30:10 +0000 (19:30 +0100)]
openssh: Adjustments after import

 - Update openbsd-compat
 - Regen config.h , adjusting several defines manually because the
   configure script seems to not detect everything correctly.
 - Add some required source files to SRCS in various programs.

Basic testing done:
 - sshd runs and works, i.e. accepts incoming connections, allows different
   auth methods (interactive, key).
 - X-Forwarding works.
 - Can ssh to other OSes.

2 months agoMerge branch 'vendor/OPENSSH'
Antonio Huete Jimenez [Mon, 28 Nov 2022 18:35:48 +0000 (19:35 +0100)]
Merge branch 'vendor/OPENSSH'

2 months agovendor/OPENSSH: upgrade from 8.8p1 top 9.1p1 vendor/OPENSSH
Antonio Huete Jimenez [Sun, 27 Nov 2022 17:51:33 +0000 (18:51 +0100)]
vendor/OPENSSH: upgrade from 8.8p1 top 9.1p1

Summary of notable changes:

 * sshd(8): fix an integer overflow in the user authentication path
 * ssh(1), sshd(8), ssh-add(1), ssh-agent(1): add a system for
   restricting forwarding and use of keys added to ssh-agent(1)
 * ssh(1): unbreak hostbased auth using RSA keys.
 * sshd(8): fix truncation in rhosts/shosts path construction.
 * ssh(1), sshd(8): use the hybrid Streamlined NTRU Prime + x25519 key
   exchange method by default ("sntrup761x25519-sha512@openssh.com").
   The NTRU algorithm is believed to resist attacks enabled by future
   quantum computers.
 * sftp(1): add a "cp" command to allow the sftp client to perform
   server-side file copies.
 * scp(1): fix a memory leak in argument processing.
 * ssh-keygen(1): double free() in error path of file hashing step in
   signing/verify code;
 * ssh-keyscan(1): fix a one-byte overflow in SSH- banner processing.
   Reported by Qualys
 * sftp-server(8): add a "users-groups-by-id@openssh.com" extension
   request that allows the client to obtain user/group names that
   correspond to a set of uids/gids.
 * sshd(8): improve logging of errors when opening authorized_keys

For a detailed list of changes, please check:

2 months agoAdd the old libssl/libcrypto to TO_REMOVE_LATE
Antonio Huete Jimenez [Sun, 27 Nov 2022 16:46:23 +0000 (17:46 +0100)]
Add the old libssl/libcrypto to TO_REMOVE_LATE

2 months agolibressl: Local modifications after the upgrade (refs #3333)
Antonio Huete Jimenez [Sun, 27 Nov 2022 16:27:36 +0000 (17:27 +0100)]
libressl: Local modifications after the upgrade (refs #3333)

  - Adjust Makefiles to include a number of source files that have been
    either added or moved around.
  - Bump shlib.
  - Forcibly compile in engines by removing OPENSSL_NO_ENGINE which no longer
    seems to be valid to have a full build. We wanted to avoid doing hacks to
    bypass the OPENSSL_NO_ENGINE requirement. As far as we know the engine
    code is disabled anyways.
  - Adjust Makefiles to include a number of source files that have been
    either added or moved around.
  - Bump shlib.
  - Remove HAVE_EVP_DSS1 from config.h to avoid using removed LibreSSL API
   - Adjustments to use the new API.
   - Adjustments to use the new API.
  - Add more source files to the Makefile from libtls, which are now required.

Testing-and-fixes: @dillon, @tuxillo, @aly

2 months agoMerge branch 'vendor/LIBRESSL'
Antonio Huete Jimenez [Sun, 27 Nov 2022 16:29:50 +0000 (17:29 +0100)]
Merge branch 'vendor/LIBRESSL'


2 months agovendor/LIBRESSL: Import LibreSSL 3.6.1 vendor/LIBRESSL
Antonio Huete Jimenez [Sat, 26 Nov 2022 01:38:53 +0000 (02:38 +0100)]
vendor/LIBRESSL: Import LibreSSL 3.6.1

For a full list of changes:


2 months agondp(8): Add gmt2local() as static.
Antonio Huete Jimenez [Sun, 20 Nov 2022 23:52:18 +0000 (00:52 +0100)]
ndp(8): Add gmt2local() as static.

Taken-from: FreeBSD (sbin/setkey)

2 months agotcpdump(8): Raise WARNS to 5
Antonio Huete Jimenez [Sun, 20 Nov 2022 23:48:46 +0000 (00:48 +0100)]
tcpdump(8): Raise WARNS to 5

2 months agotcpdump: Adjustments after the import
Antonio Huete Jimenez [Sun, 20 Nov 2022 23:31:05 +0000 (00:31 +0100)]
tcpdump: Adjustments after the import

 - Add source files to the Makefile
 - Regen config.h

2 months agoMerge branch 'vendor/TCPDUMP'
Antonio Huete Jimenez [Sun, 20 Nov 2022 23:41:57 +0000 (00:41 +0100)]
Merge branch 'vendor/TCPDUMP'


2 months agovendor/TCPDUMP: Import libpcap 4.99.1 vendor/TCPDUMP
Antonio Huete Jimenez [Sun, 20 Nov 2022 01:32:01 +0000 (02:32 +0100)]
vendor/TCPDUMP: Import libpcap 4.99.1

Most significant changes:

 - CVE-2018-16301: For the -F option handle large input files safely.
 - Improve the contents, wording and formatting of the man page.
 - Print unsupported link-layer protocol packets in hex.
 - Add support for new network protocols and DLTs
 - BGP: Fix overwrites of global 'astostr' temporary buffer
 - ARP: fix overwrites of static buffer in q922_string().

See full change log in: https://git.tcpdump.org/tcpdump/blob/HEAD:/CHANGES

2 months agolibpcap: Adjustments after the import
Antonio Huete Jimenez [Sat, 19 Nov 2022 21:00:01 +0000 (22:00 +0100)]
libpcap: Adjustments after the import

 - Add HAVE_NET_PF_PFVAR_H define to config.h which allows including
   pfvar.h and if_pflog.h from the system headers. This should be perhaps
 - Leave the PCAP_DONT_INCLUDE_PCAP_BPF_H define in so that we can make
   use of it. Include the system's bpf.h header when defined.
 - tzoff field has been removed from struct pcap

2 months agoMerge branch 'vendor/LIBPCAP'
Antonio Huete Jimenez [Sat, 19 Nov 2022 13:38:45 +0000 (14:38 +0100)]
Merge branch 'vendor/LIBPCAP'

2 months agovendor/LIBPCAP: Import libpcap 1.10.1 vendor/LIBPCAP
Antonio Huete Jimenez [Sat, 19 Nov 2022 13:11:00 +0000 (14:11 +0100)]
vendor/LIBPCAP: Import libpcap 1.10.1

Most significant changes:

 - Treat ENXIO as meaning "the interface was removed"
 - Add support for capturing on DPDK devices
 - Fix some memory leaks, including in pcap_compile()
 - Fix some thread safety issues

See full change log in: https://git.tcpdump.org/libpcap/blob/HEAD:/CHANGES

2 months agocontrib/libpcap: Revert local modifications before import
Antonio Huete Jimenez [Sat, 19 Nov 2022 13:19:31 +0000 (14:19 +0100)]
contrib/libpcap: Revert local modifications before import

2 months agolibedit: Adjustments after the import
Antonio Huete Jimenez [Sat, 19 Nov 2022 12:55:13 +0000 (13:55 +0100)]
libedit: Adjustments after the import

2 months agoMerge branch 'vendor/LIBEDIT'
Antonio Huete Jimenez [Thu, 17 Nov 2022 23:52:24 +0000 (00:52 +0100)]
Merge branch 'vendor/LIBEDIT'

2 months agoPRIV: Missed a removal
Antonio Huete Jimenez [Thu, 17 Nov 2022 23:15:38 +0000 (00:15 +0100)]
PRIV: Missed a removal

2 months agoKERN_PROC - Change behavior and bump version to 600302
Matthew Dillon [Thu, 17 Nov 2022 22:31:05 +0000 (14:31 -0800)]
KERN_PROC - Change behavior and bump version to 600302

* Change default behavior to not include pure LWPs.  That is, to not
  include pure kernel threads without a process (pid returned as -1).

* Add a flag KERN_PROC_FLAG_LWKT to re-include the LWPs for programs
  that don't get confused by them.

* Adjust /bin/ps and /usr/bin/top to use the flag.  Also conditionalized
  on the existance of the flag so buildworld on older systems doesn't

* Clean-up the sysctl kernel interface for KERN_PROC a bit, since adding
  the flag creates a lot more combinations that need to be handled as
  discrete sysctls.

2 months agovendor/libedit: upgrade from 2019-12-31 to 2022-10-30 vendor/LIBEDIT
Antonio Huete Jimenez [Thu, 17 Nov 2022 22:17:38 +0000 (23:17 +0100)]
vendor/libedit: upgrade from 2019-12-31 to 2022-10-30

Most significant changes:

 - Fix filename autocompletion for strings like a\)b
 - Correct declaration of hook functions.
 - Add support for rl_delete_text and rl_set_key
 - Improve readline compatibility by adding rl_readline_state support.
 - fix memory issues found by fuzzing (double frees and buffer overflows)

See full change log in: https://www.thrysoee.dk/editline/

2 months agolibarchive: Adjustments after the 3.6.1 import
Antonio Huete Jimenez [Thu, 17 Nov 2022 21:12:38 +0000 (22:12 +0100)]
libarchive: Adjustments after the 3.6.1 import

2 months agoMerge branch 'vendor/LIBARCHIVE'
Antonio Huete Jimenez [Thu, 17 Nov 2022 16:58:19 +0000 (17:58 +0100)]
Merge branch 'vendor/LIBARCHIVE'

2 months agoPRIV: Handle libpanel and libzstd in case it is needed
Antonio Huete Jimenez [Sun, 13 Nov 2022 23:47:03 +0000 (00:47 +0100)]
PRIV: Handle libpanel and libzstd in case it is needed

2 months agovendor/libarchive: upgrade from 3.4.3 to 3.6.1 vendor/LIBARCHIVE
Antonio Huete Jimenez [Sun, 13 Nov 2022 22:25:21 +0000 (23:25 +0100)]
vendor/libarchive: upgrade from 3.4.3 to 3.6.1

Notable changes:

 - 7zip reader: fix PPMD read beyond boundary (#1671)
 - ZIP reader: fix possible out of bounds read (OSS-Fuzz 38766 #1672)
 - ISO reader: fix possible heap buffer overflow in read_children()
 - tar: new option "--no-read-sparse" (#1614)
 - ZIP reader: zstd decompression support (#1518)
 - extended fix for following symlinks when processing the fixup
   list (#1566, #1617, CVE-2021-31566)
 - fix invalid memory access and out of bounds read in RAR5 reader
   (#1491, #1492, #1493, CVE-2021-36976)
 - ZIP reader: Support of deflate algorithm in symbolic link
   decompression (#1509)
 - do not follow symlinks when processing the fixup list (#1566)
 - fixed extraction of archives with hard links pointing to itself (#1381)
 - fixed memory leaks in error case of archive_write_open() functions (#1456)

For details, see release notes or commit history on github:

2 months agoless: Local changes after the merge
Antonio Huete Jimenez [Sun, 13 Nov 2022 19:15:04 +0000 (20:15 +0100)]
less: Local changes after the merge

 - Adjust READMEs
 - Add more SRCS to the Makefile
 - Regen defines.h

2 months agoMerge branch 'vendor/LESS'
Antonio Huete Jimenez [Sun, 13 Nov 2022 18:03:51 +0000 (19:03 +0100)]
Merge branch 'vendor/LESS'


2 months agovendor/less: upgrade from 551 to 608 vendor/LESS
Antonio Huete Jimenez [Sun, 13 Nov 2022 17:46:01 +0000 (18:46 +0100)]
vendor/less: upgrade from 551 to 608

 - Update Unicode tables.
 - Fix memory corruption when built with libtermcap.
 - Support libtinfow.
 - Fix crash on some systems due to realpath incompatibility.
 - Add the --incsearch option.
 - Add the --line-num-width option.
 - Add the --status-col-width option.
 - Add the --use-color and --color options.
 - Add the --lesskey-src option.
 - Add the --file-size option.
 - Add the --header option.
 - Add the --no-number-headers option.
 - Add the --status-line option.
 - Add the --redraw-on-quit option.
 - Add the --search-options option.
 - Add the --exit-follow-on-close option.
 - Fix bug which caused failure to respond to window resize.

For details see:

2 months agoldns: Adjust makefiles for ldns-1.8.3 update.
Antonio Huete Jimenez [Sun, 13 Nov 2022 01:12:24 +0000 (02:12 +0100)]
ldns: Adjust makefiles for ldns-1.8.3 update.

 - Bump soname for api changes, 1.8.3 has major as 3.
 - Update ldns/ headers and remove them from the vendor branch.
 - Adjust lib/libssh Makefile to include the headers from ldns.
 - Update READMES.

Currently only user of the libprivate_ldns is drill(1).
OpenSSH will be adjusted to use this lib next.

2 months agoMerge branch 'vendor/LDNS'
Antonio Huete Jimenez [Sun, 13 Nov 2022 12:26:25 +0000 (13:26 +0100)]
Merge branch 'vendor/LDNS'

2 months agovendor/ldns: upgrade from 1.7.1 to 1.8.3
Antonio Huete Jimenez [Sat, 12 Nov 2022 18:43:26 +0000 (19:43 +0100)]
vendor/ldns: upgrade from 1.7.1 to 1.8.3

Notable changes:

 * bugfix #50: heap Out-of-bound Read vulnerability in rr_frm_str_internal
   reported by pokerfacett.
 * bugfix #51: Heap Out-of-bound Read vulnerability in ldns_nsec3_salt_data
   reported by pokerfacett.
 * Fix memory leak in examples/ldns-testns handle_tcp routine.
 * Detect fixed time memory compare for openssl 0.9.8.
 * Fix -U flag with ldns-signzone. Thanks Ulrich and Jonathan
 * bugfix #166: Grow buffer when writing chars and fixed size
   strings when converting to presentation format, preventing
   potential assersion errors.
 * bugfix #183: Assertion failure with OPT record without rdata.
   This caused packet creation with only a DO bit (for DNSSEC OK)
   to crash. Thanks Anand Buddhdev and others for reporting this
   so quickly.

For details see commit history or changelog on github:


2 months agofile: Local changes after the merge.
Antonio Huete Jimenez [Sat, 12 Nov 2022 17:47:11 +0000 (18:47 +0100)]
file: Local changes after the merge.

2 months agoMerge branch 'vendor/FILE'
Antonio Huete Jimenez [Sat, 12 Nov 2022 17:40:03 +0000 (18:40 +0100)]
Merge branch 'vendor/FILE'


2 months agovendor/file: upgrade from 5.41 to 5.43 vendor/FILE
Antonio Huete Jimenez [Sat, 12 Nov 2022 17:38:06 +0000 (18:38 +0100)]
vendor/file: upgrade from 5.41 to 5.43

For details, see ChangeLog.

2 months agolibexpat: Local changes after the merge.
Antonio Huete Jimenez [Sat, 12 Nov 2022 17:27:24 +0000 (18:27 +0100)]
libexpat: Local changes after the merge.

2 months agoMerge branch 'vendor/EXPAT'
Antonio Huete Jimenez [Sat, 12 Nov 2022 16:11:49 +0000 (17:11 +0100)]
Merge branch 'vendor/EXPAT'

2 months agovendor/expat: upgrade from 2.1.0 to 2.5.0 vendor/EXPAT
Antonio Huete Jimenez [Sat, 12 Nov 2022 15:38:24 +0000 (16:38 +0100)]
vendor/expat: upgrade from 2.1.0 to 2.5.0

Summary of notable changes:

 - Detect overflow from len=INT_MAX call to XML_Parse
 - Fix a dangling pointer issue related to realloc
 - Fix copying of partial characters for UTF-8 input
 - Avoid doing arithmetic with NULL pointers in XML_GetBuffer
 - Fix reading uninitialized variable during parsing
 - CVE-2015-1283 - Multiple integer overflows in XML_GetBuffer
 - Fix potential null pointer dereference
 - Following CVEs were handled (not a complete list)
   CVE-2016-0718, CVE-2016-4472, CVE-2016-5300, CVE-2012-0876
   CVE-2012-6702, CVE-2017-9233, CVE-2016-9063, CVE-2018-20843
   CVE-2019-15903,CVE-2013-0340/CWE-776, CVE-2021-45960
   CVE-2021-46143, CVE-2022-22822 to CVE-2022-22827
   CVE-2022-23852, CVE-2022-23990, CVE-2022-43680

For detailed list of all changes, bugfixes and improvements, see Changes.

2 months agoxargs(1): Sync with FreeBSD
Antonio Huete Jimenez [Sat, 12 Nov 2022 12:01:40 +0000 (13:01 +0100)]
xargs(1): Sync with FreeBSD

 - fix exit code when using -P
 - fix description of strnsubst return value
 - terminate if line replacement cannot be constructed
 - compile yesexpr as ERE
 - add some long options for GNU compatibility
 - Add EXAMPLES to man page

2 months agousr.sbin/makefs: Sync with sys/vfs/hammer2
Tomohiro Kusumi [Fri, 11 Nov 2022 08:10:27 +0000 (00:10 -0800)]
usr.sbin/makefs: Sync with sys/vfs/hammer2

Sync with following sys/vfs/hammer2 commits.

$ git log --pretty="%h %s" 185ae703d726eb41fe0f44e432a9575d06b2ba45.. -- sys/vfs/hammer2/
ae4718daaa sys/vfs/hammer2: Remove redundant "spmp->iroot = NULL;"
ee92f60939 sys/vfs/hammer2: Fix many comments
be41253d2a sys/vfs/hammer2: Rename HAMMER2_BREF_FLAG_ZERO -> HAMMER2_BREF_FLAG_UNUSED
64eadfb368 sys/vfs/hammer2: Fix incorrect reservedXXX names in ondisk structure
6feb58ab26 sys/vfs/hammer2: Minor cleanups for hammer2_disk.h
4b2ec0813c sys/vfs/hammer2: Move HAMMER2_{CHECK,COMP}_STRINGS to sbin/hammer2
cca587dd52 sys/vfs/hammer2: Move HAMMER2_METH_DEFAULT from hammer2_disk.h to hammer2.h
d21704d78e sys/vfs/hammer2: Fix a typo in a source code comment
fac0c41fdd sys/vfs/hammer2: Fix "already initialized" multi-volumes error message
6763396fd5 sys/vfs/hammer2: Remove redundant error check in hammer2_vfs_mount()
12757b74e2 sys/vfs/hammer2: Make fchain/vchain dump on last drop consistent
a011271d2d sys/vfs/hammer2: Remove comments on removed stuff
e6a1580946 sys/vfs/hammer2: Remove obsolete comment on HAMMER2_RESOLVE_RDONLY
e8e30c7644 sys/vfs/hammer2: Remove obsolete comment in hammer2_vop_readdir()
25b8f48546 sys/vfs/hammer2: #if0 hammer2_chain_lock_unhold()/hammer2_chain_unlock_hold()
b5513ad07d sys/vfs/hammer2: Use correct XOP struct in hammer2_xop_{lookup,delete}
5b691df11e sys/vfs/hammer2: hammer2_dump_chain() should belong to hammer2_chain.c
92931eab21 sys/vfs/hammer2: Use HAMMER2_PFSTYPE_NONE rather than 0
16f0b63d7f sys/vfs/hammer2: Make sure PFS exists after chain lookup on mount
4b0205e630 sys/vfs/hammer2: hammer2_ioctl_inode_{get,set} never returns error
634b6e30ca sys/vfs/hammer2: Add include guard for hammer2_xxhash.h
bc7ea12e61 sbin/hammer2: Remove HAMMER1 comment from dirhash()
47f63aa5d3 sys/vfs/hammer2: Rename hammer2_chain_core_init() -> hammer2_chain_init()
507074cda8 sys/vfs/hammer2: Change readonly purpose sysctls to CTLFLAG_RD
39b691836e sys/vfs/hammer2: Use __debugvar for RB_INSERT() result only used in KKASSERT
a4959f8900 sys/vfs/hammer2: Use __debugvar rather than trying to use it outside KASSERT
9944926ceb sys/vfs/hammer2: Avoid unused warning when !INVARIANTS

2 months agotzsetup(8): Do not use dlg_calloc() which is now internal to libdialog
Antonio Huete Jimenez [Wed, 9 Nov 2022 23:39:56 +0000 (00:39 +0100)]
tzsetup(8): Do not use dlg_calloc() which is now internal to libdialog

2 months agodialog(1): Adjustments after upgrade merge.
Antonio Huete Jimenez [Wed, 9 Nov 2022 23:15:48 +0000 (00:15 +0100)]
dialog(1): Adjustments after upgrade merge.

- adapt libdialog/Makefile
- regenerate dlg_config.h

2 months agoMerge branch 'vendor/DIALOG'
Antonio Huete Jimenez [Thu, 10 Nov 2022 17:49:35 +0000 (18:49 +0100)]
Merge branch 'vendor/DIALOG'

2 months agosys/vfs/hammer2: Remove redundant "spmp->iroot = NULL;"
Tomohiro Kusumi [Thu, 10 Nov 2022 09:41:46 +0000 (01:41 -0800)]
sys/vfs/hammer2: Remove redundant "spmp->iroot = NULL;"

2 months agovendor/dialog: upgrade from 1.3-20200327 to 1.3-20220728 vendor/DIALOG
Antonio Huete Jimenez [Wed, 9 Nov 2022 23:01:09 +0000 (00:01 +0100)]
vendor/dialog: upgrade from 1.3-20200327 to 1.3-20220728

Summary of notable changes:

 + initialize color-settings before --create-rc option is processed.
 + adjust fallback bindings for backspace/delete to match the curses
   library's sense of backspace (Arch #74379).
 + improve logic for updating form-height after screen-resizing.
 + correct off-by-one limit for month when validating parameters of the
   calendar widget (patch by "viverna", Debian #1000720).
 + use mktemp utility rather than tempfile for temporary filename in
   the sample scripts (patch by Ville Skytt√§).
 + directly include stddef.h for systems which need it for offsetof().
 + fix a few cppcheck warnings
 + update configure macros, for quoting/escaping fixes per shellcheck
 + add option "--cursor-off-label"
 + add option "--erase-on-exit"
 + add dlg_getenv_num() and dlg_getenv_str().

For detailed list of all changes, bugfixes and improvements, see CHANGES.

2 months agobyacc: Update README.DRAGONFLY and config.h
Antonio Huete Jimenez [Wed, 9 Nov 2022 20:41:39 +0000 (21:41 +0100)]
byacc: Update README.DRAGONFLY and config.h

2 months agoMerge branch 'vendor/BYACC'
Antonio Huete Jimenez [Wed, 9 Nov 2022 20:38:16 +0000 (21:38 +0100)]
Merge branch 'vendor/BYACC'

2 months agovendor/byacc: upgrade from 20200910 to 20221106 vendor/BYACC
Antonio Huete Jimenez [Wed, 9 Nov 2022 19:57:12 +0000 (20:57 +0100)]
vendor/byacc: upgrade from 20200910 to 20221106

Summary of notable changes:

 o yacc.1: minor fixes with check-manpage
 o mkpar.c: change printf format to allow for long-YYINT
 o output.c:
   - add a state-machine to output_semantic_actions() to detect and replace
 o main.c:
   - account for a memory-leak
   - add "-h" option
 o reader.c, output.c:
   - improve loop which skips backward through a (possibly nested) sequence
     of square-brackets.
   - change a few malloc's to calloc's so clang analyzer can
     see initialized data.
   - fix memory-leak when replacing $$'s in destructor code
     (report/testcase by Boris Kolpackov).

For a detailed change list see CHANGES.

2 months agomake(1): Adjustments after the upgrade.
Antonio Huete Jimenez [Wed, 9 Nov 2022 13:22:22 +0000 (14:22 +0100)]
make(1): Adjustments after the upgrade.

2 months agoMerge branch 'vendor/BMAKE'
Antonio Huete Jimenez [Wed, 9 Nov 2022 13:52:46 +0000 (14:52 +0100)]
Merge branch 'vendor/BMAKE'


2 months agovendor/bmake: upgrade from 20210314 to 20220928 vendor/BMAKE
Antonio Huete Jimenez [Wed, 9 Nov 2022 11:50:16 +0000 (12:50 +0100)]
vendor/bmake: upgrade from 20210314 to 20220928

Summary of notable changes:

 o Fix bug in .break reset of conditional depth.
 o Man page updates.
 o Allow .break to terminate a .for loop early.
 o Fix exit status for '-q' (since 1994)
 o fix memory leak for filenames in .for loops
 o job.c: fix handling of null bytes in output.
 o cond.c:
   - add more details to error message for numeric comparison.
   - fix mem leak in CondParser_Leaf
 o var.c:
   - fix out-of-bounds errors when parsing.
   -fix memory leak in error case of the ':?' modifier
 o lst.c: fix mem leak in Lst_Remove
 o parse.c:
   - fix out-of-bounds read when parsing an invalid line.
   - fix memory leak in wildcard targets and sources
   - fix off-by-one error in buffer for .WAIT nodes

For detailed list see ChangeLog.

2 months agocontrib/awk: Fix typo in README.DRAGONFLY
Antonio Huete Jimenez [Wed, 9 Nov 2022 11:17:13 +0000 (12:17 +0100)]
contrib/awk: Fix typo in README.DRAGONFLY

2 months agoawk(1): Adjustments after the import
Antonio Huete Jimenez [Wed, 9 Nov 2022 10:58:59 +0000 (11:58 +0100)]
awk(1): Adjustments after the import

 - ytab.h has now become awkgram.tab.h

2 months agoMerge branch 'vendor/AWK'
Antonio Huete Jimenez [Wed, 9 Nov 2022 11:15:27 +0000 (12:15 +0100)]
Merge branch 'vendor/AWK'

2 months agovendor/awk: upgrade from 20200702 to 20220912 vendor/AWK
Antonio Huete Jimenez [Wed, 9 Nov 2022 08:42:35 +0000 (09:42 +0100)]
vendor/awk: upgrade from 20200702 to 20220912

Bugfixes and maintenance:

- Clean up xfree, remove redundant NULL check.
- Stop leaking tempcells from extra arguments in format.
- Fix leak of qstring result in setclvar.
- Fix leak of regex string representations.
- Fix memory leak in string assignment to built-ins.
- Eliminate file management memory leak.
- When closing, don't flush input streams
- Heap buffer overflow from PR #83 fixed in #121.

For details, see FIXES, or commit history at

2 months agojail.8 : update the manpage date
Pierre-Alain TORET [Tue, 8 Nov 2022 08:18:56 +0000 (09:18 +0100)]
jail.8 : update the manpage date

2 months agojail.8 : syscall net_raw_sockets has been renamed allow_raw_sockets
Pierre-Alain TORET [Mon, 7 Nov 2022 21:07:36 +0000 (22:07 +0100)]
jail.8 : syscall net_raw_sockets has been renamed allow_raw_sockets

2 months agosbin/hammer2: Fix build error on i386
Tomohiro Kusumi [Sun, 6 Nov 2022 02:04:46 +0000 (19:04 -0700)]
sbin/hammer2: Fix build error on i386

error: format specifies type 'long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat]

2 months agosbin/hammer2: Apply fac0c41fdd to user space ondisk.c
Tomohiro Kusumi [Sat, 5 Nov 2022 06:47:14 +0000 (23:47 -0700)]
sbin/hammer2: Apply fac0c41fdd to user space ondisk.c

2 months agosys/vfs/hammer2: Fix many comments
Tomohiro Kusumi [Sat, 5 Nov 2022 05:30:18 +0000 (22:30 -0700)]
sys/vfs/hammer2: Fix many comments

* "lru_spin; /* inumber lookup */" -> lru_spin isn't for inode.

* "If an error occurred we eat the lock" -> "eat the lock" was
  removed in c603b86b77206805493fc181d3576ecd1786e056 in 2015.
  The rest of the comment (not removed) seems obsolete too.

* "removed from the parent's btree" -> Typo for rbtree.

* "pointing it to an embedded data structure and copying the data from the buffer"
  -> No longer implemented like this since
  01eabad4d93a8dc8f0f01a6209b384b1e010bb8c in 2012.

* "Called to clean up cached DIOs on umount" -> This isn't specific to
  unmount, called regularly if iofree_count > dio_limit.

* "voldata is not yet loaded" -> It's already loaded.

* "so do not pass cluster", etc -> "cluster" no longer appears
  here since b7add6753e221920947c96fab3314c39a2f67fe4 in 2015.

* "multiple hammer2_inode structures can be aliased to the same chain
  element, for example for hardlinks" -> This comment from 2013
  seems to only apply to hardlink mechanism back then, which was
  something completely different.

2 months agobin/ls: Fix mismatched parentheses.
Antonio Huete Jimenez [Sat, 5 Nov 2022 13:09:44 +0000 (14:09 +0100)]
bin/ls: Fix mismatched parentheses.

Submitted-by: piecuch (closes #3322)