16 months agogetservent.3: Fix function name.
Sascha Wildner [Mon, 6 May 2019 05:40:47 +0000 (07:40 +0200)]
getservent.3: Fix function name.

16 months agolibc: Change a few DIAGNOSTICS sections into RETURN VALUES and/or ERRORS.
Sascha Wildner [Sun, 5 May 2019 00:10:38 +0000 (02:10 +0200)]
libc: Change a few DIAGNOSTICS sections into RETURN VALUES and/or ERRORS.

DIAGNOSTICS is for stderr type messages only.

16 months agolibc: Add forgotten MLINK.
Sascha Wildner [Sat, 4 May 2019 23:37:05 +0000 (01:37 +0200)]
libc: Add forgotten MLINK.

16 months agolibc: Document yp_maplist().
Sascha Wildner [Sat, 4 May 2019 23:33:57 +0000 (01:33 +0200)]
libc: Document yp_maplist().

While here, correct a wrong type.

Taken-from: OpenBSD

16 months ago<sys/fcntl.h>: Restrict POSIX_FADV_* visibility to userland.
Sascha Wildner [Sat, 4 May 2019 21:28:38 +0000 (23:28 +0200)]
<sys/fcntl.h>: Restrict POSIX_FADV_* visibility to userland.

While here, add a clarifying comment that the information isn't used.

Pointed-out-by: zrj
16 months agolibc/locale: Document mbrtoc{16,32}_l() and c{16,32}rtomb_l().
Sascha Wildner [Sat, 4 May 2019 21:24:53 +0000 (23:24 +0200)]
libc/locale: Document mbrtoc{16,32}_l() and c{16,32}rtomb_l().

16 months agodrm/radeon - Attempt to fix data structure corruption on exit
Matthew Dillon [Sat, 4 May 2019 21:18:34 +0000 (14:18 -0700)]
drm/radeon - Attempt to fix data structure corruption on exit

* Attempt to fix data structure corruption in the radeon driver
  when X exits.  This was causing X to lockup due to an attempt
  to double-remove vm->va from its interval tree.

* Validation operations based on field state.  In particular,
  do not try to issue the interval tree removal unless
  it.start or it.last are non-zero.

  Also, in radeon_vm_fini() do not issue the interval tree removal
  unless the bo can be successfully reserved.  Otherwise the
  structure might be placed in a bad state while it is still in use.

16 months agodrm - Move startup delay to VERSION ioctl
Matthew Dillon [Sat, 4 May 2019 21:15:30 +0000 (14:15 -0700)]
drm - Move startup delay to VERSION ioctl

* We had a startup delay in the i915 attach path, which is
  synchronous with the kldload that X does.  Unfortunately, this
  doesn't appear to work well, probably because it just stalls
  everything and leaves the race intact after the sleep returns.
  Also, the kld lock is held across the sleep.

* Move the startup delay to the first call of the DRM_IOCTL_VERSION
  ioctl.  This is outside the kld path allows drm to free-run while
  simply imposing a short delay on the X startup to give the drm
  system time to stabilize.

* Should fix several intel i915 startup issues that can leave the
  screen corrupt, and perhaps other startup issues.

16 months agolibc: Add posix_fadvise(), for now empty except for some error checking.
Sascha Wildner [Sat, 4 May 2019 20:20:02 +0000 (22:20 +0200)]
libc: Add posix_fadvise(), for now empty except for some error checking.

This should help some dports.

From POSIX' point of view this is sufficient because it is not
required that the implementation does anything with the passed

The manual page was taken from FreeBSD.

16 months agolibc: Document getservent_r(), getservbyport_r(), and getservbyname_r().
Sascha Wildner [Sat, 4 May 2019 17:44:03 +0000 (19:44 +0200)]
libc: Document getservent_r(), getservbyport_r(), and getservbyname_r().

Partially-taken-from: OpenBSD

16 months agolibc: Document getprotoent_r(), getprotobynumber_r(), and getprotobyname_r().
Sascha Wildner [Sat, 4 May 2019 10:20:06 +0000 (12:20 +0200)]
libc: Document getprotoent_r(), getprotobynumber_r(), and getprotobyname_r().

Partially-taken-from: OpenBSD

