summaryrefslogtreecommitdiff
path: root/usr.bin
AgeCommit message (Collapse)Author
2017-12-18Add helper function for uri handing in scp where a missing pathTodd C. Miller
simply means ".". Also fix exit code and add warnings when an invalid uri is encountered. OK otto@
2017-12-18Remove unused variable from Thomas Adam.Nicholas Marriott
2017-12-18Reclaim browser screen real estate in bgplgjob
Removing versioning information too. OK deraadt@
2017-12-18Add the CLOCK_BOOTTIME clockid for use with clock_gettime(2)cheloha
and put it to use in userspace in lieu of the kern.boottime sysctl. Its absolute value is the time that has elapsed since the system booted, i.e., the system uptime. Use in top(1), w(1), and snmpd(8) eliminates a race with settimeofday(2), adjtime(2), etc. inherent to deriving the system uptime via the kern.boottime sysctl. Product of a great deal of discussion/revision with jca@, tb@, and guenther@. ok tb@ jca@ guenther@ dlg@ mlarkin@ tom@
2017-12-18pass negotiated signing algorithm though to sshkey_verify() andDamien Miller
check that the negotiated algorithm matches the type in the signature (only matters for RSA SHA1/SHA2 sigs). ok markus@
2017-12-18sshkey_sigtype() function to return the type of a signature;Damien Miller
ok markus@
2017-12-17Add community/large-community commands and retain parameter input in formjob
OK deraadt@
2017-12-17Let the Insert key toggle overwrite mode. This matches GNU Emacs behavior.Brian Callahan
Diff from Lari Rasku <lari.rasku AT elisanet DOT fi> ok florian@
2017-12-17Use proper BN functions for error reporting; from ksheOtto Moerbeek
2017-12-15Use the canonical idiom to check strlcat(3). An unchecked strlcat callTheo Buehler
led to unexpected output: compare 'jot -w $(printf %1020s)%d%' 1 1' with 'jot -w $(printf %1019s)%d%' 1 1'. found by & ok martijn
2017-12-15Instead of pointlessly falling through other cases and ending up doingTheo Buehler
goto fmt_broken, do it explicitly. Makes following the code path through the switch a bit easier. Prompted by a request by martijn
2017-12-15Make sure the double is cast to a long if the format string is %D, %O, %U.Theo Buehler
Fixes output of e.g. 'jot -w %D 11 -5'. ok martijn
2017-12-14Replace ED25519's private SHA-512 implementation with a call to theChristian Weisgerber
regular digest code. This speeds up compilation considerably. ok markus@
2017-12-14when -h is passed don't print any header, as is common practise in other ↵Jasper Lievisse Adriaanse
systems too. adjust uptime.1 while here as pointed out by martijn@ ok tb@ jca@ martijn@
2017-12-14Enable the awk scripts to generate ex_def.h and options_def.h.Martijn van Duren
These scripts generate the enums required for the ex commands and vi options. Before these lists had to be maintained either by hand or someone had to stumble upon these scripts and figure out how to use them. By enabling them these headers are now always in sync based on the comments in the corresponding source files, which are a lot harder to miss during an update than an extra file. Update the awk scripts to the new enum style introduced by bentley@ with his update on options_def.h r1.7 Feedback Makefile semantics by espie@ Original diff and OK tb@ OK millert@
2017-12-13Fix array index by signed char; from martijn@Todd C. Miller
2017-12-13Fix sign compare warnings; OK martijn@Todd C. Miller
2017-12-13Enable compiler warnings; OK martijn@Todd C. Miller
2017-12-12Use bn_checkp() always; from ksheOtto Moerbeek
2017-12-12Minor cleanup from ksheOtto Moerbeek
2017-12-12optimize add, sub and mul; from kshe; ok tom@Otto Moerbeek
2017-12-12Create a persistent umac128.c source file: #define the output size andChristian Weisgerber
the name of the entry points for UMAC-128 before including umac.c. Idea from FreeBSD. ok dtucker@
2017-12-12Fix 2 bugs introduced by previous.Martijn van Duren
Pointed out by kshe59 <at> zoho <dot> eu OK millert@
2017-12-12pledge()'s 2nd argument becomes char *execpromises, which becomes theTheo de Raadt
pledge for a new execve image immediately upon start. Also introduces "error" which makes violations return -1 ENOSYS instead of killing the program ("error" may not be handed to a setuid/setgid program, which may be missing/ignoring syscall return values and would continue with inconsistant state) Discussion with many florian has used this to improve the strictness of a daemon
2017-12-11Fix and change y command in the following ways:Martijn van Duren
- When 'n' is used as a delimiter escaping 'n' will remain a newline instead of becoming a 'n' character. This is how POSIX specifies how this should work. Other implementations tested also do this wrong. - '[' and maybe other characters are not special during the parsing of the y command and don't need to be matched or treated special in any way. - POSIX specifies that a backslash followed by anything other than the delimiter, 'n', and another backslash, as well as repeating characters in string1 are unspecified. Since the various implementations handle these situations in opposing ways choose to error out on them to prevent people falling into the pitfall of expecting identical behaviour on various implementations. Inspired by the sed.1 patch by kshe59 <at> zoho <dot> eu Feedback and OK millert@ Manpage bits OK jmc@
2017-12-11fix the description of delete-non-matching-lines;Jason McIntyre
from mazocomp
2017-12-10ssh/lib hasn't worked towards our code-sharing goals for a quit while,Theo de Raadt
perhaps it is too verbose? Change each */Makefile to specifying exactly what sources that program requires, compiling it seperate. Maybe we'll iterate by sorting those into seperatable chunks, splitting up files which contain common code + server/client specific code, or whatnot. But this isn't one step, or we'd have done it a long time ago.. ok dtucker markus djm
2017-12-10- add max-count to SYNOPSISJason McIntyre
- list long options with short, where they have an equivalent - sync usage() - minor tweaks
2017-12-10sort -r in the description list, and make its grammar match thoseJason McIntyre
of the other options in this page;
2017-12-10Put remote client info back into the ClientAlive connection terminationDarren Tucker
message. Based in part on diff from lars.nooden at gmail, ok djm
2017-12-10-r restricted mode blocks certain operations as ~ operations.Theo de Raadt
from Jan Klemkow ok nicm
2017-12-09Add support for the non-standard grep -m extension.Paul Irofti
grep -m num stops after a maximum of num matches are found. We support -m0 to match GNU behaviour, but we do not allow negative numbers. Manpage help from jmc@, OK deraadt@.
2017-12-09recognize .openbsd.randomdata section and indicate it roughly, soTheo de Raadt
that objects within it are identified as being in read-only space. ok guenther
2017-12-08Make the r command filename obligatory, similar to what FreeBSD and NetBSDMartijn van Duren
do for several years. While here make corresponding error message for missing read and write file consistent between commands/flag, and shrink the the code of the w flag of the s command by making it use the same code as the w command. Prompted by a larger diff by kshe59 <at> zoho <dot> eu OK millert@
2017-12-08repair columns; from kshe59@zohu.euTheo de Raadt
2017-12-08Add missing length checks to make sure we don't dereference a pointerTodd C. Miller
past the mmap(2)'d buffer. Otherwise, locate will read a single byte past the end of the buffer. This is often harmless, but if the length of the buffer is an even multiple of the page size, locate will crash. OK tb@ espie@ deraadt@
2017-12-08Convert snprintf+write into dprintf. It is simply easier to read, andTheo de Raadt
provides retry on short-write file descriptors. ok florian, previous versions seen by millert
2017-12-08remove description of 'at' field which was removed from vmstat.c -r1.21Jasper Lievisse Adriaanse
2017-12-08time_t printing needs %lld and (long long) castsTheo de Raadt
ok djm
2017-12-08fix ordering in previous to ensure errno isn't clobbered beforeDamien Miller
logging.
2017-12-08for some reason unix_listener() logged most errors twice with eachDamien Miller
message containing only some of the useful information; merge these
2017-12-07Make the command formatting more consistent.Martijn van Duren
s/with/width type-O fix while here. From kshe59 <at> zoho <dot> eu OK jmc@
2017-12-07zap a few stray backslashes from the time thesse two were #defines; fromOtto Moerbeek
Ilya Kaliman
2017-12-07Let it compile again.Kenneth R Westerback
2017-12-06be consistent in where we call fflushMarc Espie
okay millert@
2017-12-06strdup -> bstrdup; from Michael W. BombardieriOtto Moerbeek
2017-12-06don't accept junk after "yes" or "no" responses to hostkey prompts.Damien Miller
bz#2803 reported by Maksim Derbasov; ok dtucker@
2017-12-05Replace atoi and strtol conversions for integer arguments to configDarren Tucker
keywords with a checking wrapper around strtonum. This will prevent and flag invalid and negative arguments to these keywords. ok djm@
2017-12-05Add missing break for rdomain. Prevents spurious "Deprecated option"Darren Tucker
warnings. ok djm@
2017-12-05Fix a case where we could go off the end of the buffer.Todd C. Miller
Crash found by Sergey Bronnikov using afl-fuzz. Based on a diff from and OK by espie@