summaryrefslogtreecommitdiff
path: root/usr.sbin
AgeCommit message (Collapse)Author
2024-03-30Implement else branching logic including 'else if'.Martin Pieuchot
Statement lists for if & else conditions are now wrapped in a new 'struct bt_cond'. Handling B_AC_TEST statements moved to stmt_eval() to handle nested conditional statements. From Christian Ludwig christian_ludwig at genua.de
2024-03-29Stop printing the "syscall" bit related to msyscall(2), since the subsystemTheo de Raadt
is being deleted.
2024-03-26Move the SendHoldTimer code into start_timer_sendholdtime() and ensureClaudio Jeker
the timer is stopped if HoldTime is 0. OK tb@
2024-03-24Convert libressl to use the BoringSSL style time conversionsBob Beck
This gets rid of our last uses of timegm and gmtime in the library and things that ship with it. It includes a bit of refactoring in ocsp_cl.c to remove some obvious ugly. ok tb@
2024-03-24Sync with IANA Status Code RegistryJob Snijders
From https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml OK sthen@ miod@
2024-03-24permament -> permanentJonathan Gray
2024-03-24Clamp the manifestNumber to 20 octets valueTheo Buehler
The standards contain somewhat ambiguous language as to what the largest acceptable value for a crlNumber or manifestNumber could be, due to a limitation to 20 octets. The question is what 20 octets specifically are meant... Consensus seems to have emerged that the largest value is 2^159-1 since 2^160-1 would encode to 21 octets due to a padding octet to disambiguate ff .. ff from -7f ff .. ff (iow the top bit of the first octet is a sign bit). Thus, switch from 2^160 - 1 to 2^159 - 1 as an upper bound by checking the length of the value portion of the DER encoded ASN.1 integer to be at most 20 octets. Thanks to Martin Hoffmann, Tom Harrison, and Ben Maddison for raising and discussing the issue. Thanks also to the spec authors for making me waste a few hours of my life on a single bit. ok job
2024-03-24update project-cymru url, from Robert Keizer, slightly tweakedStuart Henderson
2024-03-22Fix chroot(2) call in control process.Alexander Bluhm
Use /var/empty as chroot directory. Call chroot(2) before setresuid(2). Do the error check correctly. Call chdir(2) after chroot(2). from spiros thanasoulas; with florian@ tb@; OK millert@
2024-03-22Rework the cease shutdown reason to work in both directions by lookingClaudio Jeker
at the ibuf payload passed to log_notification(). Because of this move ibuf_get_string() and the log_notification() call in parse_notification(). OK tb@
2024-03-22Rework parse_notification() to use the ibuf API for everything.Claudio Jeker
While there fix the RFC5492 handling of ERR_OPEN_CAPA (the current code has the logic inversed). ERR_OPEN_CAPA is there to signal that a needed capability is missing in our OPEN message. Just add the handling of ERR_OPEN_CAPA to log_notification(). Also rework the handling of the shutdown reason and move the printing into log_notification(). OK tb@
2024-03-22Replace protocol literal strings and strlen() calls with defined constantsJob Snijders
OK tb@ claudio@
2024-03-21Clear spinner after each cycleAndrew Fresh
Otherwise we can get left with a piece of the spinner if all firmware gets updates and don't print a "kept" value. While here, replace \010 with the ksh supported \b, as suggested by cheloha@ Noticed by deraadt@
2024-03-20fix ORCPT handlingOmar Polo
due to a swapped strlcpy() arguments we don't save the ORCPT argument after validation. There's no buffer overflow since dsn_orcpt is zeroed. Spotted by Tassilo Philipp, thanks! ok millert gilles
2024-03-20Cleanup AID handling.Claudio Jeker
- Loops over all valid AID should start with AID_MIN and go up to AID_MAX - 1 e.g. for (i = AID_MIN; i < AID_MAX; i++) If for some reason AID_UNSPEC must be handled make that explicit in the for loop. - aid2afi() now returns an error for AID_UNSPEC since there is no valid AFI SAFI combo for AID_UNSPEC. - Add additional checks for AID_MIN where currently only AID_MAX was checked. This affects imsg for route refresh and graceful restart. - Simplify add-path capability handling. Only the negotiated add_path capa sets the flag for AID_UNSPEC to help code to quickly check if any add-path is active. OK tb@
2024-03-20Check whether filename and SIA matchJob Snijders
Verify whether the filename as presented by the publication point (which is unsigned information) matches the filename in the SIA attribute (which is signed information). Based on RFC 6487 section 4.8.8. with and OK tb@
2024-03-19Rename parent to issuer in struct authTheo Buehler
Parent is confusing and issuer is the appropriate terminology. This is a mechanical diff. The only remaining uses of 'parent' in this code base now mean 'parent process'. discussed with beck and job ok job
2024-03-18Typecast char argument to isxdigit() to unsigned char since isxdigit()Claudio Jeker
only works that way correctly. OK deraadt@
2024-03-18Double PEER_DESCR_LEN to 64 characters since 32 is a bit on the short side.Claudio Jeker
OK sthen@, deraadt@, dlg@, tb@
2024-03-18Use same markup for origin-set arguments as for roa-set. The maxlen argumentClaudio Jeker
is optional. OK tb@
2024-03-18improve the MDA documentationOmar Polo
- add a pointer to the section when documenting the `mda' keyword - rename the section to MDA COMMANDS - document also what happens when the MDA doesn't exit with status 0 - add the missing environment variables - sort the variables - minor other tweaks to the text with several improvements from jmc, ok jmc
2024-03-17Remove unused enum rsc_resourceblock_tagTheo Buehler
This was used in rsc.c prior to the switch to ASN.1 templates. ok job
2024-03-16btrace(8): cache ELF symbols in sorted arrayScott Soule Cheloha
Currently, every kelf_snprintsym() call performs a linear search through the .symtab for a symbol matching the given PC. The search is expensive and seems to be a major source of dropped profiling events. Storing all STT_FUNC .symtab entries and their names in a sorted array cuts search time from O(n) to O(lg n). In practice, the faster lookups seem to dramatically reduce the profiling drop rate. With tweaks from mpi@. Thread: https://marc.info/?l=openbsd-tech&m=170830125132105&w=2 ok mpi@
2024-03-15add some initial documentation regarding MDAsOmar Polo
this adds some initial commentary for how MDAs should behave and in what environment they are executed. diff from Philipp (philipp+openbsd [at] bureaucracy [dot] de) with some tweaks from Richard Toohey and me. ok gilles@
2024-03-15set ORIGINAL_RECIPIENT in the environment of mda scriptsOmar Polo
mostly for compatibility with postfix since some mdas (like public-inbox) make use of it. diff from Philipp (philipp+openbsd [at] bureaucracy [dot] de) ok gilles@
2024-03-15whitespaceTheo Buehler
2024-03-15Log which of the constraints files triggered a violationJob Snijders
Requested by Ties de Kock (RIPE NCC) OK tb@
2024-03-14Revert "btrace(8): cache ELF .symtab, .strtab entries in sorted array"Scott Soule Cheloha
"No it's not okay." mpi@
2024-03-12btrace(8): cache ELF .symtab, .strtab entries in sorted arrayScott Soule Cheloha
Currently, every kelf_snprintsym() call performs a linear search through the .symtab for a matching symbol. The search is very costly and causes btrace(8) to drop a lot of profiling events. Storing the STT_FUNC .symtab entries and their corresponding .strtab entries in a sorted array cuts the lookup cost from O(n) to O(lg n). Lower overhead reduces the drop rate for profiling events. With tweaks from mpi@. Thread: https://marc.info/?l=openbsd-tech&m=170830125132105&w=2 probably ok mpi@
2024-03-12Enforce same-origin policy for HTTP redirectsJob Snijders
Isolate resources from different RRDP servers to avoid inappropriately increasing resource consumption for both RRDP clients and the referenced server. OK claudio@ tb@
2024-03-11apply https://nlnetlabs.nl/downloads/unbound/patch_CVE-2024-1931.diff toStuart Henderson
unbound, fixing an indefinite loop that could be triggered by a client against an unbound server where the (non-default) configuration "ede: yes" is used. https://nlnetlabs.nl/downloads/unbound/CVE-2024-1931.txt ok florian@
2024-03-04x13s (or other qualcomm machines of that generation) will sometimesTheo de Raadt
boot in ACPI mode, then the qcpas0 driver isn't found. But we want a firmware associated with that device name. So also match for the qcpas firmware on ^ppb0*\"Qualcomm SC8280XP PCIe\" ok phessler kettenis
2024-03-02bump version to 7.5.0Omar Polo
2024-03-01Bump versionTheo Buehler
2024-03-01Bump versionClaudio Jeker
2024-03-01Lipstick on a pig: avoid comparing signed and unsignedJob Snijders
OK tb@ claudio@
2024-03-01Add -x to opt into experimental file formatsTheo Buehler
Instead of burning one letter for each new file format (sidrops is known to crank out new things faster than a normal person can read), use -x to opt into parsing and processing file formats that aren't yet considered stable. This is currently only the Signed Prefix List. While a repetition of the ASPA debacle, this code hasn't yet seen enough stress testing to be enabled by default. ok claudio job
2024-03-01Factor signed prefix list JSON output into a helperTheo Buehler
ok claudio job (as part of a larger diff)
2024-02-27Printing large tuples require more than 64 chars, bump the string limit.Martin Pieuchot
2024-02-27Make it possible to check for existing string in maps.Martin Pieuchot
2024-02-26Also download SPLs via rsyncJob Snijders
OK tb@
2024-02-26Track the number of new files moving from 'staging' to 'validated cache'Job Snijders
The OpenMetrics output shows per-repository counters for new files added, the main process and JSON output emit the sum of all new files. OK claudio@
2024-02-26Add NAS-Identifier "npppd" for RADIUS requests. Also send Accouting-OnYASUOKA Masahiko
when RADIUS accounting is configured.
2024-02-26Properly close JSON array before continuing in TAKJob Snijders
OK claudio@
2024-02-26use TAILQ_FOREACH_SAFE() to avoid use after freeJonathan Gray
found by smatch, ok claudio@
2024-02-26Put the RADIUS message authenticator in the Access-Request and checkYASUOKA Masahiko
the message authenticators of any received messages from servers only if they include a message authenticator.
2024-02-26Use unsigned integers for bit fields. Also fix white spaces.YASUOKA Masahiko
2024-02-26Convert K&R style function declarations to ANSI.YASUOKA Masahiko
2024-02-26type mgtv -> mgt; from todd carsonJason McIntyre
2024-02-24Check for builtins used inside tuple to ask the kernel to copyout specific data.Martin Pieuchot
Allow to save stacktrace and process name in tuples.