openbsd
3 years agoCheck callback needs to only return 0 (text should be suppressed) if
nicm [Fri, 13 Aug 2021 20:04:45 +0000 (20:04 +0000)]
Check callback needs to only return 0 (text should be suppressed) if
menu returns 0, otherwise it should check the popup also.

3 years agomerge unbound-1.13.2 / regen configure, ok florian
sthen [Fri, 13 Aug 2021 19:58:45 +0000 (19:58 +0000)]
merge unbound-1.13.2 / regen configure, ok florian

3 years agoimport unbound 1.13.2, ok florian@
sthen [Fri, 13 Aug 2021 19:55:24 +0000 (19:55 +0000)]
import unbound 1.13.2, ok florian@

3 years agoFill in some other bits on new panes.
nicm [Fri, 13 Aug 2021 19:55:11 +0000 (19:55 +0000)]
Fill in some other bits on new panes.

3 years agoAdd menu options to convert a popup into a pane.
nicm [Fri, 13 Aug 2021 19:27:25 +0000 (19:27 +0000)]
Add menu options to convert a popup into a pane.

3 years agoAdjust overlay check callback before drawing data from pty.
nicm [Fri, 13 Aug 2021 19:25:24 +0000 (19:25 +0000)]
Adjust overlay check callback before drawing data from pty.

3 years agoAdd a menu when a popup is present (mouse only for now).
nicm [Fri, 13 Aug 2021 18:54:54 +0000 (18:54 +0000)]
Add a menu when a popup is present (mouse only for now).

3 years agoAdd -B flag to remove border from popup.
nicm [Fri, 13 Aug 2021 17:03:29 +0000 (17:03 +0000)]
Add -B flag to remove border from popup.

3 years agoPlug memory leak in an unlikely error path of iwx_umac_scan_v14().
stsp [Fri, 13 Aug 2021 13:13:11 +0000 (13:13 +0000)]
Plug memory leak in an unlikely error path of iwx_umac_scan_v14().

CID 1506261

3 years agoupdate usage() to reflect s->step change;
jmc [Fri, 13 Aug 2021 12:37:28 +0000 (12:37 +0000)]
update usage() to reflect s->step change;

3 years agoMake -b, -c, and -b mutually exclusive.
martijn [Fri, 13 Aug 2021 11:27:33 +0000 (11:27 +0000)]
Make -b, -c, and -b mutually exclusive.

Help/Feedback/OK schwarze@, tb@

3 years agoDuring line editing, let Ctrl-C discard the current input line and
schwarze [Fri, 13 Aug 2021 10:56:54 +0000 (10:56 +0000)]
During line editing, let Ctrl-C discard the current input line and
provide a fresh prompt instead of exiting the program.  This aligns
behaviour with bc(1), ftp(1), sftp(1), and all the shells.

OK naddy@

Both martijn@ and naddy@ point out that this program might profit
from signal handling during more of its code, but that would require
more code inspection, design work, and testing which i'm not planning
to do right now.  Consider standard behaviour during line editing
as a first step.

3 years agoSimplify an if clause using De Morgan's law.
tb [Fri, 13 Aug 2021 10:45:26 +0000 (10:45 +0000)]
Simplify an if clause using De Morgan's law.

Using the fact that since r1.53 prec is always non-negative and that
r1.50 added an initialization of use_unif, we can eliminate a couple
of lines and make the intention clearer.

ok martijn

3 years agoMake sure prec is non-negative before calling getformat()
tb [Fri, 13 Aug 2021 10:40:23 +0000 (10:40 +0000)]
Make sure prec is non-negative before calling getformat()

If jot is called without arguments, getformat() produces the illegal
"%.-1f" format string. __vfprintf() misinterprets the - as a left
adjust flag and uses a precision of 0. Set prec = 0 so that we use
"%.0f" in this situation.

ok martijn

3 years agoStop using a while loop for code that runs at most once,
schwarze [Fri, 13 Aug 2021 10:21:25 +0000 (10:21 +0000)]
Stop using a while loop for code that runs at most once,
and garbage collect an automatic variable that is no longer needed
and a comment that was probably contributed by Capt. Obvious.
No functional change.

OK millert@ martijn@

3 years agoThe s argument isn't used as seed anymore, so increase readability by
martijn [Fri, 13 Aug 2021 07:59:04 +0000 (07:59 +0000)]
The s argument isn't used as seed anymore, so increase readability by
renaming it to step, which matches the name in the code.