16 months agolibc: Document offtime(), timelocal(), and timeoff().
Sascha Wildner [Sat, 4 May 2019 09:50:10 +0000 (11:50 +0200)]
libc: Document offtime(), timelocal(), and timeoff().

Taken-from: NetBSD

16 months agobuild - Make sure /usr/local/bin is NOT in the $PATH for kernel
Matthew Dillon [Sat, 4 May 2019 04:46:16 +0000 (21:46 -0700)]
build - Make sure /usr/local/bin is NOT in the $PATH for kernel

* Make sure /usr/local/bin is NOT in the $PATH when building the
  kernel.  If it is, a dports-installed binutils can cause an
  incompatible linker (e.g. one that doesn't recognize LDVER, for
  example) to be used, blowing up incremental builds between
  buildkernel, nativekernel, and manual builds from the object
  directory ( /usr/obj/usr/src/sys/<KERNEL_CONFIG> ).

16 months agodrm/ttm: Fix a deadlock involving fictitious VM pages
Matthew Dillon [Fri, 3 May 2019 20:36:22 +0000 (22:36 +0200)]
drm/ttm: Fix a deadlock involving fictitious VM pages

This prevents processes getting hung in "ttm_unm" state.

16 months agodrm: Sync ttm and radeon drivers with Linux 3.18
François Tigeot [Fri, 3 May 2019 19:56:27 +0000 (21:56 +0200)]
drm: Sync ttm and radeon drivers with Linux 3.18

16 months agodrm: Import dma-buf reservation code from Linux 4.7.10
François Tigeot [Fri, 3 May 2019 19:53:58 +0000 (21:53 +0200)]
drm: Import dma-buf reservation code from Linux 4.7.10

16 months agodrm: More linux/seqlock.h functions
François Tigeot [Fri, 3 May 2019 19:45:23 +0000 (21:45 +0200)]
drm: More linux/seqlock.h functions

16 months agokernel - Permanently fix FP bug - completely remove lazy heuristic
Matthew Dillon [Fri, 3 May 2019 20:24:13 +0000 (13:24 -0700)]
kernel - Permanently fix FP bug - completely remove lazy heuristic

* Remove the FP lazy heuristic.  When the FP unit is being used by a
  thread, it will now *always* be actively saved and restored on
  context switch.

  This means that if a process uses the FP unit at all, its context
  switches (to another thread) will active save/restore the state forever

* This fixes a known hardware bug on Intel CPUs that we thought was fixed
  before (by not saving The FP context from thread A from the DNA interrupt
  on thread B)...  but it turns out it wasn't.

  We could tickle the bug on Intel CPUs by forcing synth to regenerate
  its flavor index over and over again.  This regeneration fork/exec's
  about 60,000 make's, sequencing concurrently on all cores, and usually
  hits the bug in less than 5 minutes.

* We no longer support lazy FP restores, period.  This is like the fourth
  time I've tried to deal with this, so now its time to give up and not
  use lazy restoration at all, ever again.

16 months agokernel - Backout procfs map change
Matthew Dillon [Fri, 3 May 2019 20:04:39 +0000 (13:04 -0700)]
kernel - Backout procfs map change

* Backout the addition of MAP_STACK 'STK' flagging in the map
  output.  It blows up gcore's /proc/pid/map scan (not procfs's
  fault)... but lets not rock the boat for now.  The flag isn't

16 months agokernel - Implement debug function w/kern.logsigexit > 1
Matthew Dillon [Fri, 3 May 2019 17:15:13 +0000 (10:15 -0700)]
kernel - Implement debug function w/kern.logsigexit > 1

* kern.logsigexit defaults to 1, which logs signal exits that might
  core dump.

* This change allows setting this sysctl to 2 for debugging purposes.
  The kernel will log the error and then stall uninterruptibly until
  you set the sysctl back to 1 (to resume logging normally).

  This is more kernel debugging only.

16 months agolibrecrypto: Rename unused header.
zrj [Fri, 3 May 2019 10:59:15 +0000 (13:59 +0300)]
librecrypto: Rename unused header.

It is not used during the buildworld.

16 months agodrm/linux: Add an interval_tree implementation
Matthew Dillon [Fri, 3 May 2019 08:58:10 +0000 (10:58 +0200)]
drm/linux: Add an interval_tree implementation

