summaryrefslogtreecommitdiff
path: root/usr.bin
AgeCommit message (Collapse)Author
2022-02-16Support more mouse buttons when the terminal sends them, GitHub issueNicholas Marriott
3055.
2022-02-15Add an option (default off) to control the passthrough escape sequence.Nicholas Marriott
Like set-clipboard and allow-rename it is safer to forbid this by default.
2022-02-15Do not create a buffer from an OSC 52 response if we have not sent aNicholas Marriott
query.
2022-02-15unifdef CDIOCCLOSE __OpenBSD__Jonathan Gray
2022-02-15document the unbound/host-bound options to PubkeyAuthentication;Damien Miller
spotted by HARUYAMA Seigo
2022-02-14Do not return error with -q, GitHub issue 3065.Nicholas Marriott
2022-02-11tr(1): rename lookup tablesScott Soule Cheloha
The lookup tables in tr(1) are called "string1" and "string2". This is misleading: - They aren't C strings, they are lookup tables. - The names "string1" and "string2" don't hint at what their contents actually mean. The meaning of a given table changes with tr(1)'s operating mode. There are five different modes. It would be considerably easier to see what is happening at a glance if the tables were named for their corresponding byte transformation. So instead of two tables named "string1" and "string2" we'll have three tables named "delete", "squeeze", and "translate". In addition, the "string" passed to the setup() function will be called a "table". With this patch the code in main() is way easier to understand. Hopefully this makes subsequent patches easier to review. Thread: https://marc.info/?l=openbsd-tech&m=164355980600901&w=2 No complaints on tech@ after over a week.
2022-02-11Always initialize delim before passing to hpdelim2 which might not set it.Darren Tucker
Found by the Valgrind tests on github, ok deraadt@
2022-02-10Casting a char pointer to struct ctf_header causes bus error onAlexander Bluhm
sparc64. Use memcpy() to align the data. found by regress/usr.bin/ctfdump; OK mpi@
2022-02-10look(1): use a stricter pledge(2) in lieu of unveil(2)Scott Soule Cheloha
We're only reading one file here, so unveil(2) is overkill. We can achieve the same effect with just pledge(2): - Start with an initial pledge(2) of "stdio rpath" at the top of main(). We know we need to read a file at this point but don't yet know which one. - Drop the pledge(2) down to "stdio" after we open(2) and fstat(2) the chosen file. - Dropping "rpath" obviates unveil(2). Thread: https://marc.info/?l=openbsd-tech&m=164437072017248&w=2 ok millert@
2022-02-10unveil _PATH_LOGIN_CONF_DRobert Nagy
2022-02-10revert for imminent OpenSSH release, which wil ship with scp in RCP mode.Damien Miller
> revision 1.106 > date: 2021/10/15 14:46:46; author: deraadt; state: Exp; lines: +13 -9; commitid: w5n9B2RE38tFfggl; > openbsd 7.0 release shipped with the (hopefully last) scp that uses RCP > protocol for copying. Let's get back to testing the SFTP protocol. This will be put back once the OpenSSH release is done.
2022-02-09Fix the -f option when passed multiple files.Todd C. Miller
Found by robert@
2022-02-08In the first example, use "mandoc -a" directly rather "mandoc -l".Ingo Schwarze
It feels more natural to me to use -a directly when asking mandoc(1) to use a pager. The reason that "mandoc -l" does exactly the same as "mandoc -a" is that "mandoc" is essentially "man -lc", so the -a implied by -l negates the -c and the -l has no effect because it is already the default for mandoc(1). The more usual command for doing the same is "man -l foo.1 bar.1 ..." but that's off-topic for the mandoc(1) manual page. Patch on tech@ from Anders Damsgaard <anders at adamsgaard dot dk>.
2022-02-08rev(1): drop "rpath" promise in no-file branch.Scott Soule Cheloha
We don't need "rpath" if we're only processing the standard input. Thread: https://marc.info/?l=openbsd-tech&m=164433848419371&w=2 ok deraadt@ millert@
2022-02-08Switch hpdelim interface to accept only ":" as delimiter.Darren Tucker
Historicallly, hpdelim accepted ":" or "/" as a port delimiter between hosts (or addresses) and ports. These days most of the uses for "/" are no longer accepted, so there are several places where it checks the delimiter to disallow it. Make hpdelim accept only ":" and use hpdelim2 in the other cases. ok djm@
2022-02-07head(1): check for stdio errorsScott Soule Cheloha
- Output errors are terminal. - Input errors yield a warning and cause head(1) to fail gracefully. Tweaked by millert@. Thread: https://marc.info/?l=openbsd-tech&m=164419238123928&w=2 ok millert@
2022-02-07use libfido2 1.8.0+ fido_assert_set_clientdata() instead of manuallyDamien Miller
hashing data outselves. Saves a fair bit of code and makes life easier for some -portable platforms.
2022-02-06remove please from manual pagesJonathan Gray
ok jmc@ sthen@ millert@
2022-02-04Use ACS for pane border indicators so they work with different lineNicholas Marriott
types, from Thomas Adam.
2022-02-04Since they are deprecated, move DSA to the end of the default list ofDarren Tucker
public keys so that they will be tried last. From github PR#295 from "ProBackup-nl", ok djm@
2022-02-03Unindent and unwrap lines. Pull up a NULL check. No functional change.Theo Buehler
2022-02-03Remove commented variable declarationsTheo Buehler
2022-02-03Use X509_*get0_pubkey() wherever possible to simplify and clean upTheo Buehler
the code. Also add error checking where possible. ok jsing
2022-02-03Remove some stale comments.Theo Buehler
ok jsing
2022-02-03Adjust size given to resize-pane for pane status line, GitHub issueNicholas Marriott
3050.
2022-02-03Use format_draw for command prompt prefix to allow styles, GitHub issueNicholas Marriott
3054.
2022-02-03Update focus when active pane changes after pane destroyed.Nicholas Marriott
2022-02-03Add a key in copy mode to toggle position indicator.Nicholas Marriott
2022-02-01allow 'ssh-keygen -Y find-principals' to match wildcard principalsDamien Miller
in allowed_signers files; from Fabian Stelzer
2022-02-01mark const string array contents const too, i.e.Damien Miller
static const char *array => static const char * const array from Mike Frysinger
2022-02-01better match legacy scp behaviour: show un-expanded paths in errorDamien Miller
messages. Spotted by and ok tb@
2022-02-01A menu must be shown on a client, so always give the client when addingNicholas Marriott
the items. Also fix mode menus.
2022-02-01Add option to show arrows for active pane indicator, GitHub issue 3022Nicholas Marriott
from Marcel Partap.
2022-02-01Mention that if-shell and #() use /bin/sh.Nicholas Marriott
2022-02-01Do not overflow width when not enough space.Nicholas Marriott
2022-02-01Remove explicit kill of privsep preauth child's PID in SIGALRM handler.Darren Tucker
It's no longer needed since the child will get terminated by the SIGTERM to the process group that cleans up any auth helpers, it simplifies the signal handler and removes the risk of a race when updating the PID. Based on analysis by HerrSpace in github PR#289, ok djm@
2022-01-29head(1): refactor main loopScott Soule Cheloha
The main loop here is horribly obfuscated. In particular, the path through the loop to exit(3) is very complex. Refactor the open/read/write/close portions of the loop out of main() into a separate function, head_file(). The result is a lot easier to understand at a glance. In particular, the path to the end of main() is now dead simple. Thread: https://marc.info/?l=openbsd-tech&m=164325900400701&w=2 ok millert@
2022-01-29rev(1): refactor main loopScott Soule Cheloha
The main loop here is obfuscated. Refactor the open/read/write/close portion of the loop out of main () and into a new function, rev_file(). Move "multibyte" out into global storage. The result is much easier to understand at a glance. Thread: https://marc.info/?l=openbsd-tech&m=164329515201417&w=2 ok millert@
2022-01-29touch(1): don't leak file descriptor if futimens(2) failsScott Soule Cheloha
This conditional chain short-circuits if futimens(2) fails, leaving the file descriptor open. We need to evaluate each system call in the chain separately to ensure we attempt to close(2) the descriptor. With input from guenther@ and millert@. Thread: https://marc.info/?l=openbsd-tech&m=164332809900558&w=2 ok millert@, probably ok guenther@
2022-01-28When it's the possessive of 'it', it's spelled "its", without thePhilip Guenther
apostrophe.
2022-01-27Update awk to Dec 8, 2021 version.Todd C. Miller
Fixes error handling in closefile() and closeall(). Long standing warnings had been made fatal and some fatal errors went undetected.
2022-01-22add a ssh_packet_process_read() function that reads from a fdDamien Miller
directly into the transport input buffer. Use this in the client and server mainloops to avoid unnecessary copying. It also lets us use a more greedy read size without penalty. Yields a 2-3% performance gain on cipher-speed.sh (in a fairly unscientific test tbf) feedback dtucker@ ok markus@
2022-01-22Use sshbuf_read() to read directly into the channel input bufferDamien Miller
rather than into a stack buffer that needs to be copied again; Improves performance by about 1% on cipher-speed.sh feedback dtucker@ ok markus@
2022-01-22Add a sshbuf_read() that attempts to read(2) directly in to aDamien Miller
sshbuf; ok markus@
2022-01-21add a helper for writing an error message to the stderr_buf and settingDamien Miller
quit_pending; no functional change but saves a bunch of boilerplate
2022-01-21correct comment and use local variable instead of long indirection;Damien Miller
spotted by dtucker@
2022-01-21When poll(2) returns -1, for some error conditions pfd[].revents isTheo de Raadt
not cleared. There are subtle errors in various programs. In this particular case, the program should error out. ok djm millert
2022-01-20mg: fix -Wunused-but-set-variable warningsChristian Weisgerber
strtonum() is only called to verify that a string is numerical, the return value is unused. inlist is no longer used after the code was refactored. ok millert@ guenther@
2022-01-17when decompressing zlib compressed packets, use Z_SYNC_FLUSH insteadDamien Miller
of Z_PARTIAL_FLUSH as the latter is not actually specified as a valid mode for inflate(). There should be no practical change in behaviour as the compression side ensures a flush that should make all data available to the receiver in all cases. repoted by lamm AT ibm.com via bz3372; ok markus