OK tb@

3 years agoApply de Morgan's rule to shave of 4 LoC.
martijn [Fri, 13 Aug 2021 07:56:34 +0000 (07:56 +0000)]
Apply de Morgan's rule to shave of 4 LoC.

OK tb@

3 years agoBreak message type stuff out into its own header.
nicm [Fri, 13 Aug 2021 07:37:58 +0000 (07:37 +0000)]
Break message type stuff out into its own header.

3 years agoChange focus to be driven by events rather than walking all panes at end
nicm [Fri, 13 Aug 2021 06:52:51 +0000 (06:52 +0000)]
Change focus to be driven by events rather than walking all panes at end
of event loop, this way the ordering of in and out can be enforced.
GitHub issue 2808.

3 years agoSet return code for confirm-before and make command-prompt also block,
nicm [Fri, 13 Aug 2021 06:50:42 +0000 (06:50 +0000)]
Set return code for confirm-before and make command-prompt also block,
GitHub issue 2822.

3 years agoRemove unused ure_stop_task (from Christian Ludwig of genua.de)
gnezdo [Fri, 13 Aug 2021 01:24:22 +0000 (01:24 +0000)]
Remove unused ure_stop_task (from Christian Ludwig of genua.de)

The ure_stop_task is not scheduled anywhere.

Compile tested here.

3 years agomention that CASignatureAlgorithms accepts +/- similarly to the
djm [Thu, 12 Aug 2021 23:59:25 +0000 (23:59 +0000)]
mention that CASignatureAlgorithms accepts +/- similarly to the
other algorithm list directives; ok jmc bz#3335

3 years agoMake newline a style delimiter as well so they can cross multiple lines
nicm [Thu, 12 Aug 2021 20:46:30 +0000 (20:46 +0000)]
Make newline a style delimiter as well so they can cross multiple lines
for readability.

3 years agoNow that styles can contain formats, they need to be expanded when
nicm [Thu, 12 Aug 2021 20:44:49 +0000 (20:44 +0000)]
Now that styles can contain formats, they need to be expanded when
inserted into the status line.

3 years agoUse COLOUR_DEFAULT not hardcoded 8.
nicm [Thu, 12 Aug 2021 20:09:34 +0000 (20:09 +0000)]
Use COLOUR_DEFAULT not hardcoded 8.

3 years agoEvaluate styles with the pane variables.
nicm [Thu, 12 Aug 2021 19:47:05 +0000 (19:47 +0000)]
Evaluate styles with the pane variables.

3 years agoOops. Lost a 'nitems()' chunk during last commit. Don't
krw [Thu, 12 Aug 2021 17:30:52 +0000 (17:30 +0000)]
Oops. Lost a 'nitems()' chunk during last commit. Don't
segfault on invalid edit commands.

3 years agoRework the logic for fetching TA files a bit. Move the logic that checks
claudio [Thu, 12 Aug 2021 15:27:15 +0000 (15:27 +0000)]
Rework the logic for fetching TA files a bit. Move the logic that checks
if all possible sources have been used to ta_fetch() this simplifies the
logic in the rsync and http done cases.
Additionally when -R is used, skip https URI and only connect via rsync.
If the TAL file has no rsync URI then the system will fall back to the
cache and not try https instead.
This makes -R a only use rsync flag.
With and OK job@

3 years agoThe RRDP specification is very vage what to do if a notification file
claudio [Thu, 12 Aug 2021 15:23:16 +0000 (15:23 +0000)]
The RRDP specification is very vage what to do if a notification file
has a serial lower than what the client synced to last time. This could
happen if the CDN has a bad server that distributes old data.
Instead of falling back to a snapshot just ignore this case and consider
the repo synced. Hopefully the next run will bring everything back to normal.
OK job@ benno@

3 years agoAdd missing newlines to some printfs in est_acpi_pss_changed()
tb [Thu, 12 Aug 2021 15:16:23 +0000 (15:16 +0000)]
Add missing newlines to some printfs in est_acpi_pss_changed()

ok jsg

3 years agoSync amd64's p3_get_bus_clock() with i386
tb [Thu, 12 Aug 2021 15:13:52 +0000 (15:13 +0000)]
Sync amd64's p3_get_bus_clock() with i386

The printfs complaining about unknown FSB_FREQ values didn't end with
a newline. jsg points out that this is because the original i386 code
then prints MSR_EBL_CR_POWERON, which was omitted when the code was
adapted for amd64.

ok jsg

