DragonFlyBSD/src ab75f1dnrelease Makefile

nrelease: Let vnconfig(8) auto determine/create the vn device
DeltaFile
+2-6nrelease/Makefile
+2-61 files

DragonFlyBSD/src ccc073fnrelease Makefile

nrelease: Unconfigure vn(4) and clean up after creating efiboot.img
DeltaFile
+3-4nrelease/Makefile
+3-41 files

DragonFlyBSD/src aab461enrelease Makefile, nrelease/root/boot loader.conf

nrelease: Simplify the adjustments to loader.conf for IMG boot

Use 'sed' similar to fstab adjustments instead of grep+echo to adjust
'boot/loader.conf' to the IMG boot.
DeltaFile
+3-3nrelease/Makefile
+2-1nrelease/root/boot/loader.conf
+5-42 files

DragonFlyBSD/src 66d900enrelease Makefile, nrelease/root/etc fstab

nrelease: Adjust fstab and reuse it for IMG boot

The root '/' filesystem is mounted by the kernel, so it can be omitted
from 'etc/fstab'.  This also makes the 'fstab' file be used by the IMG
boot, so just reuse it.
DeltaFile
+0-7nrelease/Makefile
+1-1nrelease/root/etc/fstab
+1-82 files

DragonFlyBSD/src e11cbfenrelease Makefile, nrelease/root/etc rc.conf

nrelease: Fix up rc.conf to mount root readwrite for IMG boot

While there, remove the obsolete comments in 'etc/rc.conf'.
DeltaFile
+2-6nrelease/root/etc/rc.conf
+2-0nrelease/Makefile
+4-62 files

DragonFlyBSD/src d68ee48nrelease Makefile

nrelease: Clean up a bit the 'clean' target

The '.didbootstrap' mark file was a legacy of the removed pkgsrc
bootstrap procedure.
DeltaFile
+5-3nrelease/Makefile
+5-31 files

DragonFlyBSD/src a7b36eanrelease/root/etc fstab

nrelease: Adjust fstab to remove '-C' option for /tmp tmpfs mount

For the /tmp mount, no need to copy the origin contents; also, there
shouldn't be any contents at this early boot stage.
DeltaFile
+1-1nrelease/root/etc/fstab
+1-11 files

DragonFlyBSD/src 935aaf8nrelease/root/etc rc.conf

nrelease: Add root_rw_mount="NO" to rc.conf to fix ISO boot

The ISO root filesystem is obviously readonly and cannot be remounted to
'rw'.  Without setting 'root_rw_mount=NO', the ISO boot would abort
after failing to remount the root filesystem.

This is a follow-up fix to my previous commit
31b00396377857ebb62259aa944f9351fa62ea44.

Reported-by: Sergey Zigachev (servik)
DeltaFile
+1-1nrelease/root/etc/rc.conf
+1-11 files

DragonFlyBSD/src 44d26fesbin/mount_cd9660 mount_cd9660.c, sys/vfs/isofs/cd9660 cd9660_vfsops.c cd9660_mount.h

cd9660 - Fix unexpected file/dir mode mask in 7764eb663ae501

* 7764eb663ae501 used the modes of the underlying mount point as the
  default fmask and dmask for cd9660 mounts when no masking options
  are specified.   This is unexpected.  Prior to that commit, the modes
  from ISO were used verbatim.

* This commit returns to the old (more expected) operation when
  -m/-M is not specified.

* Also make some adjustments to ensure that new kernels work with
  old worlds and vise-versa.  Make use of the fields require the
  related mount flag and also default the fields to all modes when
  -m/-M is not specified.  Any mismatch will have the prior (expected)
  operation.

Reported-by: Sergey Zigachev (servik)
DeltaFile
+16-3sbin/mount_cd9660/mount_cd9660.c
+7-2sys/vfs/isofs/cd9660/cd9660_vfsops.c
+1-0sys/vfs/isofs/cd9660/cd9660_mount.h
+24-53 files

DragonFlyBSD/src 8958ea9. Makefile_upgrade.inc, initrd/rescue Makefile

initrd: Add diff/sdiff back to rescue and fix build

Update the rescue/Makefile to include the updated diff/sdiff utilities;
however, diff3 is excluded because it's a shell script and relies on
libexec/diff3prog.  As a result, we must remove /rescue/diff3 via
"make upgrade"; otherwise, /rescue/diff3 would become a separate binary
(because of hardlinks) and break initrd build because of exceeded size.

Bug: https://bugs.dragonflybsd.org/issues/3376
DeltaFile
+3-9initrd/rescue/Makefile
+1-0Makefile_upgrade.inc
+4-92 files

DragonFlyBSD/src 48363b6usr.bin/diff3 diff3 diff3.sh

diff3(1): Rewrite Makefile by using SCRIPTS

