openbsd
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@

3 years agoUnifdef read__fixio() to make it readable.
schwarze [Mon, 9 Aug 2021 09:11:26 +0000 (09:11 +0000)]
Unifdef read__fixio() to make it readable.
Also, no need to clear O_NDELAY with fcntl(F_SETFL)
when ioctl(FIONBIO) is called right afterwards.
No functional change intended.
OK martijn@

3 years agoMake it possible to match on path-id in bgpctl show rib outputs.
claudio [Mon, 9 Aug 2021 08:24:36 +0000 (08:24 +0000)]
Make it possible to match on path-id in bgpctl show rib outputs.
To work properly also a neighbor needs to be selected. The assumption
here is that the peer will use the same path-id for the same peer
accross all its routes. The RFC does not require this and it is valid
to assign path-ids randomly. The path-id only matters for one specific
path but most BGP implementations seem to assign the same path-id to
multiple routes when originated from the same source.
OK benno@

3 years agoImplement reception of multiple paths per BGP session. This is one
claudio [Mon, 9 Aug 2021 08:15:34 +0000 (08:15 +0000)]
Implement reception of multiple paths per BGP session. This is one
side of RFC7911 and the send portion will follow.

The path-id is extracted from the NLRI encoding an put into struct
prefix.  To do this the prefix_by_peer() function gets a path-id
argument.  If a session is not path-id enabled this argument will
be always 0. If a session is path-id enabled the value is taken
from the NLRI and can be anything, including 0. The value has no
meaning in itself. Still to make sure the decision process is able
to break a tie the path-id is checked as the last step (this is not
part of the RFC but required).

OK benno@

3 years agoFix up flags passed to usbd_open_pipe_intr() - interrupt pipes are always
jmatthew [Mon, 9 Aug 2021 07:21:48 +0000 (07:21 +0000)]
Fix up flags passed to usbd_open_pipe_intr() - interrupt pipes are always
opened exclusively, and the flags argument is passed to usbd_setup_xfer().
USBD_EXCLUSIVE_USE has the same value as USBD_NO_COPY, which means that
data transferred would not be copied to the buffer where the driver expects
it.

None of these drivers actually used the interrupt data for anything, and
in some the interrupt pipe code was #if 0'd out, so this doesn't change
anything, but fixing this up prevents unwary developers like me from
copying code that doesn't work.

ok mglocker@

3 years agoon fatal errors, make scp wait for ssh connection before exiting
djm [Mon, 9 Aug 2021 07:21:01 +0000 (07:21 +0000)]
on fatal errors, make scp wait for ssh connection before exiting
avoids LogLevel=verbose (or greater) messages from ssh appearing
after scp has returned exited and control has returned to the
shell; ok markus@

(this was originally committed as r1.223 along with unrelated stuff that
I rolled back in r1.224)

3 years agorever r1.223 - I accidentally committed unrelated changes
djm [Mon, 9 Aug 2021 07:19:12 +0000 (07:19 +0000)]
rever r1.223 - I accidentally committed unrelated changes

3 years agoshow only the final path component in the progress meter;
djm [Mon, 9 Aug 2021 07:16:09 +0000 (07:16 +0000)]
show only the final path component in the progress meter;
more useful with long paths (that may truncate) and better
matches traditional scp behaviour; spotted by naddy@
ok deraadt@

3 years agoon fatal errors, make scp wait for ssh connection before exiting
djm [Mon, 9 Aug 2021 07:13:54 +0000 (07:13 +0000)]
on fatal errors, make scp wait for ssh connection before exiting
avoids LogLevel=verbose (or greater) messages from ssh appearing
after scp has returned exited and control has returned to the
shell; ok markus@

3 years agodocument the defaults for the locate.updatedb(8) command line options
schwarze [Sun, 8 Aug 2021 17:48:25 +0000 (17:48 +0000)]
document the defaults for the locate.updatedb(8) command line options
and make it clear that the config file *modifies* the defaults rather
than *control* them, and that having a config file is optional;
tweak and OK jmc@, OK tim@

3 years agoUse the correct address offset on OpRegion 2.1+ devices to be able
jcs [Sun, 8 Aug 2021 14:45:16 +0000 (14:45 +0000)]
Use the correct address offset on OpRegion 2.1+ devices to be able
to find the VBT