3 years agodrm/amdgpu/display: only enable aux backlight control for OLED panels
jsg [Thu, 12 Aug 2021 13:09:10 +0000 (13:09 +0000)]
drm/amdgpu/display: only enable aux backlight control for OLED panels

From Alex Deucher
bb65051dcd1fd380a73ca52c87f89522e15bf62d in linux 5.10.y/5.10.58
f2ad3accefc63e72e9932e141c21875cc04beec8 in mainline linux

3 years agodrm/i915: Correct SFC_DONE register offset
jsg [Thu, 12 Aug 2021 13:06:13 +0000 (13:06 +0000)]
drm/i915: Correct SFC_DONE register offset

From Matt Roper
7397034905acaecbc64f6838779bdc81667e682f in linux 5.10.y/5.10.58
9c9c6d0ab08acfe41c9f7efa72c4ad3f133a266b in mainline linux

3 years agodrm/amdgpu/display: fix DMUB firmware version info
jsg [Thu, 12 Aug 2021 13:03:21 +0000 (13:03 +0000)]
drm/amdgpu/display: fix DMUB firmware version info

From Shirish S
dd3f7c5c890450ab2ad6f269a3fdf7bcd6fc2908 in linux 5.10.y/5.10.58
0e99e960ce6d5ff586fc0733bc393c087f52c27b in mainline linux

3 years agoMake it possible to ignore routes or nameservers from a lease as well
florian [Thu, 12 Aug 2021 12:41:08 +0000 (12:41 +0000)]
Make it possible to ignore routes or nameservers from a lease as well
as ignoring servers entirely.
Tested by bket
Parser looks reasonable to benno
man page OK jmc

3 years agoOne some access points we receive an unsolicited assoc status event
patrick [Thu, 12 Aug 2021 12:31:40 +0000 (12:31 +0000)]
One some access points we receive an unsolicited assoc status event
directly after having successfully associated.  In that case we should
ignore the message, because otherwise we re-scan, re-associate and then
get stuck in a loop.  Ignoring the unsolicited assoc status even leads
to a successful connection.

Found by and ok gerhard@

3 years agoFurther reduce cross-file confusion by adding USER_help() and
krw [Thu, 12 Aug 2021 12:31:16 +0000 (12:31 +0000)]
Further reduce cross-file confusion by adding USER_help() and
calling it from Xhelp(). Move declaration of struct cmd to nestle
next to its only instantiation (cmd_table) and use nitems() when
scanning cmd_table.

No functional change.

3 years agoRestore saved cursor position after a ZWJ rather than recalculating it.
nicm [Thu, 12 Aug 2021 11:35:53 +0000 (11:35 +0000)]
Restore saved cursor position after a ZWJ rather than recalculating it.

3 years agoStop playing hopeless games with FIONBIO.
schwarze [Thu, 12 Aug 2021 10:31:15 +0000 (10:31 +0000)]
Stop playing hopeless games with FIONBIO.

If the calling program sets this flag, that is (1) either a bug
(or at least needless) (2) or clearing it in el_wgets(3) will break
other functionality of the calling program if it really requires it.
In both cases, treating EAGAIN as a fatal error in el_wgets(3) is
better than brushing the issue under the carpet: at least it tells
the program author that something is amiss.

Instead of attempting automatic repairs that will almost never do
the right thing, clearly state in the manual page that the editline(3)
library is not designed to work with non-blocking I/O.

The problem was found while investigating a bug report
from deraadt@ in sftp(1).
OK millert@ and "mostly OK" martijn@

3 years agoIn the editline(3) branch of the sftp(1) event loop, handle SIGINT
schwarze [Thu, 12 Aug 2021 09:59:00 +0000 (09:59 +0000)]
In the editline(3) branch of the sftp(1) event loop, handle SIGINT
rather than ignoring it, such that the user can use Ctrl-C to discard
the currently edited command line and get a fresh prompt, just like
in ftp(1), bc(1), and in shells.

It is critical to not use ssl_signal() for this particular case
because that function unconditionally sets SA_RESTART, but here we
need the signal to interrupt the read(2) in the el_gets(3) event loop.

OK dtucker@ deraadt@

3 years agoDo not dereference pane when it is NULL, fixes a crash when creating a
nicm [Thu, 12 Aug 2021 08:10:20 +0000 (08:10 +0000)]
Do not dereference pane when it is NULL, fixes a crash when creating a
hook from the config, GitHub issue 2820.