Meanwhile, rename the script "diff3" to "diff3" to work with SCRIPTS.
DeltaFile
+0-64usr.bin/diff3/diff3
+64-0usr.bin/diff3/diff3.sh
+1-6usr.bin/diff3/Makefile
+65-703 files

DragonFlyBSD/src 7876b5dlibexec/diff3prog Makefile

libexec/diff3prog: Don't duplicate the installation of diff3.1

The diff3.1 man page is already being installed by usr.bin/diff3.
DeltaFile
+1-3libexec/diff3prog/Makefile
+1-31 files

DragonFlyBSD/src a95b5cfusr.bin/diff Makefile

diff(1): Remove unnecessary "-Wall" COPTS

The "-Wall" option is already set by default.
DeltaFile
+0-1usr.bin/diff/Makefile
+0-11 files

DragonFlyBSD/src d775d69usr.bin/sdiff Makefile

sdiff(1): Remove unused stuff from Makefile
DeltaFile
+0-5usr.bin/sdiff/Makefile
+0-51 files

DragonFlyBSD/src f7ba04fusr.bin/sdiff Makefile.depend

sdiff(1): Remove Makefile.depend

That was auto-generated in FreeBSD's code base; we don't need it.
DeltaFile
+0-15usr.bin/sdiff/Makefile.depend
+0-151 files

DragonFlyBSD/src f9dc17eusr.bin/mail main.c extern.h

mail(1): Catch SIGWINCH to adapt to terminal size changes

Turn setscreensize() into a signal handler for SIGWINCH.  This
allows users to resize their terminal and have long subject lines
become visible in "h(eader)" listings without the need to restart
mail(1).

Submit: https://bugs.dragonflybsd.org/issues/3375
DeltaFile
+7-2usr.bin/mail/main.c
+1-1usr.bin/mail/extern.h
+8-32 files

DragonFlyBSD/src 9b7e606usr.bin/mail main.c extern.h

mail(1): Catch SIGWINCH to adapt to terminal size changes

Turn setscreensize() into a signal handler for SIGWINCH.  This
allows users to resize their terminal and have long subject lines
become visible in "h(eader)" listings without the need to restart
mail(1).

Submit: https://bugs.dragonflybsd.org/issues/3375
DeltaFile
+7-2usr.bin/mail/main.c
+1-1usr.bin/mail/extern.h
+8-32 files

DragonFlyBSD/src d5ba4faetc/rc.d dhclient

rc.d: Fix a typo in the comment of dhclient script
DeltaFile
+1-1etc/rc.d/dhclient
+1-11 files

DragonFlyBSD/src ab4c55cusr.bin/dsynth dsynth.c

dsynth - Include "add" in "help" output.

* Include a blurb on the "add" directive in the dsynth help output.

Submitted-by: Pierre-Alain TORET <daftaupe at dragonflybsd.org>
DeltaFile
+2-0usr.bin/dsynth/dsynth.c
+2-01 files

DragonFlyBSD/src fea0a68share/man/man5 rc.conf.5

rc.conf.5: Document the missing dhclient_flags_<interface>

This interface-specific dhclient(8) flags variable is supported by the
rc script, but was missing in the man page.

Obtained-from: FreeBSD
DeltaFile
+9-1share/man/man5/rc.conf.5
+9-11 files

DragonFlyBSD/src 1a7f098etc/rc.d dhclient

rc.d: Improve dhclient script

* Make use of the pid file to check the current status
* Improve the handling of arguments
* Improve error reporting

Obtained-from: FreeBSD
DeltaFile
+27-14etc/rc.d/dhclient
+27-141 files

DragonFlyBSD/src 5eebb8bshare/man/man5 rc.conf.5

rc.conf.5: Document the missing dhclient_flags_<interface>

This interface-specific dhclient(8) flags variable is supported by the
rc script, but was missing in the man page.

Obtained-from: FreeBSD
DeltaFile
+9-1share/man/man5/rc.conf.5
+9-11 files

DragonFlyBSD/src c726e45etc/rc.d nfsd ypbind

rc.d: Fix nfsd/yp* scripts to set ${command_args}

These scripts were failing to set ${command_args} because they set
"command_args=${<name>_flags}" before performing "load_rc_config".
As a result, the "command_args" variable was empty and the "<name>_flags"
settings in rc.conf were effectively ignored.

Fix this issue by moving the "command_args" assignment after calling
"load_rc_config".

Reported-by: kentish (on IRC)
Referred-to: FreeBSD
DeltaFile
+2-1etc/rc.d/nfsd
+2-1etc/rc.d/ypbind
+2-1etc/rc.d/yppasswdd
+2-1etc/rc.d/ypserv
+2-1etc/rc.d/ypset
+2-1etc/rc.d/ypxfrd
+12-66 files

DragonFlyBSD/src bd23261contrib/gcc-8.0/libstdc++-v3/config/locale/dragonfly codecvt_members.cc

