summaryrefslogtreecommitdiff
path: root/usr.bin
AgeCommit message (Collapse)Author
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
2022-01-17make most of the sftp errors more idiomatic, following the general formDamien Miller
of "[local/remote] operation path: error message"; ok markus
2022-01-17when transferring multiple files in SFTP mode, create the destinationDamien Miller
directory if it doesn't already exist to match olde-scp(1) behaviour. noticed by deraadt@ ok markus@
2022-01-17dig: fix -Wunused-but-set-variable warningsChristian Weisgerber
with and ok florian@
2022-01-17Do not try to strdup NULL, from seL4 at disroot dot org in GitHub issueNicholas Marriott
3038.
2022-01-16Avoid memory leak in error path with openssl(1) smimeKinichiro Inoguchi
CID 345316 ok tb@
2022-01-16Avoid memory leak in error path with openssl(1) cmsKinichiro Inoguchi
CID 345314 345320 ok tb@
2022-01-14Enable openssl pkey -{,pub}check and pkeyparam -checkTheo Buehler
2022-01-14openssl(1) dgst: fix build after clones removalTheo Buehler
ok inoguchi jsing
2022-01-14Convert openssl(1) speed for opaque EVP_AEAD_CTXTheo Buehler
ok inoguchi jsing
2022-01-14Convert openssl(1) rsa.c for opaque RSATheo Buehler
ok inoguchi jsing
2022-01-14openssl(1) genrsa: simplify access to rsa->eTheo Buehler
ok inoguchi jsing
2022-01-14Convert openssl(1) gendsa.c to opaque DSATheo Buehler
ok inoguchi jsing
2022-01-14Convert openssl(1) dsaparam to opaque dsaTheo Buehler
ok inoguchi jsing
2022-01-14Convert openssl(1) dsa.c to opaque DSATheo Buehler
ok inoguchi jsing
2022-01-14Convert openssl(1) dhparam to opaque DHTheo Buehler
ok inoguchi jsing
2022-01-14Convert openssl(1) dh.c to opaque DHTheo Buehler
ok inoguchi jsing
2022-01-14allow pin-required FIDO keys to be added to ssh-agent(1).Damien Miller
ssh-askpass will be used to request the PIN at authentication time. From Pedro Martelletto, ok djm
2022-01-14ssh-sk: free a resident key's user idDamien Miller
From Pedro Martelletto; ok dtucker & me
2022-01-14sshsk_load_resident: don't preallocate respDamien Miller
resp is allocated by client_converse(), at which point we lose the original pointer. From Pedro Martelletto; ok dtucker & me
2022-01-14sshsk_sign: trim call to sshkey_fingerprint()Damien Miller
the resulting fingerprint doesn't appear to be used for anything, and we end up leaking it. from Pedro Martelletto; ok dtucker & me
2022-01-14use status error message to communicate ~user expansion failures;Damien Miller
provides better experience for scp in sftp mode, where ~user paths are more likely to be used; spotted jsg, feedback jsg & deraadt ok jsg & markus (forgot to include this file in previous commit)
2022-01-13Tedu support for the -xsh4.2 argument to the mdoc(7) .St macroIngo Schwarze
because all of the following hold: * It is an alias for a part of an ancient standard that is no longer important. * To refer to that old standard, -xpg4.2 is readily available and portable. * It is unused in OpenBSD, FreeBSD, and NetBSD. * Groff never supported it. I agreed with G. Branden Robinson that deleting this from mandoc is preferable to adding it to groff.
2022-01-13Calling MB_CUR_MAX is much more expensive than incrementing a pointerIngo Schwarze
and than testing and printing a byte, so do it once up front rather than inside the inner loop. This speeds up rev(1) by about a factor of three for typical use cases. Performance issue found by cheloha@, but my fix is a bit simpler and more rigorous than Scott's original patch. While here, also add the missing handling for write errors (making them fatal, whereas read errors remain non-fatal and proceed to the next input file) and also avoid testing each byte twice, making the code more straightforward and more readable. In part using ideas from millert@ and martijn@. OK martijn@.
2022-01-13Only sort the result array if it contains more than one element,Ingo Schwarze
making the mansearch() function easier to read for human auditors. No functional change on OpenBSD. As observed by Mark Millard <marklmi at yahoo dot com>, neither the latest version of POSIX 2008 nor C11 defines what qsort(3) should do for base == NULL && nmemb == 0. My impression is it is indeed undefined behaviour because the standards say that base shall point to an array, NULL does not point to an array, and while there is special wording saying that compar() shall not be called if nmemb == 0, i fail to see any similar wording stating that base shall not be accessed if nmemb == 0. Consequently, this patch is also likely to improve standard conformance and portability. Minor issue found by Stefan Esser <se at FreeBSD> with UBSAN. He sent a patch to bugs@, but my patch differs in a minor way.
2022-01-12zap some stray whitespaceTheo Buehler
2022-01-12seperators -> separatorsTheo Buehler
2022-01-12zap spaces before tabsTheo Buehler
2022-01-12Make lputs use psl instead of expecting it to be null-terminated.Martijn van Duren
This allows us to enable the commandl1 and commandl2 regress tests. Original analysis from seL4 <at> disroot <dot> org OK millert@
2022-01-12More accurately represent cells containing horizontal lines in -T treeIngo Schwarze
output. In particular, do not represent "_" as "-", and distinguish "_" from "\_" and "=" from "\=". Output tweak following a related question from Ted Bullock <tbullock at comlore dot com>.
2022-01-12According to the tbl(7) manual, if a data cell contains only theIngo Schwarze
two character sequence "\_" or "\=", a single or double horizontal line is supposed to be drawn inside the cell, not joining its neighbours. I am not aware of any way to do that with HTML and/or CSS. Still, it seems closer to the intent of the document author to draw a horizontal line with <hr/>, even though that line will join the neighbour cells, rather than printing a literal '_' or '=' character. Formatting tweak inspired by a related question from Ted Bullock <tbullock at comlore dot com>.
2022-01-12Don't log NULL hostname in restricted agent code, printf("%s", NULL) isDarren Tucker
not safe on all platforms. with & ok djm
2022-01-11Wrap long linesKinichiro Inoguchi
2022-01-11Check function return valueKinichiro Inoguchi
2022-01-11Suppress warningKinichiro Inoguchi
2022-01-11Compare pointer variable with NULLKinichiro Inoguchi
2022-01-11Remove space between '*' and pointer variable.Kinichiro Inoguchi
2022-01-11Convert openssl(1) smime option handlingKinichiro Inoguchi
Apply new option handling to openssl(1) smime and no functional changes. input and ok jsing@
2022-01-11"void" functions should not return anything. From Tim Rice via -portable.Darren Tucker
2022-01-11suppress "Connection to xxx closed" messages at LogLevel >= errorDamien Miller
bz3378; ok dtucker@
2022-01-10Unbreak tree. Sorry about that.Theo Buehler
2022-01-10When rendering the \h (horizontal motion) low-level roff(7) escapeIngo Schwarze
sequence in -T ps and -T pdf output mode, use an appropriate horizontal distance by correctly using the term_len() utility function. Output from the -T ascii, -T utf8, and -T html modes was already correct and remains unchanged. Lennart Jablonka <hummsmith42 at gmail dot com> found and reported this unit conversion bug (misinterpreting AFM units as if they were en units) when rendering scdoc-generated manuals (which is a low quality generator, but that's no excuse for mandoc misformatting \h) on Alpine Linux. Lennart also tested this patch.
2022-01-10NULL out pointers after transferring them to the DSA object.Theo Buehler