Contrary to the official Linux one, it does not use RB trees.

16 months agodrm: Do not directly define __OS_HAS_AGP
François Tigeot [Fri, 3 May 2019 08:46:33 +0000 (10:46 +0200)]
drm: Do not directly define __OS_HAS_AGP

Use CONFIG_AGP instead

16 months agodrm: Do not use PHOLD/PRELE() in flush_taskqueue()
François Tigeot [Fri, 3 May 2019 08:28:26 +0000 (10:28 +0200)]
drm: Do not use PHOLD/PRELE() in flush_taskqueue()

16 months agodrm/linux: Expand mm_types.h and mmu_notifier.h coverage
François Tigeot [Fri, 3 May 2019 07:37:41 +0000 (09:37 +0200)]
drm/linux: Expand mm_types.h and mmu_notifier.h coverage

16 months agoindent.1: Add some missing whitespace.
Sascha Wildner [Fri, 3 May 2019 07:29:12 +0000 (09:29 +0200)]
indent.1: Add some missing whitespace.

16 months agoworld - update manual page for mmap()
Matthew Dillon [Fri, 3 May 2019 06:21:52 +0000 (23:21 -0700)]
world - update manual page for mmap()

* Update the manual page for mmap().

16 months agokernel - Fix serious bug in MAP_STACK, deprecate auto-grow semantics
Matthew Dillon [Fri, 3 May 2019 06:03:32 +0000 (23:03 -0700)]
kernel - Fix serious bug in MAP_STACK, deprecate auto-grow semantics

* When MAP_STACK is used without MAP_TRYFIXED, the address the kernel
  determines for the stack was *NOT* being returned to userland.  Instead,
  userland always got only the hint address.

* This fixes ruby MAP_STACK use cases and possibly more.

* Deprecate MAP_STACK auto-grow semantics.  All user mmap() calls with
  MAP_STACK are now converted to normal MAP_ANON mmaps.  The kernel will
  continue to create an auto-grow stack segment for the primary user stack
  in exec(), allowing older pthread libraries to continue working, but this
  feature is deprecated and will be removed in a future release.

16 months agopthreads and kernel - change MAP_STACK operation
Matthew Dillon [Fri, 3 May 2019 02:48:53 +0000 (19:48 -0700)]
pthreads and kernel - change MAP_STACK operation

* Only allow new mmap()'s to intrude on ungrown MAP_STACK areas when
  MAP_TRYFIXED is specified.  This was not working as intended before.
  Adjust the manual page to be more clear.

* Make kern.maxssiz (the maximum user stack size) visible via sysctl.

* Add kern.maxthrssiz, indicating the approximate space for placement
  of pthread stacks.  This defaults to 128GB.

* The old libthread_xu stack code did use TRYFIXED and will work
  with the kernel changes, but change how it works to not assume
  that the user stack should suddenly be limited to the pthread stack
  size (~2MB).

  Just use a normal mmap() now without TRYFIXED and a hint based on
  kern.maxthrssiz (defaults to 512GB), calculating a starting address
  hint that is (_usrstack - maxssiz - maxthrssiz).

* Adjust procfs to report MAP_STACK segments as 'STK'.

16 months agopthread_set_name_np.3: Add some articles.
Sascha Wildner [Thu, 2 May 2019 08:28:42 +0000 (10:28 +0200)]
pthread_set_name_np.3: Add some articles.

16 months agokernel - Add kern.ipc.soaccept_reuse and set default to 1
Matthew Dillon [Wed, 1 May 2019 18:31:50 +0000 (11:31 -0700)]
kernel - Add kern.ipc.soaccept_reuse and set default to 1

* This feature, enabled by default, allows a service listening on
  a socket to be killed and restarted without causing
  "bind: Address already in use" errors due to accepted connections still
  being present.

* The accepted connections may still be present either because they
  are still in active use (though typically this is not the case when
  a service is killed... its children also get killed).  But also, more
  importantly, if the sockets are still present due to lingering on a
  TCP timeout.

  In both of these situations we allow bind() to ignore matches against
  accepted connections.  This allows a service to be restared without
  having to set SO_REUSEADDR (for example named/bind generally does not
  set SO_REUSEADDR and restarting can be a pain).

