summaryrefslogtreecommitdiff
path: root/usr.bin
AgeCommit message (Collapse)Author
2021-09-01Simplify code by replacing strtol() with strtonum()Job Snijders
Feedback from deraadt@
2021-09-01pledge() timeoutJob Snijders
Feedback from deraadt@
2021-09-01Remove sysexits.h reference and improve usage string.Job Snijders
Feedback from deraadt@
2021-09-01A couple commands don't need sys/param.h, but they do need sys/signal.hTheo de Raadt
2021-09-01Import timeout(1) from NetBSDJob Snijders
The timeout(1) utility can be used to run commands with a time limit. OK deraadt@ beck@
2021-09-01As a first step towards safe signal handling, improve the h_int()Ingo Schwarze
and h_winch() signal handlers to make one single store to a sig_atomic_t variable. Note that the h_hup() and h_term() signal handlers are still unsafe after this commit because they also set the "killersig" (how fitting!) field in a global struct. Despite storing information in static global variables rather than in structs passed around as arguments, this patch does not cause a change in behaviour because there is always exactly one GS object, initialized using gs_init() called from the top of main(), and screen_init() stores a pointer to this one and only GS object in the .gp member of each and every SCR object. Talk about useless abstraction... Problem pointed out by deraadt@. Patch from Tim <trondd at kagu hyphen tsuchi dot com> on tech@. OK deraadt@.
2021-09-01Remove from0 support. openrsync will not implement all bad ideas thatClaudio Jeker
were added to rsync. from0 is one of those and really not needed. OK job@
2021-08-31Spacing. OK tb@Claudio Jeker
2021-08-30Document new include*/exclude* options in the man pageJob Snijders
2021-08-30Add include/exclude to usage()Job Snijders
OK claudio@
2021-08-30Clean up end of do_body in openssl(1) caKinichiro Inoguchi
suggested from tb@
2021-08-30Remove NULL check before free in openssl(1) caKinichiro Inoguchi
ok tb@
2021-08-29After years of forewarning, disable the RSA/SHA-1 signature algorithmDamien Miller
by default. It is feasible to create colliding SHA1 hashes, so we need to deprecate its use. RSA/SHA-256/512 remains available and will be transparently selected instead of RSA/SHA1 for most SSH servers released in the last five+ years. There is no need to regenerate RSA keys. The use of RSA/SHA1 can be re-enabled by adding "ssh-rsa" to the PubkeyAcceptedAlgorithms directives on the client and server. ok dtucker deraadt
2021-08-29wrap at 80 columnsDamien Miller
2021-08-29Lee "Scratch" Perry died :(Stuart Henderson
2021-08-29Do not call X509_alias_get0(3) with NULL as the second argument.Ingo Schwarze
Even if the buffer is guaranteed to be NUL-terminated in a particular case, it is still setting a bad example. Besides, it is unclear to me whether there is any such guarantee in the case at hand. Checking that would require auditing all of d2i_X509_bio(3), ASN1_item_d2i_bio(&NETSCAPE_X509_it, ...), PEM_read_bio_X509_AUX(3), and PKCS12_parse(3), since no such guarantee is documented for any of these functions, and even then it would remain fragile with respect to later changes of implementation details. In the worst case, this could potentially result in a read buffer overrun. OK tb@ on an earlier version of this patch. While we are here, deraadt@ requested to not use the word "string" in the name of a variable that is not a string in the sense of the C language.
2021-08-29This needs extern.h for the rmatch prototypeClaudio Jeker
2021-08-29notify the user about a successful password change; ok millert@Robert Nagy
2021-08-29Implement --exclude/exclude-file and --include/include-file.Claudio Jeker
Currently only simple include and excludes work, the advanced filters introduced later in rsync are not implemented. It is unclear if the per directory filters are something we want to implement. This requires more modern protocols which openrsync is not able to handle right now. This adds a special matching function to allow the ** matching which behaves mostly like rsyncs version with the exception of how bad [] patterns are expanded. For bad patterns openrsync follows more how fnmatch behaves and not the somewhat strange rsync behaviour. Not perfect but committing now so people can test and provide feedback.
2021-08-29Start naccept .desc with a capitalTheo Buehler
noted by inoguchi
2021-08-29Implement -naccept in the s_server.Theo Buehler
doc fixes/ok jmc ok beck
2021-08-28Add RCS markerTheo Buehler
2021-08-28use stderr for printing error and informational messagesRobert Nagy
this makes it easier to parse what passwd(1) is doing if spawned from a GUI ok millert@
2021-08-28Check X509_get_notAfter return value in openssl(1) ca.cKinichiro Inoguchi
2021-08-28Use strndup instead of malloc, memcpy and NULL termination in openssl(1) ca.cKinichiro Inoguchi
suggested from tb@ for do_updatedb(), and applied the same for do_body() and do_revoke().
2021-08-28Remove ASN1_TIME_new and use NULL for X509_gmtime_adj, free tmptm in err pathKinichiro Inoguchi
comments from tb@
2021-08-28Unwrap lines in openssl(1) ca.cKinichiro Inoguchi
suggested from tb@
2021-08-28Avoid leak with X509_REVOKED variable in openssl(1) ca.cKinichiro Inoguchi
pointed out by tb@
2021-08-28Checking the return value in openssl(1) ca.cKinichiro Inoguchi
Some functions are used without verifying the return value in openssl(1) ca. This diff adds checking for the function return value. With this diff, I changed return value of the write_new_certificate from void to int to return the condition to the caller. ok and comments from tb@
2021-08-27Replace %% in command lists (by copying them) for template arguments ,Nicholas Marriott
this means they can be used with {} as well. Also make argument processing from an existing vector preserve commands. GitHub issue 2858.
2021-08-27Allow control mode clients to set a hard limit on the window width andNicholas Marriott
height, GitHub issue 2594.
2021-08-25Improve some logging.Nicholas Marriott
2021-08-25Ignore client creating session when working out size if it is a controlNicholas Marriott
client.
2021-08-25bind-key needs to allow commands for any argument for the moment.Nicholas Marriott
2021-08-25Validate command argument types (string or command list) and give moreNicholas Marriott
useful error messages.
2021-08-25setupterm needs char * not const char * on some platforms.Nicholas Marriott
2021-08-25Fix up some printflike attributes.Nicholas Marriott
2021-08-25Start inputs as NULL so not freeing random stack garbage, GitHub issue 2852.Nicholas Marriott
2021-08-23args_make_commands_now needs to take an extra reference to the returnedNicholas Marriott
command list since it will be freed already.
2021-08-23Move command argument parsing common functions and don't bother to parseNicholas Marriott
again if given a command rather than a string.
2021-08-23Key bindings steal a reference to the command instead of adding theirNicholas Marriott
own, it was correct not to add a reference when parsing, but the bind-key then needs to add one.
2021-08-23Revert one of previous, for some reason it is being freed.Nicholas Marriott
2021-08-23Fix a few memory leaks.Nicholas Marriott
2021-08-23Limit width and height to tty correctly, GitHub issue 2843.Nicholas Marriott
2021-08-22Fix handling of leading #s when working out width.Nicholas Marriott
2021-08-22Do not double free expanded path in source-file, also remove someNicholas Marriott
unnecessary assignments.
2021-08-22Insert alias in the right place, GitHub issue 2842.Nicholas Marriott
2021-08-21Free value properly.Nicholas Marriott
2021-08-21Preserve argument type in command and convert to string on demand.Nicholas Marriott
2021-08-21Pass typed arguments out of the parser into the arguments list and letNicholas Marriott
it convert them into strings.