3 years agoMove hook format setup earlier and add a hook_client, GitHub issue 2809.
nicm [Thu, 12 Aug 2021 08:05:11 +0000 (08:05 +0000)]
Move hook format setup earlier and add a hook_client, GitHub issue 2809.

3 years agoBreak the colour palette into a struct rather than just a single array
nicm [Wed, 11 Aug 2021 20:49:55 +0000 (20:49 +0000)]
Break the colour palette into a struct rather than just a single array
and use that to support the OSC palette-setting sequences in popups.
Also add a pane-colours array option to specify the defaults. GitHub
issue 2815.

3 years agoAdd pipe variants of the line copy commands. While here make the command
nicm [Wed, 11 Aug 2021 20:35:46 +0000 (20:35 +0000)]
Add pipe variants of the line copy commands. While here make the command
list less unreadable. GitHub issue 2813.

3 years agoadd new (unsupported) eddsa in certificate verify tests
tb [Wed, 11 Aug 2021 19:45:08 +0000 (19:45 +0000)]
add new (unsupported) eddsa in certificate verify tests

3 years agoChange default version to -v3 and remove the default community.
martijn [Wed, 11 Aug 2021 18:53:45 +0000 (18:53 +0000)]
Change default version to -v3 and remove the default community.
Similar to what happend in snmpd(8).

OK sthen@

3 years agosync with amd64 k1x-pstate.c r1.11
tb [Wed, 11 Aug 2021 18:46:11 +0000 (18:46 +0000)]
sync with amd64 k1x-pstate.c r1.11

reminded by brynet

3 years agoFor the snmpv2c example, use a community which is something more like
sthen [Wed, 11 Aug 2021 18:35:02 +0000 (18:35 +0000)]
For the snmpv2c example, use a community which is something more like
the sort of thing which should actually be used (a proper random string
rather than a common word, and especially not a common word that is the
default for much SNMP software). The example here is restricted to
127.0.0.1 but it's easy to adapt to something where it's more unsafe
so better not to give the example. ok martijn@

3 years agoDo not read the status MSR before setting performance adjustment mode.
tb [Wed, 11 Aug 2021 18:31:48 +0000 (18:31 +0000)]
Do not read the status MSR before setting performance adjustment mode.
This makes modifying hw.setperf and apmd -A work on robert's laptop.
Previously, it would sometimes be impossible to set hw.setperf to any
value on this machine.

Keep a delay loop that waits for the MSR write to take effect before
setting hw.cpuspeed to the new value since this is apparently needed
for some pre-ryzen processors.

Debugging, initial diff & test by robert

ok brynet

3 years agoMake hw.setperf percentages proportional to the enhanced speed step
tb [Wed, 11 Aug 2021 18:15:50 +0000 (18:15 +0000)]
Make hw.setperf percentages proportional to the enhanced speed step
frequencies on intel processors. This way, the default hw.setperf=99
corresponds to the maximum ordinary speed while setting it to 100
enables turbo mode.

Tested in snaps for a week, positive feedback from several.

3 years agoOn usage for commands without the common flags (mibtree) make sure there's
martijn [Wed, 11 Aug 2021 17:54:19 +0000 (17:54 +0000)]
On usage for commands without the common flags (mibtree) make sure there's
a space between the subcommand and the flags.

OK sthen@

3 years agobackout drm/include/linux/irq_work.h r1.4 and drm/drm_linux.c r1.83
sthen [Wed, 11 Aug 2021 16:14:00 +0000 (16:14 +0000)]
backout drm/include/linux/irq_work.h r1.4 and drm/drm_linux.c r1.83
problems with suspend on various ThinkPad machines seen by me, tb@, deraadt@,
benno@ seem to go away with this reverted.

3 years agoOnly enter the sig_no switch if we actually return from read(2) with
martijn [Wed, 11 Aug 2021 15:13:46 +0000 (15:13 +0000)]
Only enter the sig_no switch if we actually return from read(2) with
errno == EINTR. There was a race here where read(2) can return with a
different errno, but the signal handler enters between the read return and
the switch, which could result in handling a signal, while we should be
handling the error.

This fix assumes that signal handlers don't clobber our errno, but doing
that would open a whole other can of worms.

OK schwarze@, millert@

3 years agoscp: tweak man page and error message for -3 by default
naddy [Wed, 11 Aug 2021 14:07:54 +0000 (14:07 +0000)]
scp: tweak man page and error message for -3 by default