16 months agoPRIV: Handle histedit.h in unpriv_base.sh
zrj [Wed, 1 May 2019 07:50:24 +0000 (10:50 +0300)]
PRIV: Handle histedit.h in unpriv_base.sh

16 months agoComplete upgrade of libedit from 2017-03-29 to 2019-03-24
zrj [Tue, 30 Apr 2019 20:00:20 +0000 (23:00 +0300)]
Complete upgrade of libedit from 2017-03-29 to 2019-03-24

16 months agoMerge remote-tracking branch 'origin/vendor/LIBEDIT'
zrj [Tue, 30 Apr 2019 20:44:55 +0000 (23:44 +0300)]
Merge remote-tracking branch 'origin/vendor/LIBEDIT'


16 months agobsd.lib.mk: Fix tyoo.
zrj [Tue, 30 Apr 2019 19:27:46 +0000 (22:27 +0300)]
bsd.lib.mk: Fix tyoo.

Reported-by: swildner
16 months agoUpdate libedit from version 2017-03-29 to 2019-03-24 on vendor branch vendor/LIBEDIT
zrj [Tue, 30 Apr 2019 19:04:07 +0000 (22:04 +0300)]
Update libedit from version 2017-03-29 to 2019-03-24 on vendor branch

16 months agoComplete upgrade of libedit from 2015-03-25 to 2017-03-29
zrj [Tue, 30 Apr 2019 17:43:58 +0000 (20:43 +0300)]
Complete upgrade of libedit from 2015-03-25 to 2017-03-29

Disable use of Symbol.map, bump shlib ver and move to shpub.
Add compatibility on api change for lvm(8).

16 months agoMerge remote-tracking branch 'origin/vendor/LIBEDIT'
zrj [Tue, 30 Apr 2019 17:59:56 +0000 (20:59 +0300)]
Merge remote-tracking branch 'origin/vendor/LIBEDIT'


16 months agosh(1): Exclude <histedit.h> better for BOOTSTRAPPING.
zrj [Fri, 26 Apr 2019 16:32:29 +0000 (19:32 +0300)]
sh(1): Exclude <histedit.h> better for BOOTSTRAPPING.

16 months agolibedit: Start tracking minimal symbol map.
zrj [Fri, 26 Jan 2018 10:23:50 +0000 (12:23 +0200)]
libedit: Start tracking minimal symbol map.

Previous variant included non header public symbols. Map is changing
too significantly, symbol versioning is not supported by upstream.
For now include all currently used symbols + ones in contrib/lvm2.

When certain symbols are used by base utilities updates, they should be
added to minimal map too. All symbols are still available in static lib.

16 months agolibedit: Privatize the last public header.
zrj [Tue, 30 Apr 2019 07:28:00 +0000 (10:28 +0300)]
libedit: Privatize the last public header.

Adjust all cases to include correct histedit.h header.

16 months agoLIBPRIV: Remove leftover deps from wpa_cli(8).
zrj [Fri, 26 Apr 2019 16:45:52 +0000 (19:45 +0300)]
LIBPRIV: Remove leftover deps from wpa_cli(8).

Currently we use edit.c implemenatation. There is edit_simple.c variant.
Third variant - edit_readline.c is not compatible with libedit
(no support for rl_replace_line() for libreadline compatibility).

16 months ago<net/pf/pfvar.h>: Fix buildworld. Move malloc declaration into _KERNEL.
Sascha Wildner [Tue, 30 Apr 2019 07:56:41 +0000 (09:56 +0200)]
<net/pf/pfvar.h>: Fix buildworld. Move malloc declaration into _KERNEL.

This header isn't only used by the kernel.

Reported-by: zrj
16 months agodrm: Bring in the Linux fence implementation from NetBSD
François Tigeot [Mon, 29 Apr 2019 21:10:54 +0000 (23:10 +0200)]
drm: Bring in the Linux fence implementation from NetBSD

16 months agopf - Improve SMP counter performance, static array MAXCPU -> kmalloc
Matthew Dillon [Mon, 29 Apr 2019 19:48:58 +0000 (12:48 -0700)]
pf - Improve SMP counter performance, static array MAXCPU -> kmalloc

* Change the global counters to pcpu counters.  Counters are now
  incremented in a cache-friendly state and will be aggregated
  in the status ioctl.

