Commit Graph

13283 Commits

Author SHA1 Message Date
riastradh 1cac5d57e4 certctl(8): Avoid clobbering prepopulated /etc/openssl/certs.
Also avoid clobbering some other edge cases like symlinks or
non-directories there.

This way, we have the following transitions on system updates:

- If /etc/openssl/certs is empty (as in default NetBSD<10 installs):
  quietly populated on rehash.

- If /etc/openssl/certs is nonempty (you've added things to it,
  e.g. by hand or with mozilla-rootcerts) and has never been managed
  by certctl(8): left alone on rehash, with an error message to
  explain what you need to do.

- If /etc/openssl/certs has been managed by certctl(8): quietly
  updated on rehash.

Note: This means current installations made since certctl(8) was
added will be treated like /etc/openssl/certs is nonempty and has
never been managed by certctl(8).  To work around this, you can just
delete /etc/openssl/certs and rerun `certctl rehash'.
2023-08-28 22:25:49 +00:00
riastradh 3d4f065740 certctl(8): Exit nonzero on missing certs.conf. 2023-08-28 22:25:32 +00:00
riastradh 9cc24c9433 postinstall(8): Add opensslcerts item to regen /etc/openssl/certs.
Works only with destdir /, since it relies on running openssl(1),
which is not available as a tool or required in the cross-build
environment.
2023-08-26 05:59:00 +00:00
riastradh 50a8b41245 certctl(8): New tool for managing OpenSSL CA certificates.
Same command-line syntax as FreeBSD, clearer semantics about which
parts are config and which parts are cache.
2023-08-26 05:27:13 +00:00
dholland 52043314dd paxctl(8): it is not a bug that paxctl settings are persistent.
Nor is it a bug that they're applied to the file rather than stored in
some magic secret database where they survive reinstalls, which the
prior wording seems to suggest was the eventual intention.

It is worth noting that they change the target file, so still say that.
2023-08-21 00:41:49 +00:00
tnn 00e8851994 npfctl: adapt to new libpcap API 2023-08-18 14:26:50 +00:00
tnn 93ea59e26b ndp: add gmt2local() from external/bsd/tcpdump instead of reachover
It is no longer shipped with the tcpdump distribution.
2023-08-18 13:07:38 +00:00
gutteridge 650194bf5d paxctl.8: minor grammar/style corrections 2023-08-16 22:22:02 +00:00
mrg 6ed8189e16 avoid uninitialised variable warnings (likely incorrect ones.)
cry wolved by GCC 12.
2023-08-11 07:05:39 +00:00
mrg cab2d18424 don't assign struct pointers to smaller then structure regions of memory.
in all cases here, the later parts of the structure are not actually
accessed, so there are no existing bugs here beyond general UB.  for the
ufs ones, this also removes some casts.

found by GCC 12.
2023-08-10 20:49:19 +00:00
riastradh 9f568c21a1 traceroute/Makefile: Nix trailing whitespace. 2023-08-08 11:53:47 +00:00
riastradh 18140ab7da npftest(8): No need for weird padding any more.
cdbw_output never needed it at runtime, and the declaration no longer
makes gcc angry about not having it.
2023-08-08 10:35:48 +00:00
riastradh c3a13cfdbd dev_mkdb(8): No need for weird padding any more.
cdbw_output never needed it at runtime, and the declaration no longer
makes gcc angry about not having it.
2023-08-08 10:35:37 +00:00
riastradh 7393532b27 services_mkdb(8): No need for weird padding any more.
cdbw_output never needed it at runtime, and the declaration no longer
makes gcc angry about not having it.
2023-08-08 10:35:21 +00:00
mrg 5b70d9ed1d use standard strncpy() idiom to completely zero a buffer, including
explicitly nul the final char.

found by GCC 12.
2023-08-08 06:31:58 +00:00
mrg 832d47522a introduce new GCC 12 warning disables and use them in a few places
this introduces 4 new warning disable flags:

   CC_WNO_MISSING_TEMPLATE_KEYWORD
   CC_WNO_REGISTER
   CC_WNO_STRINGOP_OVERREAD
   CC_WNO_ARRAY_BOUNDS

and documents them in README.warnings.  of these, the string op
and array bounds are both problematic (real bugs) and also spurious
(not real bugs), and the other 2 are mostly temporary for older
3rd party code.

add some new uses of CC_WNO_STRINGOP_OVERFLOW.

fix m68k build for gallium and GCC 12.
2023-08-08 06:27:31 +00:00
tnn a8f4a23fe6 makemakedb: don't return uninitialized token length if stemming fails 2023-08-07 20:35:21 +00:00
tnn f65c21d7bf services_mkdb: pad argument to cdbw_output(3) to match it's prototype 2023-08-07 20:21:08 +00:00
andvar 506971ff58 fix typos in comments and one definition, mainly s/sucket/socket/. 2023-08-03 20:45:49 +00:00
rin 03675fcefd Revert CC_WNO_USE_AFTER_FREE from Makefile's (thanks uwe@) 2023-08-03 14:56:36 +00:00
rin 91f8ac6d30 Sprinkle CC_WNO_USE_AFTER_FREE for GCC 12
All of them are blamed for idiom equivalent to:
	newbuf = realloc(buf, size);
	p = newbuf + (p - buf);
2023-08-03 13:36:08 +00:00
mrg 2bd8f802e4 avoid having addresses of local variable exist after a function returns.
found by GCC 12.
2023-08-03 08:03:19 +00:00
rin a737f1efc9 makemandb: trailing whitespace 2023-08-03 07:49:23 +00:00
andvar 1e7139f024 fix RCSIDs. 2023-08-01 20:09:12 +00:00
mrg f386908b27 convert explicit length check before unchecked snprintf() with just a
overflow checked snprintf().  for res_debug.c and res_query.c, convert
from sprintf() to snprintf().

tested scp and rcp fail properly with too-long paths.
tested getaddrinfo fails as expected for too-long domains.
tested dig and ping for similar (res_debug.c/res_query.c).
created a temporary fs with quotas to test edquota with a long EDITOR.
did not test ypserv directly, but it's the same pattern.

avoids GCC 12 snprintf() warnings, and reduces total code size.
2023-08-01 08:47:24 +00:00
mrg 1115bcb541 cdbw_output()'s 3rd argument must be a 16-byte char array, so pad the
string literals passed to it with enough nuls to make this true.

found by GCC 12.
2023-08-01 07:57:17 +00:00
mrg f8570f8a97 fix simple mis-matched function prototype and definitions.
most of these are like, eg

   void foo(int[2]);

with either of these

   void foo(int*) { ... }
   void foo(int[]) { ... }

in some cases (such as stat or utimes* calls found in our header files),
we now match standard definition from opengroup.

found by GCC 12.
2023-08-01 07:04:14 +00:00
wiz 00f0c4df28 ostat: use standard option order (AaBb...)
Fix macro usage while here
2023-07-28 12:03:33 +00:00
mrg 1101fff970 add iostat -X option, limited alternative statistics.
this is like the "-D" option, except it skips the xfers/s, and
reports MB/s instead of KB/s.  allows for far more devices to
be displayed per line by default (about 50% more.)
2023-07-28 09:18:58 +00:00
msaitoh e47efcfbf6 Sort by number. No functional change. 2023-07-21 10:26:36 +00:00
nat 1663fafd53 Reorder for readability.
No functional change intended.

XXX pullup-10.
2023-07-21 02:11:18 +00:00
nat 36c20958be Fix formatting.
XXX pullup-10.
2023-07-20 13:31:31 +00:00
nat b0ae8f5305 Add BUGS section to manual page.
This notes the problems with playback from file on certain devices.

XXX pullup-10
2023-07-20 13:28:47 +00:00
nat 5d3fbf052c Add thottling when playing from file.
This avoids rapid playback when playing from file with affected devices.

Playback using pad(4) is still preferred ad gives a better result.
Playback from pad(4) is unaffected by this change.

XXX pullup-10.
2023-07-20 12:33:27 +00:00
riastradh 70ecadb004 ddb: New `show all tstiles' command.
Shows who's waiting for which locks and what the owner is up to.