Now that the -3 option is enabled by default, flip the documentation
and error message logic from "requires -3" to "blocked by -R".

ok djm@

3 years agoscp: do not spawn ssh with two -s flags for remote-to-remote copies
naddy [Wed, 11 Aug 2021 14:05:19 +0000 (14:05 +0000)]
scp: do not spawn ssh with two -s flags for remote-to-remote copies

Do not add another "-s" to the argument vector every time an SFTP
connection is initiated.  Instead, introduce a subsystem flag to
do_cmd() and add "-s" when the flag is set.

ok djm@

3 years agoIf the -f argument includes %s, we need to use timegm(3) rather
schwarze [Wed, 11 Aug 2021 13:41:48 +0000 (13:41 +0000)]
If the -f argument includes %s, we need to use timegm(3) rather
than mktime(3) because the UNIX Epoch is defined in UTC rather than
in the local timezone.

Combining %s with other format specifiers is usually not useful.
But if a user does that, then parsing the whole input as UTC seems
better than parsing some of it as UTC and some of it in the local
time zone.

Bug found by Bryan Vyhmeister.
The final patch is joint work with and OK by gerhard@.
No objection when shown on tech@.

3 years agoReturn to applying pane-border-style to the area outside panes, GitHub
nicm [Wed, 11 Aug 2021 09:05:21 +0000 (09:05 +0000)]
Return to applying pane-border-style to the area outside panes, GitHub
issue 2816.

3 years agotest -Oprint-pubkey
djm [Wed, 11 Aug 2021 08:55:04 +0000 (08:55 +0000)]
test -Oprint-pubkey

3 years agowhen verifying sshsig signatures, support an option (-Oprint-pubkey)
djm [Wed, 11 Aug 2021 08:54:17 +0000 (08:54 +0000)]
when verifying sshsig signatures, support an option (-Oprint-pubkey)
to dump the full public key to stdout; based on patch from Fabian
Stelzer; ok markus@

3 years agoMake confirm-before optionally block the invoking client like run-shell,
nicm [Wed, 11 Aug 2021 08:40:58 +0000 (08:40 +0000)]
Make confirm-before optionally block the invoking client like run-shell,
GitHub issue 2819.

3 years agoOSC 52 can be long enough to make tmux think the output buffer is too
nicm [Wed, 11 Aug 2021 07:51:31 +0000 (07:51 +0000)]
OSC 52 can be long enough to make tmux think the output buffer is too
big, so treat it as a redraw. GitHub issue 2814.

3 years agooops, missed one more %p
djm [Wed, 11 Aug 2021 05:21:32 +0000 (05:21 +0000)]
oops, missed one more %p

3 years agoremove a bunch of %p in format strings; leftovers of debuggings
djm [Wed, 11 Aug 2021 05:20:17 +0000 (05:20 +0000)]
remove a bunch of %p in format strings; leftovers of debuggings
past. prompted by Michael Forney, ok dtucker@

3 years agodrm/amd/display: Fix max vstartup calculation for modes with borders
jsg [Wed, 11 Aug 2021 03:15:51 +0000 (03:15 +0000)]
drm/amd/display: Fix max vstartup calculation for modes with borders

From Nicholas Kazlauskas
98b070694f4570908a0e8ea5afb68d81b0aa2051 in linux 5.10.y/5.10.57
d7940911fc0754d99b208f0e3098762d39f403a0 in mainline linux

3 years agodrm/amd/display: Fix comparison error in dcn21 DML
jsg [Wed, 11 Aug 2021 03:12:47 +0000 (03:12 +0000)]
drm/amd/display: Fix comparison error in dcn21 DML

From Victor Lu
f9d875c8c92f1bdaeeb3eeccbf8402974f20cd31 in linux 5.10.y/5.10.57
ec3102dc6b36c692104c4a0546d4119de59a3bc1 in mainline linux

3 years agoRevert "drm/i915: Propagate errors on awaiting already signaled fences"
jsg [Wed, 11 Aug 2021 03:10:43 +0000 (03:10 +0000)]
Revert "drm/i915: Propagate errors on awaiting already signaled fences"

From Jason Ekstrand
118b070bf415eb6c0fa39e5fa1b1ef6b83e80cee in linux 5.10.y/5.10.57
3761baae908a7b5012be08d70fa553cc2eb82305 in mainline linux

3 years agodrm/i915: avoid uninitialised var in eb_parse()
jsg [Wed, 11 Aug 2021 03:08:26 +0000 (03:08 +0000)]
drm/i915: avoid uninitialised var in eb_parse()