ok jsg

3 years agoRework examples/snmpd.conf; show more things that people are likely to
sthen [Sun, 8 Aug 2021 13:43:10 +0000 (13:43 +0000)]
Rework examples/snmpd.conf; show more things that people are likely to
actually need, and fewer things that they won't need. In particular don't
rely on default auth/enc settings; SNMPv3 isn't algorithm-agile, it must
be defined on both ends, so relying on a default is going to cause some
problems if it ever does change.

3 years agoSwitch default snmpd and snmp auth back to hmac-sha1.
sthen [Sun, 8 Aug 2021 13:41:26 +0000 (13:41 +0000)]
Switch default snmpd and snmp auth back to hmac-sha1.

Practical experience on several machines after updates suggests the snmp
world isn't really ready for hmac-sha2-256, and the HMAC construction doesn't
require collision resistance (which is the weakness of MD5/SHA1; see e.g.
"New proofs for NMAC and HMAC: Security without collision-resistance",
Bellare 2014).

Feedback from martijn@ (who would prefer to keep using the sha2 hmac),
deraadt@, tb@.

3 years agomention that "system services" value is in decimal. ok martijn@
sthen [Sun, 8 Aug 2021 13:28:06 +0000 (13:28 +0000)]
mention that "system services" value is in decimal. ok martijn@

3 years agoxstrdup environment variable used by ForwardAgent. bz#3328 from
dtucker [Sun, 8 Aug 2021 08:49:09 +0000 (08:49 +0000)]
xstrdup environment variable used by ForwardAgent.  bz#3328 from
goetze at dovetail.com, ok djm@ deraadt@

3 years agoAlthough it's POSIX, not all shells used in Portable support the
dtucker [Sun, 8 Aug 2021 08:27:28 +0000 (08:27 +0000)]
Although it's POSIX, not all shells used in Portable support the
implicit 'in "$@"' after 'for i'.

3 years agoMove setting of USER further down the startup In portable we have to
dtucker [Sun, 8 Aug 2021 07:27:52 +0000 (07:27 +0000)]
Move setting of USER further down the startup   In portable we have to
change this and having it in the same hunk as the CVS Id string means
applying changes fails every. single. time.

3 years agoDrop -q in ssh-log-wrapper.sh to preserve logs.
dtucker [Sun, 8 Aug 2021 06:38:33 +0000 (06:38 +0000)]
Drop -q in ssh-log-wrapper.sh to preserve logs.

scp and sftp like to add -q to the command line passed to ssh which
overrides the LogLevel we set in the config files and suppresses output
to the debug logs so drop any "-q" from the invoked ssh.  In the one
case where we actually want to use -q in the banner test, call the ssh
binary directly bypassing the logging wrapper.

3 years agosync
deraadt [Sun, 8 Aug 2021 02:22:37 +0000 (02:22 +0000)]
sync

3 years agostyle(9) says sort getopt() options and the following switch {}
krw [Sat, 7 Aug 2021 17:48:31 +0000 (17:48 +0000)]
style(9) says sort getopt() options and the following switch {}
cases. Make it so.

In passing nuke a single use 'error' variable and move an *errstr
declaration nearer to its friends.

No intentional functional change.

3 years agoNuke a few Capt. Obvious comments.
krw [Sat, 7 Aug 2021 13:37:50 +0000 (13:37 +0000)]
Nuke a few Capt. Obvious comments.

3 years agoNuke unneeded #include's, one param.h -> types.h.
krw [Sat, 7 Aug 2021 13:33:12 +0000 (13:33 +0000)]
Nuke unneeded #include's, one param.h -> types.h.

3 years agoNuke 'p' that r1.97 snuck into getopt() invocation back in 2015.
krw [Sat, 7 Aug 2021 12:57:48 +0000 (12:57 +0000)]
Nuke 'p' that r1.97 snuck into getopt() invocation back in 2015.

3 years agoComment typo 'mmbr' -> 'mbr'.
krw [Sat, 7 Aug 2021 12:51:30 +0000 (12:51 +0000)]
Comment typo 'mmbr' -> 'mbr'.

