summaryrefslogtreecommitdiff
path: root/usr.bin
AgeCommit message (Collapse)Author
2023-11-19openssl pkcs12: rewrite without reaching into X509_ALGORTheo Buehler
We can call ASN1_item_unpack() which will end up stuffing the same arguments into ASN1_item_d2i() as d2i_PBEPARAM(). This eliminates the last struct access into X509_ALGOR outside libcrypto in the base tree. ok jsing
2023-11-19openssl ts: convert to X509_ALGOR_set0()Theo Buehler
ok jsing
2023-11-16avoid reading data when enumerating kstats.David Gwynne
this means we can reliably read the provider/instance/name/unit tuple, which should avoid "duplicate kstat entry" when multiple kstat read handlers have issues. found on a box with multiple rge interfaces, which have hardware backed kstats that can only be read when the interface is up.
2023-11-16handle printing cpu freq and volt kstat_kv typesDavid Gwynne
2023-11-15when connecting via socket (the default case), filter addresses byDamien Miller
AddressFamily if one was specified. Fixes the case where, if CanonicalizeHostname is enabled, ssh may ignore AddressFamily. bz5326; ok dtucker
2023-11-15when deciding whether to enable keystroke timing obfuscation,Damien Miller
only consider enabling it when a channel with a tty is open. Avoids turning on the obfucation when X11 forwarding only is in use, which slows it right down. Reported by Roger Marsh
2023-11-15fnematch: fix a bug that could result in extra chars being pushed back.Todd C. Miller
From Arnold Robbins. https://github.com/onetrueawk/awk/pull/213
2023-11-15fnematch: fix out-of-bounds access on EOFTodd C. Miller
fnematch() expects to store a NUL byte when EOF is encountered. However, the rewrite broke this assumption because r.len from getrune() is zero on EOF. This results in j becoming negative on EOF, causing an out-of-bounds access. It is simplest to just force r.len to 1 on EOF to copy a single NUL byte--the rune is initialized to zero even for EOF. This also fixes the call to adjbuf(). We cannot use 'k' to determine when we need to expand the buffer now that we are potentially reading more than a single byte at a time. https://github.com/onetrueawk/awk/pull/211
2023-11-15procline: only reduce mcount once per line, not once per match.Todd C. Miller
This makes "grep -m" behave like GNU grep (where the -m option originated). From Crystal Kolipe.
2023-11-14Don't strdup NULL filename.Nicholas Marriott
2023-11-14Handle NULL client (in config file) when showing a status message; alsoNicholas Marriott
copy the file when processing if-shell since it may be freed. GitHub issue 3746.
2023-11-14Use SM 2026 for Sync which is more widely supported now.Nicholas Marriott
2023-11-14This code depends on internals from net/art.h so include it explicitly.Claudio Jeker
OK bluhm@
2023-11-13Reduce the man(7) default global indentation from 7n, which was an oddityIngo Schwarze
in groff-1.01 to groff-1.22.4, to 5n for compatibility with Version 7 AT&T UNIX, 4.3BSD-Reno, groff-1.23.0, and all versions of mdoc(7). OK jmc@ millert@
2023-11-13Kill last user of ASN1_time_parse() in the treeTheo Buehler
ASN1_time_parse() was useful while OpenSSL didn't have something sort of equivalent, but now they do. Let's retire ASN1_time_parse() to internal. This will require some patching in ports, but shrug. ok beck
2023-11-13Check notBefore/notAfter validity with ASN1_TIME_to_tm(3)Theo Buehler
ok beck
2023-11-13Make sure sftp_get_limits() only returns 0 if 'limits' was initialized.Tobias Heider
This fixes a potential uninitialized use of 'limits' in sftp_init() if sftp_get_limits() returned early because of an unexpected message type. ok djm@
2023-11-11Ignore -N in "gzip -dN <in.gz" and "zcat -N in.gz"George Koehler
Have -c override -N, like other gzip implementations. Before, our -N (decompress to stored name) overrode -c (cat to stdout) and crashed with a pledge violation, because the pledge for -c excludes wpath. Guilherme Janczak reported the pledge violation in July 2022 and provided a diff to prevent it, along with a regress test. I rewrote the diff and expanded the regress. ok kn@ millert@
2023-11-10sync with NetBSD -r1.38:Jasper Lievisse Adriaanse
remove unused NULL pointer that was passed to printf %s.
2023-11-09-C/resume without "proc exec"Klemens Nanni
ftp(1) has "proc exec" to run sh(1) on interactive ! commands and filenames starting with "|"; this is orthogonal to continuing transfers using the existing file size as offsets. There seems to be no case where a) the argument is an URL, i.e. we pledge, and b) a shell is spawned somehow, so avoid these promises when resuming. bsd.port.mk(5) FETCH_CMD uses -C by default. OK millert
2023-11-09Add [-P progam] to filter dumps by basenameKlemens Nanni
[-p pid] requires knowing the PIDs beforehand, sieving through big dumps by argv[0] strings is more ergonomic. OK deraadt
2023-11-05current code no longer uses Lst_Replace not Lst_RequeueMarc Espie
so don't bother compiling them.
2023-11-03Check if a signal already has been received before entering a blockingAnton Lindqvist
read as opposed of only doing it afterwards. Issue uncovered by the mail regress tests. With claudio@ and ok millert@
2023-11-03timeout(1): align execvp(3) failure statuses with GNU timeoutScott Soule Cheloha
Align our exit statuses with those of GNU timeout in the execvp(3) failure case. Exit with 127 if the utility is not found. Exit with 126 if we cannot execute the utility for any other reason. While here, the child should _exit(2) instead of calling exit(3) via err(3). Update the manpage accordingly. With input from millert@ and deraadt@. Link: https://marc.info/?l=openbsd-tech&m=169739592322978&w=2 ok millert@
2023-11-02next-prompt can have 1 argument.Nicholas Marriott
2023-10-31Update awk to Oct 30, 2023 version.Todd C. Miller
This is really just a version number bump as we already have the fixes committed.
2023-10-30This is the OpenBSD version of Awk.Todd C. Miller
2023-10-30Minor cosmetic changes to make our awk match my github branch.Todd C. Miller
2023-10-30Include strings.h for the strncasecmp() prototype.Todd C. Miller
From upstream.
2023-10-30Do not allow combined UTF-8 characters that are too long, GitHub issueNicholas Marriott
3729.
2023-10-28substr: fix buffer overflow with utf-8 stringsTodd C. Miller
We need to use u8_strlen(), not strlen(), to compute the length. Otherwise, there may be an out of bounds write when writing the NUL terminator to set the length of the substring. https://github.com/onetrueawk/awk/pull/205
2023-10-25Fix unveil(2) in patch(1) with explicit patchfile.Alexander Bluhm
A backup file should be created in the directory of the original file, but only the current directory was unveiled. Then the patched file was created in /tmp and did not replace the original patchfile in place. If a patchfile is passed in argv[0], unveil its directory instead of current directory. OK florian@ deraadt@ millert@
2023-10-25Import regenerated moduli.Darren Tucker
2023-10-24Implement the man(7) .MR macro, a 2023 GNU extension.Ingo Schwarze
The syntax and semantics is almost identical to mdoc(7) .Xr. This will be needed for reading the groff manual pages once our port will be updated to 1.23, and the Linux Manual Pages Project is also determined to start using it sooner or later. I did not advocate for this new macro, but since we want to remain able to read all manual pages found in the wild, there is little choice but to support it. At least it is easy to do, they basically copied .Xr.
2023-10-24call vttidy() in the exit path for the batch modeOmar Polo
Diff by Mark Willson (mark [at] hydrus.org.uk), thank you!
2023-10-23Support some escape sequences, in particular character escape sequences,Ingo Schwarze
inside \w arguments, and skip most other escape sequences when measuring the output length in this way because most escape sequences contribute little or nothing to text width: for example, consider font escapes in terminal output. This implementation is very rudimentary. In particular, it assumes that every character has the same width. No attempt is made to detect double-width or zero-width Unicode characters or to take dependencies on output devices or fonts into account. These limitations are hard to avoid because mandoc has to interpolate \w at the parsing stage when the output device is not yet known. I really do not want the content of the syntax tree to depend on the output device. Feature requested by Paul <Eggert at cs dot ucla dot edu>, who also submitted a patch, but i chose to commit this very different patch with almost the same functionality. His input was still very valuable because complete support for \w is out of the question, and consequently, the main task is identifying subsets of the feature that are needed for real-world manual pages and can be supported without uprooting the whole forest.
2023-10-23Unzoom window at start of destroy so it doesn't happen later (whenNicholas Marriott
destroying panes) after the layout has been freed, GitHub issue 3717.
2023-10-22While doing delayed expansion of escape sequences in macro arguments,Ingo Schwarze
correctly check for failure of the in-place expansion function. If an argument not only does recursive delayed expansion but infinitely recursive delayed expansion, this bug could result in an ESCAPE_EXPAND assertion failure. Thanks to Eric van Gyzen <vangyzen at FreeBSD> for finding this bug by inspecting FreeBSD source code.
2023-10-21When parsing a macro argument results in delayed escape sequenceIngo Schwarze
expansion, re-check for all contained escape sequences whether they need delayed expansion, not just for the particular escape sequences that triggered delayed expansion in the first place. This is needed because delayed expansion can result in strings containing nested escape sequences recursively needing delayed expansion, too. This fixes an assertion failure in krb5_openlog(3), see: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=266882 Thanks to Wolfram Schneider <wosch at FreeBSD> for reporting the bug and to Baptiste Daroussin <bapt at FreeBSD> for forwarding the report.
2023-10-21delete whitespaces that end up in output filesTheo de Raadt
2023-10-18Support the GNU-specific syntax ".IP \\[bu]" for bullet lists in man(7)Ingo Schwarze
pages that Alejandro Colomar recommends in the "Lists" subsection of https://man7.org/linux/man-pages/man7/man-pages.7.html#STYLE_GUIDE . For example, this will improve HTML formatting of the first list in the subsection "Feature test macros understood by glibc" on the page https://manpages.debian.org/bookworm/manpages/ftm.7.en.html . Issue reported by Alejandro Colomar <alx at kernel dot org>.
2023-10-18Better document the purpose and features of the file mandoc.cssIngo Schwarze
and the purpose and limitations of the embedded stylesheet. Triggered by a conversation with Alejandro Colomar <alx at kernel dot org>.
2023-10-17Switch to tiparm_s (added in ncurses 6.4-20230424) instead of tparm,Nicholas Marriott
which allows ncurses to validate the capabilities correctly.
2023-10-17Update ncurses and associated libraries (form, panel, menu) toNicholas Marriott
6.4-20230826 (from 5.7-20081102). Based on result from Thomas Dickey's ncu2openbsd script and then modified. Switches to the upstream tput. Major bump for the ncurses libraries and for libedit and libreadline. Help from tb, millert. ok deraadt sthen
2023-10-16Move declaration of "len" into the block where it's used. This letsDarren Tucker
us compile Portable with -Werror with when OpenSSL doesn't have Ed25519 support.
2023-10-16reinstate space-to-tabstop entry in the manpageOmar Polo
removed in rev 1.95 since was hidden behind NOTAB, and forgot to be re-added when no-tab-mode was resurrected.
2023-10-15time(1): miscellaneous style(9) tweaksScott Soule Cheloha
Use a space after keywords, binary operators require spaces, second-level indents are four spaces, remove some extraneous parentheses and empty lines, fill empty loop bodies with a "continue" statement. No binary change.
2023-10-1264 %-expansion keys ought to be enough for anybody; ok dtuckerDamien Miller
(we just hit the previous limit in some cases)
2023-10-12don't dereference NULL pointer when hashing jumphostDamien Miller
2023-10-12add %j token that expands to the configured ProxyJump hostname (orDamien Miller
the empty string if this option is not being used). bz3610, ok dtucker