The backport of c9d9fdbc108af8915d3f497bbdf3898bf8f321b8 to 5.10 in
6976f3cf34a1a8b791c048bbaa411ebfe48666b1 removed more than it should
have leading to 'batch' being used uninitialised.  The 5.13 backport and
the mainline commit did not remove the portion this patch adds back.

Sent to the linux stable list and queued to be in 5.10.58.

3 years agodrm/i915: Revert "drm/i915/gem: Asynchronous cmdparser"
jsg [Wed, 11 Aug 2021 03:06:57 +0000 (03:06 +0000)]
drm/i915: Revert "drm/i915/gem: Asynchronous cmdparser"

From Jason Ekstrand
6976f3cf34a1a8b791c048bbaa411ebfe48666b1 in linux 5.10.y/5.10.57
c9d9fdbc108af8915d3f497bbdf3898bf8f321b8 in mainline linux

3 years agoRemove unused `ipa_pcb' from 'ipsec_acquire' structure.
mvs [Tue, 10 Aug 2021 21:29:53 +0000 (21:29 +0000)]
Remove unused `ipa_pcb' from 'ipsec_acquire' structure.

ok gnezdo@

3 years agoGo back to using Xwrite() during initialization phase to make
krw [Tue, 10 Aug 2021 18:17:48 +0000 (18:17 +0000)]
Go back to using Xwrite() during initialization phase to make
sure the same verbiage is emitted as previously. i.e. "Writing
MBR at offset 0". Fixes regress complaints.

3 years agoOverlooked a listen_tcp that needed removal in previous commit.
martijn [Tue, 10 Aug 2021 16:14:00 +0000 (16:14 +0000)]
Overlooked a listen_tcp that needed removal in previous commit.
This caused listen on tcp lines to fail to parse.

OK sthen@

3 years agoWhile el_gets(3) and el_wgets(3) wait for user input, no longer ignore
schwarze [Tue, 10 Aug 2021 14:28:10 +0000 (14:28 +0000)]
While el_gets(3) and el_wgets(3) wait for user input, no longer ignore
the first signal received.  No change for SIGCONT and SIGWINCH, but for
other signals, return to the application program and let that program
decide what to do, typically either exit or provide a fresh prompt.

Bug originally reported by deraadt@ regarding behaviour of Ctrl-C
in sftp(1).  With this patch, sftp(1) no longer ignores Ctrl-C but
exists, and the same applies to a few other programs.  Some others
that used to ignore Ctrl-C now provide a fresh prompt instead.
For several, behaviour is unchanged.  At this point, i'm not aware
of a serious regression in any program.

OK deraadt@ martijn@ and no objection from millert@.
Patch also tested by claudio@ with bgplgsh(8).

3 years agoEliminate single use 'error' vars by directly
krw [Tue, 10 Aug 2021 13:48:34 +0000 (13:48 +0000)]
Eliminate single use 'error' vars by directly
testing MBR_read() return value.

No intentional functional change.

3 years agoSupport two-character font names (BI, CW, CR, CB, CI)
schwarze [Tue, 10 Aug 2021 12:36:42 +0000 (12:36 +0000)]
Support two-character font names (BI, CW, CR, CB, CI)
in the tbl(7) layout font modifier.

Get rid of the TBL_CELL_BOLD and TBL_CELL_ITALIC flags and use
the usual ESCAPE_FONT* enum mandoc_esc members from mandoc.h instead,
which simplifies and unifies some code.

While here, also support CB and CI in roff(7) \f escape sequences
and in roff(7) .ft requests for all output modes.  Using those is
certainly not recommended because portability is limited even with
groff, but supporting them makes some existing third-party manual
pages look better, in particular in HTML output mode.

Bug-compatible with groff as far as i'm aware, except that i consider
font names starting with the '\n' (ASCII 0x0a line feed) character
so insane that i decided to not support them.

Missing feature reported by nabijaczleweli dot xyz in
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=992002.
I used none of the code from the initial patch submitted by
nabijaczleweli, but some of their ideas.
Final patch tested by them, too.

3 years agoAdd Tiger Lake LP (INT34C5) support
jcs [Tue, 10 Aug 2021 12:19:06 +0000 (12:19 +0000)]
Add Tiger Lake LP (INT34C5) support

with James Hastings

3 years agoadd file missed in previous
sthen [Tue, 10 Aug 2021 10:02:26 +0000 (10:02 +0000)]
add file missed in previous

