summaryrefslogtreecommitdiffstats
path: root/usr.bin (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* In slot_xxx(), store dev pointer in local variableratchov2021-01-281-16/+9
| | | | | | This removes many redundant dereferences to obtain the dev pointer from the slot stucture and makes the source slightly more readable. No behavior change.
* Use everywhere the same pattern to handle fractional clock ticksratchov2021-01-281-3/+9
| | | | | No behavior change; this change is only to make the maths easier to proofread
* Make slot_{attach,detach}() the opposite of each otherratchov2021-01-281-16/+56
| | | | | | | No bahavior change. Now, slot_attach() moves slot's clock forward and puts the slot on device list; slot_detach() does the opposite: remove from device list and move clock backwards. This will allow to detach a client and attach it later in exactly the same state.
* Drop unused dev_nctl() function and few unused prototypesratchov2021-01-282-19/+5
|
* fix leak: was double allocating kex->session_id bufferdjm2021-01-271-4/+6
|
* update comment, SMALL was split into SMALL and NOSSLsthen2021-01-271-2/+3
|
* Promote nrules/maxrules to size_t and make sure they can't overflow.millert2021-01-273-13/+14
| | | | | reallocarray(3) will fail if nmemb * size would overflow. OK tb@ martijn@
* Flush pending output before entering or exiting alternate screen rathernicm2021-01-271-1/+5
| | | | than leaking it, oss-fuzz issue 29959.
* this needs kex.h nowdjm2021-01-271-1/+2
|
* make ssh->kex->session_id a sshbuf instead of u_char*/size_t anddjm2021-01-2715-103/+80
| | | | | use that instead of global variables containing copies of it. feedback/ok markus@
* remove global variable used to stash compat flags and use thedjm2021-01-2714-73/+70
| | | | purpose-built ssh->compat variable instead; feedback/ok markus@
* fix -fno-common issues; ok mortimerderaadt2021-01-272-44/+81
|
* fix -fno-common issues; ok mortimerderaadt2021-01-273-9/+11
|
* Logical not bitwise or. ok djm@dtucker2021-01-271-2/+2
|
* satisfy -fno-common, by (1) copying all the variable decls fromderaadt2021-01-262-29/+58
| | | | | | indent_globs.h to indent.c, and (2) changing all the same decls in indent_globs.h to be extern ok mortimer
* sockb variable is unused (and even worse, was common unused)deraadt2021-01-262-5/+2
|
* satisfy -fno-common, by (1) copying all the variable decls fromderaadt2021-01-262-42/+94
| | | | | | indent_globs.h to indent.c, and (2) changing all the same decls in indent_globs.h to be extern ok mortimer
* satisfy -fno-common, by (1) copying all the variable decls fromderaadt2021-01-262-67/+191
| | | | | | indent_globs.h to indent.c, and (2) changing all the same decls in indent_globs.h to be extern ok mortimer
* satisfy -fno-common by repairing one enum declderaadt2021-01-262-3/+5
| | | | ok mortimer
* move HostbasedAcceptedAlgorithms to the right place in alphabetical ordernaddy2021-01-264-15/+15
|
* Remove unused variables leftover from refactoring. ok djm@dtucker2021-01-261-6/+4
|
* Always resize the original screen before copying when exiting thenicm2021-01-261-19/+24
| | | | alternate screen, GitHub issue 2536.
* Rename HostbasedKeyTypes (ssh) and HostbasedAcceptedKeyTypes (sshd) todtucker2021-01-2613-50/+55
| | | | | | HostbasedAcceptedAlgorithms, which more accurately reflects its effect. This matches a previous change to PubkeyAcceptedAlgorithms. The previous names are retained as aliases. ok djm@
* refactor key constraint parsing in ssh-agentdjm2021-01-261-69/+95
| | | | | | | | | | Key constraints parsing code previously existed in both the "add regular key" and "add smartcard key" path. This unifies them but also introduces more consistency checking: duplicated constraints and constraints that are nonsensical for a particular situation (e.g. FIDO provider for a smartcard key) are now banned. ok markus@
* more ssh-agent refactoringdjm2021-01-261-67/+130
| | | | | | | | | | Allow confirm_key() to accept an additional reason suffix Factor publickey userauth parsing out into its own function and allow it to optionally return things it parsed out of the message to its caller. feedback/ok markus@
* make struct hostkeys public; I have no idea why I made it opaquedjm2021-01-262-8/+6
| | | | | | originally. ok markus@
* move check_host_cert() from sshconnect,c to sshkey.c and refactordjm2021-01-267-51/+69
| | | | | | it to make it more generally usable and testable. ok markus@
* use recallocarray to allocate the agent sockets table; also cleardjm2021-01-261-4/+16
| | | | | | | | | socket entries that are being marked as unused. spinkle in some debug2() spam to make it easier to watch an agent do its thing. ok markus
* factor out common code in the agent clientdjm2021-01-261-24/+39
| | | | | | | | Add a ssh_request_reply_decode() function that sends a message to the agent, reads and parses a success/failure reply. Use it for all requests that only expect success/failure ok markus@
* fix filtering on kstat unit numbersdlg2021-01-251-4/+4
|
* make ssh hostbased authentication send the signature algorithm indjm2021-01-251-3/+3
| | | | | | | | its SSH2_MSG_USERAUTH_REQUEST packets instead of the key type. This make HostbasedAcceptedAlgorithms do what it is supposed to - filter on signature algorithm and not key type. spotted with dtucker@ ok markus@
* Add missing __KAME__ markers.florian2021-01-241-1/+5
| | | | OK claudio
* recognize those ubiquitous webp fileespie2021-01-231-1/+3
| | | | | | cherry-picked from FreeBSD okay millert@, deraadt@, sthen@
* Revert clear changes to writing as they don't work properly, betternicm2021-01-221-26/+7
| | | | change to come.
* Add rectangle-on and rectangle-off copy mode commands, GitHub isse 2546nicm2021-01-222-7/+37
| | | | from author at will dot party.
* Fix some cursor movement commands, from Anindya Mukherjee.nicm2021-01-221-43/+57
|
* PubkeyAcceptedKeyTypes->PubkeyAcceptedAlgorithms here too.dtucker2021-01-221-3/+3
|
* Rename PubkeyAcceptedKeyTypes keyword to PubkeyAcceptedAlgorithms.dtucker2021-01-2212-73/+76
| | | | | | | | While the two were originally equivalent, this actually specifies the signature algorithms that are accepted. Some key types (eg RSA) can be used by multiple algorithms (eg ssh-rsa, rsa-sha2-512) so the old name is becoming increasingly misleading. The old name is retained as an alias. Prompted by bz#3253, help & ok djm@, man page help jmc@
* revert previous after complaints from sthen and deraadt;jmc2021-01-211-2/+2
|
* remove an unneccessary escape; from martin vahlensieckjmc2021-01-211-4/+4
| | | | | | ok gilles while, there, zap an unneccessary Tn;
* Revert r1.87 "Pledge before authentication when possible"kn2021-01-211-9/+5
| | | | | | | | | | | Someone reported to me that ''This breaks ansible managed machines where "persist" isn't used. There i get /bsd: doas[49341]: pledge "proc", syscall 2 Using "persist", everything is fine.''
* Pledge before authentication when possiblekn2021-01-201-5/+9
| | | | | | | | | | | | | | Generally, pleding before parsing the file seems hardly possible due to unveil() being involved. Pledging in case of the winning rule being a "persist" one is not possible either due to TIOC{SET,CHK}VERAUTH not being allowed in the "tty" pledge. But if "persist" is not used, we can pledge before authentication without having to hoist or chang anything. Feedback deraadt tedu OK tdeu
* Change so that window_flags escapes # automatically which means configsnicm2021-01-207-33/+39
| | | | | will not have to change. A new format window_raw_flags contains the old unescaped version.
* Hide some warnings on newer GCC versions, GitHUb issue 2525.nicm2021-01-184-38/+32
|
* There is no need to clear every line entirely before drawing to it, thisnicm2021-01-184-25/+30
| | | | | means moving the cursor and messes up wrapping. Better to just clear the sections that aren't written over. GitHub issue 2537.
* Move usage definition out of header file to avoid issues with -fno-common.mortimer2021-01-182-3/+4
| | | | ok deraadt@
* Move defiition of sum variable from header file to avoid issues withmortimer2021-01-182-3/+6
| | | | | | -fno-common ok deraadt@
* Move definition of pmode to main.c instead of a compress.h. Avoids linkermortimer2021-01-182-3/+5
| | | | | | issues with -fno-common. ok deraadt@
* Extern tracks list to avoid linker issues with -fno-common.mortimer2021-01-182-3/+6
| | | | ok deraadt@
* Add -N flag to never start server even if command would normally do so,nicm2021-01-174-8/+18
| | | | GitHub issue 2523.