libstdc++: Fix unsigned wraparound in codecvt::do_length [PR105857]

When the max argument to std::codecvt<wchar_t, char, mbstate_t>::length
is SIZE_MAX/4+1 or greater the multiplication with sizeof(wchar_t) will
wrap to a small value, and the alloca call will have a buffer that's
smaller than requested. The call to mbsnrtowcs then has a buffer that is
smaller than the value passed as the buffer length. When libstdc++.so is
built with -D_FORTIFY_SOURCE=3 the mismatched buffer and length will get
detected and will abort inside Glibc.

When it doesn't abort, there's no buffer overflow because Glibc's
mbsnrtowcs has the same len * sizeof(wchar_t) calculation to determine
the size of the buffer in bytes, and that will wrap to the same small
number as the alloca argument. So luckily Glibc agrees with the caller
about the real size of the buffer, and won't overflow it.

Even when the max argument isn't large enough to wrap, it can still be
much too large to safely pass to alloca, so we should limit that. We
already have a loop that processes chunks so that we can handle null

    [4 lines not shown]
DeltaFile
+6-3contrib/gcc-8.0/libstdc++-v3/config/locale/dragonfly/codecvt_members.cc
+6-31 files

DragonFlyBSD/src bbd7e13sys/kern kern_sig.c sys_generic.c, sys/sys signal2.h proc.h

kernel - Fix signal / signal-mask-change race

* Fix race between incoming signals and sigsuspend(), ppoll(),
  or pselect() when used to change the signal mask.  A signal can
  be received and queued to a process that is in the middle of
  unmasking said signal without triggering signal processing.

* Our kernel *sleep*() and wakeup functions avoid whole-process
  locks to ensure high thread performance, but this can result in
  a race when a signal cannot be delivered to a thread and gets
  queued to the process instead.

  In order to keep the high-performance sleep, we instead use
  atomic ops and a ref-counter only in code paths related to
  general signal delivery to the process.  Code which changes the
  signal mask then waits for the ref-counter to become zero as
  needed to ensure proper interlocked tests across signal mask
  changes to close the race.
DeltaFile
+50-0sys/sys/signal2.h
+28-6sys/kern/kern_sig.c
+5-0sys/kern/sys_generic.c
+2-1sys/sys/proc.h
+85-74 files

DragonFlyBSD/src a6741f0sbin/hammer2 cmd_snapshot.c

sbin/hammer2/cmd_snapshot.c: Fix error handling

pfs.name is not valid when ioctl(HAMMER2IOC_PFS_GET) failed.
DeltaFile
+1-0sbin/hammer2/cmd_snapshot.c
+1-01 files

DragonFlyBSD/src 6cd7b65sbin/hammer2 main.c

sbin/hammer2: Fix usage()
DeltaFile
+1-1sbin/hammer2/main.c
+1-11 files

DragonFlyBSD/src 84646c2sys/netinet in_pcb.c, sys/netinet6 in6_src.c

kernel - Fix auto port assignment collision in network code

* When the SO_REUSEADDR or SO_REUSEPORT socket option is set on a
  socket undergoing automatic lport assignment, the auto network port
  assignment code in the kernel improperly ignores collisions against
  ports assigned to wildcard sockets and may assign the same port.  This
  causes later connect() calls to fail.

* Can cause gdb services to sometimes fail to connect.

* Fixed by ignoring the options for the purposes of finding an unused
  port.

Reported-by: Sergey Zigachev (servik)
DeltaFile
+10-0sys/netinet6/in6_src.c
+7-0sys/netinet/in_pcb.c
+17-02 files

DragonFlyBSD/src ccab79clibexec/rtld-elf rtld.c rtld.h, libexec/rtld-elf/x86_64 reloc.c

rtld - do not allow both dynamic DTV index and static TLS offset

* If we are allocating static offset for an object with dynamic index,
  return failure. In the opposite case, if dynamic index is requested for
  statically allocated TLS area, directly use the offset instead of
  setting the index.
  Taken from FreeBSD, commit 91880e07f605edb90339685bc934699a4344de3b.

* While there, fix dtv timing race between threads.

Co-authored-by: Matthew Dillon <dillon at apollo.backplane.com>
Reported-by: Stephane Russell <srussell at prodigeinfo.qc.ca>
DeltaFile
+21-5libexec/rtld-elf/rtld.c
+2-2libexec/rtld-elf/x86_64/reloc.c
+2-1libexec/rtld-elf/rtld.h
+1-1libexec/rtld-elf/map_object.c
+26-94 files

DragonFlyBSD/src 11bfc5asbin/ifconfig ifwg.c

ifconfig(8): Improve wg_aip_parse() to validate CIDR prefix length
DeltaFile
+5-3sbin/ifconfig/ifwg.c
+5-31 files