3 years agoUpdate to nsd 4.3.7
florian [Tue, 10 Aug 2021 08:21:30 +0000 (08:21 +0000)]
Update to nsd 4.3.7
OK sthen

3 years agoSimplify and be more concise with the listen on flags description.
martijn [Tue, 10 Aug 2021 07:53:57 +0000 (07:53 +0000)]
Simplify and be more concise with the listen on flags description.

Suggested by schwarze@

3 years agoSet the SO_REUSEADDR flag on listening sockets.
martijn [Tue, 10 Aug 2021 06:52:03 +0000 (06:52 +0000)]
Set the SO_REUSEADDR flag on listening sockets.

This way we can have a global listen statement, but add an additional
listener on with different flags on specific interfaces (e.g. allow
snmpv2c on localhost for easier testing)

OK sthen@

3 years agoAllow "any" to be used as a listen on address.
martijn [Tue, 10 Aug 2021 06:49:33 +0000 (06:49 +0000)]
Allow "any" to be used as a listen on address.
This is a convenient shorthand for
listen on 0.0.0.0
listen on ::
and was already the default behaviour if no listen on statement is present.
This way it's easier to add additional listeners to the default (like trap
receivers).

Manpage feedback sthen@ schwarze@
Manpage OK jmc@
OK sthen@

3 years agoFix Encode(3p) loading module from incorrect relative path
afresh1 [Tue, 10 Aug 2021 03:45:30 +0000 (03:45 +0000)]
Fix Encode(3p) loading module from incorrect relative path

This is upstream commit
https://github.com/Perl/perl5/commit/c1a937fef07c061600a0078f4cb53fe9c2136bb9

Quoting upstream:

    Without this fix, Encode::ConfigLocal can be loaded from a path
    relative to the current directory, because the || operator will
    evaluate @inc in scalar context, putting an integer as the only
    value in @inc.

Addresses CVE-2021-36770

3 years agoadapt to scp -M flag change; make scp3.sh test SFTP mode too
djm [Tue, 10 Aug 2021 03:35:45 +0000 (03:35 +0000)]
adapt to scp -M flag change; make scp3.sh test SFTP mode too

