1. 26 Apr, 2022 3 commits
  2. 25 Apr, 2022 4 commits
    • Cy Schubert's avatar
      libexec/rc.d/hostapd: Down/up interface when interface is specified · d818ef7d
      Cy Schubert authored
      When no interface is specified results in a syntax error in the rc
      script. Only execute poststart when an interface has been specified.
      
      PR:		263358
      Submitted by:	markj
      Reported by:	Joshua Kinard <freebsd@kumba.dev>
      Fixes:		0da2c91e
      
      (cherry picked from commit 1452bfcd)
      d818ef7d
    • Ed Maste's avatar
      ssh: apply style(9) to version_addendum · 776b9127
      Ed Maste authored
      Reported by:	allanjude (in review D29953)
      Fixes:		462c32cb ("Upgrade OpenSSH to 6.1p1.")
      MFC after:	1 week
      Sponsored by:	The FreeBSD Foundation
      
      (cherry picked from commit 613b4b79)
      776b9127
    • Cameron Katri's avatar
      cp: Make -P work without -R as per POSIX · 19413ce6
      Cameron Katri authored
      According to POSIX, cp should allow the `-P` flag to work whether `-R`
      is specified or not.  Currently, the `-P` option only works along with
      `-R`.
      
      PR:		199466
      Reviewed by:	kevans
      
      (cherry picked from commit 97e13037)
      19413ce6
    • Kyle Evans's avatar
      cp: fix -R with links · 1d9f60b0
      Kyle Evans authored
      The traversal was previously not properly honoring -H/-L/-P.  Notably,
      we should not have been resolving symlinks encountered during traversal
      when either -H or -P are specified.
      
      Sponsored by:	Klara, Inc.
      Reviewed by:	bapt
      
      (cherry picked from commit 33ad990c)
      1d9f60b0
  3. 24 Apr, 2022 3 commits
    • Kyle Evans's avatar
      stand: zfs: handle holes at the tail end correctly · 9a1efa76
      Kyle Evans authored
      This mirrors dmu_read_impl(), zeroing out the tail end of the buffer and
      clipping the read to what's contained by the block that exists.
      
      This fixes an issue that arose during the 13.1 release process; in
      13.1-RC1 and later, setting up GELI+ZFS will result in a failure to
      boot.  The culprit is this, which causes us to fail to load geom_eli.ko
      as there's a residual portion after the single datablk that should be
      zeroed out.
      
      PR:		263407
      Reviewed by:	tsoome
      
      (cherry picked from commit 914dc91d)
      9a1efa76
    • Kyle Evans's avatar
      cp: fix -R recursion detection · a605ca25
      Kyle Evans authored
      The correct logic is a lot simpler than the previous iteration.  We
      record the base fts_name to avoid having to worry about whether we
      needed the root symlink name or not (as applicable), then we can simply
      shift all of that logic to after path translation to make it less
      fragile.
      
      If we're copying to DNE, then we'll have swapped out the NULL root_stat
      pointer and then attempted to recurse on it.  The previously nonexistent
      directory shouldn't exist at all in the new structure, so just back out
      from that tree entirely and move on.
      
      The tests have been amended to indicate our expectations better with
      subdirectory recursion.  If we copy A to A/B, then we expect to copy
      everything from A/B/* into A/B/A/B, with exception to the A that we
      create in A/B.
      
      Reviewed by:	bapt
      Sponsored by:	Klara, Inc.
      
      (cherry picked from commit f00f8b4f)
      a605ca25
    • Kyle Evans's avatar
      cp: fix some cases with infinite recursion · b5795471
      Kyle Evans authored
      As noted in the PR, cp -R has some surprising behavior.  Typically, when
      you `cp -R foo bar` where both foo and bar exist, foo is cleanly copied
      to foo/bar.  When you `cp -R foo foo` (where foo clearly exists), cp(1)
      goes a little off the rails as it creates foo/foo, then discovers that
      and creates foo/foo/foo, so on and so forth, until it eventually fails.
      
      POSIX doesn't seem to disallow this behavior, but it isn't very useful.
      GNU cp(1) will detect the recursion and squash it, but emit a message in
      the process that it has done so.
      
      This change seemingly follows the GNU behavior, but it currently doesn't
      warn about the situation -- the author feels that the final product is
      about what one might expect from doing this and thus, doesn't need a
      warning.  The author doesn't feel strongly about this.
      
      PR:		235438
      Reviewed by:	bapt
      Sponsored by:	Klara, Inc.
      
      (cherry picked from commit 848263aa)
      b5795471
  4. 23 Apr, 2022 4 commits
  5. 22 Apr, 2022 1 commit
  6. 21 Apr, 2022 3 commits
    • Kyle Evans's avatar
      loader: userboot: provide a getsecs() implementation · 53fefea5
      Kyle Evans authored
      We don't need it for userboot, but it avoids issues with BIND_NOW, so
      just provide it.  time(3) isn't defined but ends up being provided by
      libc linked into the host process, which is generally fine.
      
      PR:	262920
      Reviewed by:	imp, jhb
      
      (cherry picked from commit 660c1892)
      53fefea5
    • Kyle Evans's avatar
      stand: libefi: swap /Pci() printing around · 13cc5276
      Kyle Evans authored
      Printing device followed by interface matches, e.g., edk2.  Note that
      this is only a fallback, many firmware implementations will provide the
      protocol that we'll use to format device paths.
      
      Reviewed by:	imp, tsoome
      Sponsored by:	Ampere Computing
      Submitted by:	Klara, Inc.
      
      (cherry picked from commit 454630c7)
      13cc5276
    • Gordon Bergling's avatar
      time(3): Refine history in the manual page · cf1c35c9
      Gordon Bergling authored
      The time() system call first appeared in Version 1 AT&T UNIX.  Through
      the Version 3 AT&T UNIX, it returned 60 Hz ticks since an epoch that
      changed occasionally, because it was a 32-bit value that overflowed in a
      little over 2 years.
      
      In Version 4 AT&T UNIX the granularity of the return value was reduced to
      whole seconds, delaying the aforementioned overflow until 2038.
      
      Version 7 AT&T UNIX introduced the ftime() system call, which returned
      time at a millisecond level, though retained the gtime() system call
      (exposed as time() in userland).  time() could have been implemented as a
      wrapper around ftime(), but that wasn't done.
      
      4.1cBSD implemented a higher-precision time function gettimeofday() to
      replace ftime() and reimplemented time() in terms of that.
      
      Since FreeBSD 9 the implementation of time() uses
      clock_gettime(CLOCK_SECOND) instead of gettimeofday() for performance
      reasons.
      
      With most valuable input from Warner (imp@).
      
      Reviewed by:	0mp, jilles, imp
      Differential Revision:	https://reviews.freebsd.org/D34751
      
      (cherry picked from commit 3e0f3678)
      cf1c35c9
  7. 20 Apr, 2022 2 commits
    • Ed Maste's avatar
      vidcontrol: disable p, P, and H when vt(4) is in use · 1bb77846
      Ed Maste authored
      These options use the CONS_SCRSHOT ioctl to capture the contents of the
      current console, which is not yet supported by vt(4).  Disable the
      options when vt(4) is in use rather than emitting a possibly confusing
      error message.
      
      This change should be reverted if CONS_SCRSHOT is implemented for vt(4).
      
      PR:		263099
      MFC after:	1 week
      Sponsored by:	The FreeBSD Foundation
      
      (cherry picked from commit c71ae91f)
      (cherry picked from commit 1f4442f7)
      (cherry picked from commit 4aa249b5f367c3fe0aec287bbf156131ec75ebd3)
      1bb77846
    • Ed Maste's avatar
      ssh-agent: move -x description to correct spot in man page · 60b63dfe
      Ed Maste authored
      MFC after:	3 days
      Sponsored by:	The FreeBSD Foundation
      
      (cherry picked from commit eb45bc68)
      60b63dfe
  8. 18 Apr, 2022 5 commits
    • Stefan Eßer's avatar
      bin/df: add back linking with getmntops.c from sbin/mount · 879a6b7b
      Stefan Eßer authored
      A last minute clean-up of the Makefile erroneously removed the
      definitions required to link against sbin/mount/getmntops.c which
      defines the iovec handling functions used for the unmounted device
      case (that has been removed from -CURRENT and 13-STABLE).
      
      Put back the definitions to make the build with MOUNT_CHAR_DEVS
      defined succeed.
      879a6b7b
    • Stefan Eßer's avatar
      bin/df: fix build with MOUNT_CHAR_DEVS defined · 7dfb8f15
      Stefan Eßer authored
      When resolving conflicts due to the unmergewd commit that removed the
      code previously made conditional on MOUNT_CHAR_DEVS, I failed to see
      that MOUNT needed to be defined in the Makefile and that the include
      of mntopts.h was still required for that case.
      
      Fix the build by adding back the missing definitions to the Makefile.
      7dfb8f15
    • Stefan Eßer's avatar
      bin/df: allow -t option to be used together with -l · 741b90dc
      Stefan Eßer authored
      The df command provides a -l option to exclude all non-local file
      systems and a -t option with a (positive or negative) list of file
      system types to display.
      
      This commit adds support for a combination of -l and -t. If both are
      specified, the parameter list of the -t option is applied on top of
      the selection of öocal file systems (independently of the order of
      the -l and -t options).
      
      E.g., "df -t noprocfs,sysfs -l" will select all local file systems
      except those of type procfs and sysfs.
      
      (cherry picked from commit f0fd4a32)
      (cherry picked from commit c888fc2d)
      741b90dc
    • Mateusz Guzik's avatar
      df: remove the unused fstype var · 647f70e6
      Mateusz Guzik authored
      Found with cc --analyze
      
      Sponsored by:	Rubicon Communications, LLC ("Netgate")
      
      (cherry picked from commit 570b31f6)
      (cherry picked from commit ede6e97b)
      647f70e6
    • Fernando Apesteguía's avatar
      df(1): Add EXAMPLES section to man page · ca5f7b7a
      Fernando Apesteguía authored
      * Add EXAMPLES section with four simple examples.
      * Simplify -H flag description. This makes easy to see the difference between
        this flag and -h
      * While here, fix .Tn deprecated macro.
      
      Approved by:	manpages (bcr@)
      Differential Revision:	https://reviews.freebsd.org/D26662
      
      (cherry picked from commit ad3d2e7e)
      ca5f7b7a
  9. 14 Apr, 2022 15 commits