3 years agoBugfix:
schwarze [Sat, 7 Aug 2021 12:41:51 +0000 (12:41 +0000)]
Bugfix:
Delete ugly and incorrect workaround for a Linux kernel bug.
If a file is temporarily empty, that by no means implies
it might be permanently non-seekable.

Patch from seL4 at disroot dot org on tech@.
OK both Theos: tb@ and deraadt@

3 years agofix the totally wrong markup in the SYNOPSIS
schwarze [Sat, 7 Aug 2021 11:23:07 +0000 (11:23 +0000)]
fix the totally wrong markup in the SYNOPSIS
and add the missing .Xr to weekly(8);
no text change

3 years agodocument the configuration file - as usual, after the options list;
schwarze [Sat, 7 Aug 2021 11:08:38 +0000 (11:08 +0000)]
document the configuration file - as usual, after the options list;
i wrote this diff more than a year ago, then forgot it
even though millert@ and jung@ OK'ed it back then

3 years agoRemove another unused DMA allocation from iwx(4).
stsp [Sat, 7 Aug 2021 09:21:51 +0000 (09:21 +0000)]
Remove another unused DMA allocation from iwx(4).

This driver does not need to allocate a DMA segment for the Tx scheduler.
Instead this driver uses the scheduler byte count array which is allocated
per Tx ring. Remove sc->sched_dma and related code inherited from iwm(4).

Patch by zxystd from OpenIntelWireless.

3 years agoGo to REBOOTING state when interface config changed on reload.
florian [Sat, 7 Aug 2021 07:07:44 +0000 (07:07 +0000)]
Go to REBOOTING state when interface config changed on reload.

This tries to reaquire the current lease and if that failes will send
a DHCPDISCOVER message to request any lease.

OK benno

3 years agouse taskq_del_barrier() instead of taskq_barrier() when flushing work
jsg [Sat, 7 Aug 2021 06:23:34 +0000 (06:23 +0000)]
use taskq_del_barrier() instead of taskq_barrier() when flushing work

prompted by jcs@ reporting a protection fault trap in
drm_mode_rmfb_work_fn() while playing a youtube video in firefox on a
kaby lake machine.  He later saw the same trace on tiger lake.

The arguments to drm_mode_rmfb_work_fn() are on the stack in
drm_mode_rmfb() with flush_work() called before return.

taskq_barrier() is only a barrier for running not queued tasks.

I suspect the linux functions expect any previously queued work to
complete not just any currently running work.  I'm not sure if the
difference matters in practice.

3 years agosync
deraadt [Sat, 7 Aug 2021 04:03:27 +0000 (04:03 +0000)]
sync

3 years agoFix prototype mismatch for do_cmd. ok djm@
dtucker [Sat, 7 Aug 2021 01:57:08 +0000 (01:57 +0000)]
Fix prototype mismatch for do_cmd.  ok djm@

3 years agosftp-client.c needs poll.h
djm [Sat, 7 Aug 2021 01:55:01 +0000 (01:55 +0000)]
sftp-client.c needs poll.h

remove unused variable

3 years agodo_upload() used a near-identical structure for tracking
djm [Sat, 7 Aug 2021 00:14:17 +0000 (00:14 +0000)]
do_upload() used a near-identical structure for tracking
expected status replies from the server to what do_download()
was using.

Refactor it to use the same structure and factor out some common
code into helper functions.

3 years agomake scp(1) in SFTP mode follow symlinks like traditional scp(1)
djm [Sat, 7 Aug 2021 00:12:09 +0000 (00:12 +0000)]
make scp(1) in SFTP mode follow symlinks like traditional scp(1)
ok markus@

3 years agofix incorrect directory permissions on scp -3 transfers;
djm [Sat, 7 Aug 2021 00:10:49 +0000 (00:10 +0000)]
fix incorrect directory permissions on scp -3 transfers;
ok markus@

3 years agoa bit more debugging of file attributes being sent/received
djm [Sat, 7 Aug 2021 00:09:57 +0000 (00:09 +0000)]
a bit more debugging of file attributes being sent/received
over the wire