3 years agoPrepare for a future where scp(1) uses the SFTP protocol by default.
djm [Tue, 10 Aug 2021 03:33:34 +0000 (03:33 +0000)]
Prepare for a future where scp(1) uses the SFTP protocol by default.
Replace recently added -M option to select the protocol with -O (olde)
and -s (SFTP) flags, and label the -s flag with a clear warning that it
will be removed in the near future (so no, don't use it in scripts!).

prompted by/feedback from deraadt@

3 years agomake scp -3 the default for remote-to-remote copies. It provides a
djm [Mon, 9 Aug 2021 23:56:36 +0000 (23:56 +0000)]
make scp -3 the default for remote-to-remote copies. It provides a
much better and more intuitive user experience and doesn't require
exposing credentials to the source host.

thanks naddy@ for catching the missing argument in usage()

"Yes please!" - markus@
"makes a lot of sense" - deraadt@
"the right thing to do" - dtucker@

3 years agomake scp in SFTP mode try to use relative paths as much as possible.
djm [Mon, 9 Aug 2021 23:49:31 +0000 (23:49 +0000)]
make scp in SFTP mode try to use relative paths as much as possible.
Previosuly, it would try to make relative and ~/-rooted paths absolute
before requesting transfers.

prompted by and much discussion deraadt@
ok markus@

3 years agoSFTP protocol extension to allow the server to expand ~-prefixed
djm [Mon, 9 Aug 2021 23:47:44 +0000 (23:47 +0000)]
SFTP protocol extension to allow the server to expand ~-prefixed
paths, in particular ~user ones. Allows scp in sftp mode to accept
these paths, like scp in rcp mode does.

prompted by and much discussion deraadt@
ok markus@

3 years agowhen scp is in SFTP mode, try to deal better with ~ prefixed
djm [Mon, 9 Aug 2021 23:44:32 +0000 (23:44 +0000)]
when scp is in SFTP mode, try to deal better with ~ prefixed
paths. ~user paths aren't supported, but ~/ paths will be accepted
and prefixed with the SFTP server starting directory (more to come)

prompted by and discussed with deraadt@
ok markus@

3 years agorev 1.25 replaced unsafe code in a sig handler by different but
otto [Mon, 9 Aug 2021 19:13:56 +0000 (19:13 +0000)]
rev 1.25 replaced unsafe code in a sig handler by different but
also unsafe code. Mark that with an XXX comment. Spotted bij schwarze@

3 years agoType-O in previous.
martijn [Mon, 9 Aug 2021 19:13:08 +0000 (19:13 +0000)]
Type-O in previous.
Diff by jmc@, who can't commit right now.

Thanks.

3 years agoAllow setting the engineid.
martijn [Mon, 9 Aug 2021 18:14:53 +0000 (18:14 +0000)]
Allow setting the engineid.

The previous engineid was based aronud the engine boottime and a random
value, which gives problems when sending/receiving unacknowledged PDUs
(trapv2) over SNMPv3 with authentication enabled, which need a consistent
engineid across restarts to determine the correct user from the sender.

The new default engineid takes a sha256 hash (chosen for its longer output)
of gethostname(3) and places the first 27 bytes after the new format number
129. This should give us a very low probability of collisions, assuming
all machines have a unique name.

The other formats as specified in SNMP-FRAMEWORK-MIB (RFC3411) are also
supported as well as arbitrary formats in the range 128-255 for other
private enterprise numbers in hex format.

OK jmatthew@

3 years agoRemove useless code. The driver_data is ignored by the host system.
jan [Mon, 9 Aug 2021 18:13:09 +0000 (18:13 +0000)]
Remove useless code.  The driver_data is ignored by the host system.
Set the pointer to all 1s as linux do.

OK patrick@

3 years agoDuring unidirectional data transmission, a TCP connection may stall.
bluhm [Mon, 9 Aug 2021 17:03:08 +0000 (17:03 +0000)]
During unidirectional data transmission, a TCP connection may stall.
The sending machine is doing zero window probes, but is not sending
any more data although the other machine announced that it has space
again.  The header prediction code did not update snd_wl2.  If there
was a sequence number wrap, the send window update block is not
reached.
Update snd_wl2 when receiving predicted ACKs and and update snd_wl1
and rcv_up for predicted pure data.
from FreeBSD; OK sashan@ claudio@

3 years agofor extraction, deal with created temp file directly:
espie [Mon, 9 Aug 2021 16:41:21 +0000 (16:41 +0000)]
for extraction, deal with created temp file directly:
- don't adjust the file object, just extract_to_fh
- for may_check_digest, explicitly pass the path instead of a file object

3 years agoadd $self->fullname to simplify the cumbersome usual name
espie [Mon, 9 Aug 2021 16:40:20 +0000 (16:40 +0000)]
add $self->fullname to simplify the cumbersome usual name

add $self->extract_to_fh, only for IsFile objects, so that they can be
written to a temporary file without needing to adjust the file object's name

3 years agoFix white spaces.
bluhm [Mon, 9 Aug 2021 16:06:31 +0000 (16:06 +0000)]
Fix white spaces.

3 years agohandle "inet autoconf" in ramdisk, same as /etc/netstart
sthen [Mon, 9 Aug 2021 13:56:17 +0000 (13:56 +0000)]
handle "inet autoconf" in ramdisk, same as /etc/netstart
ok florian deraadt

3 years agominor tweaks to make things clearer
espie [Mon, 9 Aug 2021 13:34:00 +0000 (13:34 +0000)]
minor tweaks to make things clearer
- in both extract and tie, $self has the right file names
- move the possible creation of the directory into find_safe_dir (passing
state as the only parameter, since we have everything else in self), thus
getting rid of an XXX

should have zero effect on anything

3 years agoChange copy-line and copy-end-of-line not to cancel and add -and-cancel
nicm [Mon, 9 Aug 2021 13:08:08 +0000 (13:08 +0000)]
Change copy-line and copy-end-of-line not to cancel and add -and-cancel
variants, like the other copy commands. GitHub issue 2799.

3 years agoIf an error during attach caused us to detach our resources,
kevlo [Mon, 9 Aug 2021 12:59:53 +0000 (12:59 +0000)]
If an error during attach caused us to detach our resources,
don't do anything on shutdown.

This fixes a panic that was reported by me on X1 Extreme Gen 1.

ok ratchov@

3 years agoCheck for URI with userinfo parts (hostname has an @ sign) and fail for
claudio [Mon, 9 Aug 2021 10:30:23 +0000 (10:30 +0000)]
Check for URI with userinfo parts (hostname has an @ sign) and fail for
such URI. The http client in rpki-client does not support http authentication
since it only accesses public websites.
OK jca@ job@