* Change all static declarations of MAXCPU arrays into kmalloc()d
  arrays to reduce kernel bss size.

16 months ago<execinfo.h>: Include <sys/cdefs.h> explicitly for __{BEGIN,END}_DECLS.
Sascha Wildner [Mon, 29 Apr 2019 10:44:01 +0000 (12:44 +0200)]
<execinfo.h>: Include <sys/cdefs.h> explicitly for __{BEGIN,END}_DECLS.

Normally this should come in via our <stddef.h>, but ports compilers
might include the compiler's own <stddef.h> that doesn't seem to
include it.

Reported-by: profmax
16 months agokernel/ums: Use evdev's private lock for ums
Peeter Must [Mon, 29 Apr 2019 10:19:54 +0000 (13:19 +0300)]
kernel/ums: Use evdev's private lock for ums

* evdev can use either an internal or an external lock (the
  parent driver's lock) to protect its private data in
  evdev_dev. For ums evdev uses the ums (external) lock.
  However, sometimes this leads to a panic when the usb
  mouse is detached. This is because the ums may have cleaned
  up its structures, including the lock, while the evdev is
  still busy freeing its resources. If this happens, evdev
  will panic since it cannot use the lock.

* The remedy is to make evdev use its private lock instead of
  ums's lock. This is similar to how evdev and ukbd operate.

* A similar situation may occur for other drivers that we will
  need to link to evdev.

* This change will make our ums/evdev deviate from FreeBSD.

16 months agodebug - update kmapinfo
Matthew Dillon [Sun, 28 Apr 2019 21:19:08 +0000 (14:19 -0700)]
debug - update kmapinfo

* Update kmapinfo for recent vm_map changes.

16 months agokernel - Limit console message rate for swap-full warnings
Matthew Dillon [Sun, 28 Apr 2019 04:45:35 +0000 (21:45 -0700)]
kernel - Limit console message rate for swap-full warnings

* Limit the message rate on the console for swap-full warnings
  to 1hz.  This prevents console spam due to a swap-full condition
  from making the system unusable.

16 months agoahci - Reduce livelock warnings with ahci
Matthew Dillon [Sun, 28 Apr 2019 03:45:31 +0000 (20:45 -0700)]
ahci - Reduce livelock warnings with ahci

* Mark the ahci (sata) interrupt as HIFREQ to avoid triggering
  livelock warnings.

* Very high interrupt rates are possible with modern SSDs.  We
  don't use the AHCI chipset's interrupt rate moderation features
  because they are a bit problematic (often implemented via an
  unconditional delay even for single commands, for example).

  By flagging the interrupt as HIFREQ, the livelock code will
  trigger at kern.livelock_limit_hi instead of kern.livelock_limit.

16 months agopf - Fix SMP race in max-src-nodes, max-src-conn tracking
Matthew Dillon [Sun, 28 Apr 2019 03:02:39 +0000 (20:02 -0700)]
pf - Fix SMP race in max-src-nodes, max-src-conn tracking

* Fix a SMP race in max-src-nodes tracking where an atomic op was
  not being used.

* Fix a possible SMP race in max-src-conn tracking where atomic ops
  were not being used.

Reported-by: zach
16 months agoworld - Fix deprecated crypto calls
Matthew Dillon [Sat, 27 Apr 2019 05:29:20 +0000 (22:29 -0700)]
world - Fix deprecated crypto calls

* Fix deprecated crypto calls

Suggested-by: zrj
16 months agoworld - Conditionalize MAKEWHATIS path
Matthew Dillon [Sat, 27 Apr 2019 05:27:07 +0000 (22:27 -0700)]
world - Conditionalize MAKEWHATIS path

* Old systems installing a new world have MAKEWHATIS in the old

* Adjust /usr/src/share/man/Makefile to find the binary in either
  the old or new location.

16 months agodrm: Remove a debugging message
François Tigeot [Fri, 26 Apr 2019 19:56:59 +0000 (21:56 +0200)]
drm: Remove a debugging message

16 months agodrm/linux: Improve RCU support
François Tigeot [Fri, 26 Apr 2019 18:01:09 +0000 (20:01 +0200)]
drm/linux: Improve RCU support

Add more RCU directives, make sure existing ones are more correct.

16 months agoRemove two more files by 'make upgrade'.
Sascha Wildner [Fri, 26 Apr 2019 12:03:09 +0000 (14:03 +0200)]
Remove two more files by 'make upgrade'.

16 months agolibssh: Do not create obj dir for Makefile.etc.
zrj [Fri, 26 Apr 2019 11:07:58 +0000 (14:07 +0300)]
libssh: Do not create obj dir for Makefile.etc.

We only install raw moduli file here directly from contrib (TRUST).
Adjust etc/Makefile too.

Note: backup copy is also installed into /usr/share/examples/etc/ssh/
together with current base default sshd_config and ssh_config.
The ssh configs in /etc/ssh/ are left for system administrator to handle
and update when default options are removed or added.

16 months agonrelease: Reduce the size of /usr/local on the IMG/ISO considerably.
Sascha Wildner [Fri, 26 Apr 2019 08:57:33 +0000 (10:57 +0200)]
nrelease: Reduce the size of /usr/local on the IMG/ISO considerably.

* Exchange git with git-lite which should have everything we need for
  our purposes. This gets rid of perl and various p5-* packages.

* Build the bind-tools without option PYTHON. This gets rid of python
  and various py27-* packages.

* While here, use <category>_<port>_{,UN}SET to handle options, instead
  of rolling our own mechanism.

All in all, this commit cuts the number of installed packages from 40
to 22 and reduces /usr/local's size from 300M to 145M.

Thanks to zrj for help and advice.

16 months agobsd.libnames.mk: Adjust for recent libobjc removal.
Sascha Wildner [Thu, 25 Apr 2019 20:24:41 +0000 (22:24 +0200)]
bsd.libnames.mk: Adjust for recent libobjc removal.

16 months agodrm: Replace linux/hashtable.h with NetBSD's version
François Tigeot [Thu, 25 Apr 2019 19:44:33 +0000 (21:44 +0200)]
drm: Replace linux/hashtable.h with NetBSD's version

16 months agonrelease: Install security/ca_root_nss explicitly (non-automatic).
Sascha Wildner [Thu, 25 Apr 2019 13:06:35 +0000 (15:06 +0200)]
nrelease: Install security/ca_root_nss explicitly (non-automatic).

This is to prevent it accidentally being removed by an autoremove
after deleting the package that brought it in as a dependency.

Reported-by: Frank Rehwinkel <frankrehwinkel@gmail.com>
17 months agokernel: Cleanup pccarddevs file a bit.
Sascha Wildner [Thu, 25 Apr 2019 09:13:02 +0000 (11:13 +0200)]
kernel: Cleanup pccarddevs file a bit.

17 months agonetgraph: Comment out unimplemented NGIOCSETNAME definition.
Sascha Wildner [Thu, 25 Apr 2019 08:46:08 +0000 (10:46 +0200)]
netgraph: Comment out unimplemented NGIOCSETNAME definition.

17 months agowi(4): Comment out unimplemented SIOC[GS]PRISM2DEBUG ioctl definitions.
Sascha Wildner [Thu, 25 Apr 2019 08:43:27 +0000 (10:43 +0200)]
wi(4): Comment out unimplemented SIOC[GS]PRISM2DEBUG ioctl definitions.

17 months agocam: Comment out definition of SESIOC_GETTEXT ioctl (unimplemented).
Sascha Wildner [Thu, 25 Apr 2019 08:37:50 +0000 (10:37 +0200)]
cam: Comment out definition of SESIOC_GETTEXT ioctl (unimplemented).

17 months agodevfsctl/mount_dirfs: Save some #include's by including <sys/param.h>.
Sascha Wildner [Thu, 25 Apr 2019 08:33:34 +0000 (10:33 +0200)]
devfsctl/mount_dirfs: Save some #include's by including <sys/param.h>.

17 months agoSync libfetch and fetch(1) with FreeBSD.
Sascha Wildner [Thu, 25 Apr 2019 07:09:54 +0000 (09:09 +0200)]
Sync libfetch and fetch(1) with FreeBSD.

17 months agoBump __DragonFly_version for recent updates.
zrj [Wed, 24 Apr 2019 17:51:10 +0000 (20:51 +0300)]
Bump __DragonFly_version for recent updates.

17 months agoopenssl(1): Add missing manual pages.
Sascha Wildner [Wed, 24 Apr 2019 17:53:42 +0000 (19:53 +0200)]
openssl(1): Add missing manual pages.

17 months agoMerge branch 'vendor/LIBRESSL'
Sascha Wildner [Wed, 24 Apr 2019 17:50:21 +0000 (19:50 +0200)]
Merge branch 'vendor/LIBRESSL'

17 months agoAdd a missing manual page to LIBRESSL's vendor branch.
Sascha Wildner [Wed, 24 Apr 2019 17:49:43 +0000 (19:49 +0200)]
Add a missing manual page to LIBRESSL's vendor branch.

17 months agoinitrd: Adjust for dependencies removal.
zrj [Wed, 17 Apr 2019 04:09:33 +0000 (07:09 +0300)]
initrd: Adjust for dependencies removal.

The libmd no longer needed.

17 months agotools/dumpvfscache: Remove not needed dependency on libmd.
zrj [Wed, 17 Apr 2019 04:04:23 +0000 (07:04 +0300)]
tools/dumpvfscache: Remove not needed dependency on libmd.

Tool is not ported and does not build.
This is the last buildworld part where libmd is referenced.

17 months agohammer(8): Convert to LibreSSL SHA2 hash API.
zrj [Wed, 17 Apr 2019 04:01:20 +0000 (07:01 +0300)]
hammer(8): Convert to LibreSSL SHA2 hash API.

17 months agomd5(1): Convert to LibreSSL all hash API.
zrj [Wed, 17 Apr 2019 03:58:45 +0000 (06:58 +0300)]
md5(1): Convert to LibreSSL all hash API.

This includes MD5, RIPEMD160 and various SHA variants.
Prune no longer needed sources.

17 months agodhcpcd(8): Convert to LibreSSL MD5 and SHA2 hash API.
zrj [Wed, 17 Apr 2019 03:56:33 +0000 (06:56 +0300)]
dhcpcd(8): Convert to LibreSSL MD5 and SHA2 hash API.

17 months agoping6(8): Convert to LibreSSL MD5 hash API.
zrj [Wed, 17 Apr 2019 03:55:49 +0000 (06:55 +0300)]
ping6(8): Convert to LibreSSL MD5 hash API.

17 months agoiscontrol(8): Convert to LibreSSL MD5 and SHA1 hash API.
zrj [Wed, 17 Apr 2019 03:54:31 +0000 (06:54 +0300)]
iscontrol(8): Convert to LibreSSL MD5 and SHA1 hash API.

17 months agorouted(8): Convert to LibreSSL MD5 hash API.
zrj [Wed, 17 Apr 2019 03:53:32 +0000 (06:53 +0300)]
routed(8): Convert to LibreSSL MD5 hash API.

17 months agosort(1): Convert to LibreSSL MD5 hash API.
zrj [Wed, 17 Apr 2019 03:51:44 +0000 (06:51 +0300)]
sort(1): Convert to LibreSSL MD5 hash API.

Only used for "sort -R" random mode.
While there, simplify crunchgen rescue tools build.

17 months agoppp(8): Convert to LibreSSL MD4 and MD5 hash API.
zrj [Wed, 17 Apr 2019 03:50:23 +0000 (06:50 +0300)]
ppp(8): Convert to LibreSSL MD4 and MD5 hash API.

17 months agopfctl(8): Convert to LibreSSL MD5 hash API.
zrj [Wed, 17 Apr 2019 03:49:08 +0000 (06:49 +0300)]
pfctl(8): Convert to LibreSSL MD5 hash API.

17 months agomtree(8): Convert to LibreSSL hash API.
zrj [Wed, 17 Apr 2019 03:43:57 +0000 (06:43 +0300)]
mtree(8): Convert to LibreSSL hash API.

Add new function dohash() that handles md5, rmd160 and all sha variants.
This change makes SHA384 available to use too. Utility is too complicated
and need to be split up.

While there, simplify crunchgen rescue build.

17 months agochkdist(8): Convert to LibreSSL MD5 hash API.
zrj [Wed, 17 Apr 2019 03:39:45 +0000 (06:39 +0300)]
chkdist(8): Convert to LibreSSL MD5 hash API.

17 months agoauthpf(8): Remove not needed dependency on libmd.
zrj [Wed, 17 Apr 2019 03:38:07 +0000 (06:38 +0300)]
authpf(8): Remove not needed dependency on libmd.

17 months agocpdup(1): Convert to LibreSSL MD5 hash API.
zrj [Wed, 17 Apr 2019 03:35:08 +0000 (06:35 +0300)]
cpdup(1): Convert to LibreSSL MD5 hash API.

While there, simplify crunchgen by excluding md5 functionality in
rescue tools as in btools.

17 months agopw(8): Conditionalize OPIE handling.
zrj [Wed, 17 Apr 2019 02:26:32 +0000 (05:26 +0300)]
pw(8): Conditionalize OPIE handling.

17 months agotelnet(1): Disable use of OPIE.
zrj [Wed, 17 Apr 2019 02:15:30 +0000 (05:15 +0300)]
telnet(1): Disable use of OPIE.

Move <sys/wait.h> it is needed for another call site.

17 months agoftpd(8): Decouple from libmd.
zrj [Wed, 17 Apr 2019 02:11:48 +0000 (05:11 +0300)]
ftpd(8): Decouple from libmd.

Reimplement site command "md5" using LibreSSL MD5 API.

17 months agoftpd(8): Add OPIE checks to conditionally disable it.
zrj [Wed, 17 Apr 2019 02:09:55 +0000 (05:09 +0300)]
ftpd(8): Add OPIE checks to conditionally disable it.

17 months agolibtacplus: Decouple from libmd.
zrj [Wed, 17 Apr 2019 01:30:19 +0000 (04:30 +0300)]
libtacplus: Decouple from libmd.

Library is simple enough to not depend on librecrypto.
Use MD5 hash internally and remove inter-lib dep.

17 months agolibtacplus: Fix single -Wshadow warning.
zrj [Wed, 17 Apr 2019 01:25:06 +0000 (04:25 +0300)]
libtacplus: Fix single -Wshadow warning.

17 months agolib/libcrypt: Use md5 internally from omd.
zrj [Wed, 17 Apr 2019 01:11:02 +0000 (04:11 +0300)]
lib/libcrypt: Use md5 internally from omd.

The libcrypt can be converted to use LibreSSL MD5 API, but to ensure
compatibility between OpenSSL and LibreSSL for now use private md5.
Mark with WITH_OPENSSL that it is ready.

17 months agolib/omd: Add very restrictive subset from libmd.
zrj [Wed, 17 Apr 2019 01:08:39 +0000 (04:08 +0300)]
lib/omd: Add very restrictive subset from libmd.

Certain places are not ready to be converted to use LibreSSL api.
For now this includes only md5 hashing functions.
Aim is to remove all use cases of libmd together with omd.

17 months agolib/libcrypt: Add missing functions.
zrj [Wed, 17 Apr 2019 00:35:32 +0000 (03:35 +0300)]
lib/libcrypt: Add missing functions.

Taken-from: NetBSD

17 months agolib/libcrypt: Minor WARNS cleanup.
zrj [Wed, 17 Apr 2019 00:28:47 +0000 (03:28 +0300)]
lib/libcrypt: Minor WARNS cleanup.

Add missing prototypes, constify few things.

17 months agoRemove libcipher.
zrj [Wed, 17 Apr 2019 00:19:47 +0000 (03:19 +0300)]
Remove libcipher.

It has been moved out to dports security/libcipher3.

17 months agoshare/examples: Install missing defaults for ssl and ssh.
zrj [Fri, 19 Apr 2019 15:40:21 +0000 (18:40 +0300)]
share/examples: Install missing defaults for ssl and ssh.

This would help with config updates merging and local system recovery
when configs in /etc get accidentally deleted or broken beyond repair.

17 months agolibssh: Bump shlib version for api change.
zrj [Fri, 19 Apr 2019 18:08:25 +0000 (21:08 +0300)]
libssh: Bump shlib version for api change.

The private libssh does not install any headers. Make it shpub.
There are few issues that need to be addressed later on.
For now just document its dependency on libutil, adjust order.
The libprivate_ssh.so must be built before libpam shared modules.

17 months agoOpenSSH: Document contrib local changes.
zrj [Fri, 19 Apr 2019 10:45:55 +0000 (13:45 +0300)]
OpenSSH: Document contrib local changes.