3 years agomake scp(1) in SFTP mode output better match original scp(1) by
djm [Sat, 7 Aug 2021 00:08:52 +0000 (00:08 +0000)]
make scp(1) in SFTP mode output better match original scp(1) by
suppressing "Retrieving [path]" lines that were emitted to support
the interactive sftp(1) client. ok markus@

3 years agofactor out a structure duplicated between downloading and
djm [Sat, 7 Aug 2021 00:07:18 +0000 (00:07 +0000)]
factor out a structure duplicated between downloading and
crossloading; ok markus@

3 years agouse sftp_client crossloading to implement scp -3
djm [Sat, 7 Aug 2021 00:06:30 +0000 (00:06 +0000)]
use sftp_client crossloading to implement scp -3

feedback/ok markus@

3 years agosupport for "cross"-loading files/directories, i.e. downloading
djm [Sat, 7 Aug 2021 00:02:41 +0000 (00:02 +0000)]
support for "cross"-loading files/directories, i.e. downloading
from one SFTP server while simultaneously uploading to another.

feedback & ok markus@

3 years agofactor our SSH2_FXP_OPEN calls into their own function;
djm [Sat, 7 Aug 2021 00:01:29 +0000 (00:01 +0000)]
factor our SSH2_FXP_OPEN calls into their own function;
"looks fine" markus@

3 years agoprepare for scp -3 implemented via sftp
djm [Sat, 7 Aug 2021 00:00:33 +0000 (00:00 +0000)]
prepare for scp -3 implemented via sftp

3 years agolink X509_STORE_get_by_subject(3) and X509_ocspid_print(3) to the build,
schwarze [Fri, 6 Aug 2021 21:50:54 +0000 (21:50 +0000)]
link X509_STORE_get_by_subject(3) and X509_ocspid_print(3) to the build,
forgotten in earlier commits

3 years agonew manual page X509_ocspid_print(3)
schwarze [Fri, 6 Aug 2021 21:45:55 +0000 (21:45 +0000)]
new manual page X509_ocspid_print(3)
using input from tb@, and OK tb@ on an earlier version

3 years agos/updatedb(8)/locate.updatedb(8)/ in comment
tim [Fri, 6 Aug 2021 19:14:55 +0000 (19:14 +0000)]
s/updatedb(8)/locate.updatedb(8)/ in comment

OK schwarze@

3 years agoadd a roff(7) comment marking the API function X509_get_default_private_dir()
schwarze [Fri, 6 Aug 2021 19:09:56 +0000 (19:09 +0000)]
add a roff(7) comment marking the API function X509_get_default_private_dir()
as intentionally undocumented because it is trivial and unused in the wild;
OK tb@

3 years agoMark matching reportIDs as claimed.
abieber [Fri, 6 Aug 2021 17:46:45 +0000 (17:46 +0000)]
Mark matching reportIDs as claimed.

This fixes a panic that was reported on misc@ and bugs@ by
Mike <the.lists () mgm51 ! com> and
Anindya Mukherjee <anindya49 () hotmail ! com>

OK jcs@, thanks to mpi@/jcs@ for the pointers!

3 years agoCleanup, clarify and generally polish the MBR/GPT initialization
krw [Fri, 6 Aug 2021 10:41:31 +0000 (10:41 +0000)]
Cleanup, clarify and generally polish the MBR/GPT initialization
code.

'-g' is promoted to be independant of '-i'. This makes it clearer
that there are four mutually exclusive initialization options.

'-i' puts the default MBR on disk, '-g' puts the default GPT on
disk, '-u' updates the MBR boot code on disk and '-A' puts a new
set of GPT partitions on disk without overwriting 'protected'
partitions.

The last initialization option specified is the one executed, so
existing '-i -g' finger memory, etc. continue to work as before.

man page/usage feedback/tweaks from jmc@

3 years agoAdd basic support for zero width joiners, GitHub issues 1605 and 2784.
nicm [Fri, 6 Aug 2021 09:34:09 +0000 (09:34 +0000)]
Add basic support for zero width joiners, GitHub issues 1605 and 2784.

3 years agoAdd client focus hooks.
nicm [Fri, 6 Aug 2021 09:19:02 +0000 (09:19 +0000)]
Add client focus hooks.