summaryrefslogtreecommitdiff
path: root/usr.bin
AgeCommit message (Collapse)Author
2021-01-28Make slot_{attach,detach}() the opposite of each otherAlexandre Ratchov
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.
2021-01-28Drop unused dev_nctl() function and few unused prototypesAlexandre Ratchov
2021-01-27fix leak: was double allocating kex->session_id bufferDamien Miller
2021-01-27update comment, SMALL was split into SMALL and NOSSLStuart Henderson
2021-01-27Promote nrules/maxrules to size_t and make sure they can't overflow.Todd C. Miller
reallocarray(3) will fail if nmemb * size would overflow. OK tb@ martijn@
2021-01-27Flush pending output before entering or exiting alternate screen ratherNicholas Marriott
than leaking it, oss-fuzz issue 29959.
2021-01-27this needs kex.h nowDamien Miller
2021-01-27make ssh->kex->session_id a sshbuf instead of u_char*/size_t andDamien Miller
use that instead of global variables containing copies of it. feedback/ok markus@
2021-01-27remove global variable used to stash compat flags and use theDamien Miller
purpose-built ssh->compat variable instead; feedback/ok markus@
2021-01-27fix -fno-common issues; ok mortimerTheo de Raadt
2021-01-27Logical not bitwise or. ok djm@Darren Tucker
2021-01-26satisfy -fno-common, by (1) copying all the variable decls fromTheo de Raadt
indent_globs.h to indent.c, and (2) changing all the same decls in indent_globs.h to be extern ok mortimer
2021-01-26sockb variable is unused (and even worse, was common unused)Theo de Raadt
2021-01-26satisfy -fno-common by repairing one enum declTheo de Raadt
ok mortimer
2021-01-26move HostbasedAcceptedAlgorithms to the right place in alphabetical orderChristian Weisgerber
2021-01-26Remove unused variables leftover from refactoring. ok djm@Darren Tucker
2021-01-26Always resize the original screen before copying when exiting theNicholas Marriott
alternate screen, GitHub issue 2536.
2021-01-26Rename HostbasedKeyTypes (ssh) and HostbasedAcceptedKeyTypes (sshd) toDarren Tucker
HostbasedAcceptedAlgorithms, which more accurately reflects its effect. This matches a previous change to PubkeyAcceptedAlgorithms. The previous names are retained as aliases. ok djm@
2021-01-26refactor key constraint parsing in ssh-agentDamien Miller
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@
2021-01-26more ssh-agent refactoringDamien Miller
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@
2021-01-26make struct hostkeys public; I have no idea why I made it opaqueDamien Miller
originally. ok markus@
2021-01-26move check_host_cert() from sshconnect,c to sshkey.c and refactorDamien Miller
it to make it more generally usable and testable. ok markus@
2021-01-26use recallocarray to allocate the agent sockets table; also clearDamien Miller
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
2021-01-26factor out common code in the agent clientDamien Miller
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@
2021-01-25fix filtering on kstat unit numbersDavid Gwynne
2021-01-25make ssh hostbased authentication send the signature algorithm inDamien Miller
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@
2021-01-24Add missing __KAME__ markers.Florian Obser
OK claudio
2021-01-23recognize those ubiquitous webp fileMarc Espie
cherry-picked from FreeBSD okay millert@, deraadt@, sthen@
2021-01-22Revert clear changes to writing as they don't work properly, betterNicholas Marriott
change to come.
2021-01-22Add rectangle-on and rectangle-off copy mode commands, GitHub isse 2546Nicholas Marriott
from author at will dot party.
2021-01-22Fix some cursor movement commands, from Anindya Mukherjee.Nicholas Marriott
2021-01-22PubkeyAcceptedKeyTypes->PubkeyAcceptedAlgorithms here too.Darren Tucker
2021-01-22Rename PubkeyAcceptedKeyTypes keyword to PubkeyAcceptedAlgorithms.Darren Tucker
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@
2021-01-21revert previous after complaints from sthen and deraadt;Jason McIntyre
2021-01-21remove an unneccessary escape; from martin vahlensieckJason McIntyre
ok gilles while, there, zap an unneccessary Tn;
2021-01-21Revert r1.87 "Pledge before authentication when possible"kn
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.''
2021-01-20Pledge before authentication when possiblekn
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
2021-01-20Change so that window_flags escapes # automatically which means configsNicholas Marriott
will not have to change. A new format window_raw_flags contains the old unescaped version.
2021-01-18Hide some warnings on newer GCC versions, GitHUb issue 2525.Nicholas Marriott
2021-01-18There is no need to clear every line entirely before drawing to it, thisNicholas Marriott
means moving the cursor and messes up wrapping. Better to just clear the sections that aren't written over. GitHub issue 2537.
2021-01-18Move usage definition out of header file to avoid issues with -fno-common.mortimer
ok deraadt@
2021-01-18Move defiition of sum variable from header file to avoid issues withmortimer
-fno-common ok deraadt@
2021-01-18Move definition of pmode to main.c instead of a compress.h. Avoids linkermortimer
issues with -fno-common. ok deraadt@
2021-01-18Extern tracks list to avoid linker issues with -fno-common.mortimer
ok deraadt@
2021-01-17Add -N flag to never start server even if command would normally do so,Nicholas Marriott
GitHub issue 2523.
2021-01-17Replace SB_KNOTE and sb_flagsintr with direct checking of klist.Visa Hankala
OK mpi@ as part of a larger diff
2021-01-16Unle recover the scope_id from a possible embedded scope if the scope_idClaudio Jeker
is not initalized. Do not reset the scope_id if it was already set. OK bluhm@ florian@
2021-01-16s/authorization/authentication/gMartijn van Duren
OK kn@ tedu@
2021-01-15Be more explicit by stating that the -n flag is linked to the nopass optionMartijn van Duren
in doas.conf instead of a generic "would prompt for password", which could lead people into believing that persist could work with this option. OK tedu@ Feedback and OK kn@
2021-01-15Make output buffer larger to prevent potential truncation warnings fromDarren Tucker
compilers not smart enough to know the strftime calls won't ever fully fill "to" and "from". ok djm@