XXX pullup-10
2023-07-09 17:10:47 +00:00
msaitoh db06c1e0c0 tprof(8): Add support for Skylake-X and Cascade Lake. 2023-07-07 04:43:15 +00:00
msaitoh 068060949b Modify comment. No functional change. 2023-07-07 04:37:03 +00:00
msaitoh 7c95744288 Add Alder Lake-N. 2023-07-06 02:43:44 +00:00
msaitoh 1f3afd7cc6 CPU model 0x5a is not Atom E3500 but Atom Z3500. 2023-07-05 02:54:37 +00:00
mlelstv d3f564cbbf Don't call UP script when an IP address becomes deprecated. 2023-07-01 12:36:10 +00:00
msaitoh a838dcd9d3 Fix typo. 2023-06-24 05:26:01 +00:00
msaitoh 37a23ecf39 Fix typo in comment. 2023-06-24 05:18:12 +00:00
msaitoh 676286b5ea Fix typo in comment. 2023-06-24 05:12:03 +00:00
uwe fe895c9e5d paxctl(8): brush up
Tell the user how to list flags right away, not at the very end.

Do not repeat "for the program" 6 times for each flag letter, it's a
noise by itself already and the italics of .Ar program exacerbates it.

Make the list of flags compact but manually add breaks between the
pairs of enable/disable flags.
2023-06-23 10:27:12 +00:00
uwe be8e0f9749 paxctl(8): fix markup 2023-06-23 10:12:33 +00:00
wiz d2b8c51a36 Use Fl for options. 2023-06-23 06:32:27 +00:00
rin f598570bdb paxctl(8): Introduce -0 option to clear all PaX flag bits in ELF note.
Part of PR toolchain/52675
2023-06-23 01:56:21 +00:00
nat 76ceaf88d3 Bump date for previous commit.
XXX pullup-10.
2023-06-22 01:35:12 +00:00
mrg 0406bf1d28 adjust for new fontconfig files. 2023-06-21 18:46:06 +00:00
nat 816dd7c3bd Manual page fixups.
Fix EXAMPLES section.

Use correct flags when used with pad(4).
Use correct encoding format (sinear_le).

XXX pullup-10.
2023-06-20 03:24:08 +00:00