Commit Graph

5697 Commits

Author SHA1 Message Date
abs 011f078b4d Add support to npf_rules to rc.conf
- Allows overriding default from /etc/npf.conf
- Indicate rules file used in output
- Drop check for file presence in script - rely on npf exiting with error
2023-10-05 08:19:27 +00:00
gutteridge b23f276898 resize_root: quote $rootdev consistently in resize_ffs(8) calls 2023-10-04 00:04:42 +00:00
riastradh 555079d39b /etc/rc.d/certctl_init: Default off.
Otherwise in systems without certctl_init=YES, such as systems
installed with sysinst(8) where it's unnecessary because the rehash
has already happened at install time, you'll get spurious warnings.

PR install/57629

XXX pullup-10
2023-09-27 01:27:32 +00:00
riastradh bb38adb487 /etc/rc.d/cerctl_init: New script for certctl rehash in live images.
This is very limited -- it does not supplant postinstall to rehash
certificates on upgrade; it only runs certctl rehash if
/etc/openssl/certs is an empty directory, as you get in live images
not created with sysinst.

We could also have a more general-purpose way to run postinstall(8)
on first boot of an image, but that has a lot more moving parts to
think about, so let's start with this limited-scope low-risk
approach.

PR install/57629

XXX pullup-10
2023-09-27 00:24:12 +00:00
riastradh 24bd4d73cb certctl(8): Install certs.conf in /usr/share/examples too.
This way postinstall(8) can refer to the default one when you've done
an upgrade without etcupdate or similar to pull in new config files
from etc.tgz.

Not great -- we should do this systematically for all config files in
/etc, but this one-off hack is less risky for 10.
2023-09-03 18:31:01 +00:00
riastradh f743f689fc etc/mtree/special: Fix spaces/tabs.
No functional change intended.
2023-09-02 17:39:43 +00:00
martin f592fe5c33 Now that we have /etc/openssl/certs.conf mentioned here, also
list /etc/openssl.
2023-08-30 08:09:38 +00:00
riastradh ae64820710 certctl(8): Set certs.conf 644 and add it to etc/mtree/special. 2023-08-28 23:57:24 +00:00
rillig 92925e854e tests/usr.bin/error: add basic tests for several error message styles 2023-08-26 10:06:16 +00:00
riastradh 427e5e62a8 mozilla-certdata: Connect it up to the build. 2023-08-26 05:58:48 +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
riastradh 22a55953ad etc/mtree/NetBSD.dist.tests: Update for new compat linux tests. 2023-08-20 10:27:11 +00:00
mrg dc52c1af5c add gcc 12 subdirs, remove gcc 9. 2023-08-01 06:46:52 +00:00
tron ac6e544e51 Resolve the port 2049 conflict by commenting out the entries for "shilp".
Now "netstat" will produce sensible output for NFS connections again.
2023-07-30 09:09:38 +00:00
mlelstv e6c0de6292 Don't specify a volume alias if none is given instead of using a default
name. Otherwise iscsictl fails for using non-unique names if more than
one volume is used.
2023-07-22 10:31:35 +00:00
kim 00ac86982a Remove backwards compat. 2023-07-22 08:51:28 +00:00
martin 1095510aed Fix sysctl invocation testing for missing entropy. 2023-07-05 12:07:21 +00:00
nia 3e3774f9ae Fix typo in comment. 2023-07-02 12:39:05 +00:00
riastradh e857694c31 rc.conf(5): Set entropy=wait by default.
We no longer block indefinitely -- if nothing else, the hardclock
timer should yield enough samples to unblock /dev/random on all but
the most severely deterministic machines -- so it should be generally
safe for availability to set entropy=wait.

This doesn't guarantee that HWRNG/seed has been provided before you
run ssh-keygen or call getentropy(3) in a user application, but it
does raise the security above netbsd<=9.

PR security/55659
PR lib/56905

XXX pullup-10
2023-06-30 21:44:09 +00:00
riastradh 2cfa14dfd4 security(5): Check kern.entropy.needed for confident entropy.
Don't test whether a non-blocking read from /dev/random would return
data.

For the sake of availability, /dev/random will unblock based on sources
like timer interrupts, which we can't confidently assert anything about
the actual unpredictability of.

Here, the goal is to highlight systems that have neither obtained
entropy from an HWRNG with a confident entropy assessment, nor been
seeded from a source the operator knows about.

XXX pullup-10
2023-06-30 21:42:29 +00:00
riastradh c4717c3f66 pam: Disable pam_krb5, pam_ksu by default.
These are not useful unless you also set up /etc/krb5.conf and a
keytab for the host from the Kerberos KDC.  But having them enabled
by default means that creating /etc/krb5.conf just to enable use of
Kerberos for _client-side_ single sign-on creates usability issues.

As proposed on tech-security:
https://mail-index.netbsd.org/tech-security/2023/06/16/msg001160.html
2023-06-20 22:00:00 +00:00
lukem 922f5e2588 more NBUILDJOBS deprecation
The NBUILDJOBS option was deprecated in 2002;
there's no need to keep warning about it,
remove from params / show-params,
and only document as obsolete.
2023-06-11 10:43:51 +00:00
kim fe60335256 Add some backwards compat. Adjust grammar. 2023-06-10 04:02:39 +00:00
riastradh 64ad67ce6d /etc/rc.d/sshd: Use default curve for ECDSA keygen, not NIST P-521.
The default is NIST P-256, which:

(a) has plenty of cryptanalytic security,
(b) performs better on essentially all platforms (smaller enough that
    even the advantage of the Mersenne prime structure of P-521 can't
    compete), and
(c) likely gets more scrutiny on implementations than P-521 since it's
    more widespread.
2023-06-05 11:59:12 +00:00
riastradh dba4ddf6b7 /etc/rc.d/sshd: Stop generating DSA host keys by default.
If you want them you can generate them yourself, but in this day and
age (Monday and 2023, specifically) there's no reason to be using DSA
except for compatibility with ancient legacy software.
2023-06-05 11:51:19 +00:00
lukem a84ebf3fbc etc.sparc64: remove obsolete MK32BITLIBS
As there's a functional MKCOMPAT implementation, and
MK32BITLIBS=yes hasn't worked since 2002 (and noone
noticed the latter), remove obsolete MK32BITLIBS code.

Per confirmation from martin@, mrg@, and riastradh@ on ICB.
2023-06-02 20:49:07 +00:00
lukem e3f25515e3 etc.sparc64: fix syntax errors in MK32BITLIBS=yes
sparc64 snapshots with MK32BITLIBS=yes has been broken
because of make(1) and sh(1) syntax errors since
my change in revision 1.18 on 2002-12-03, when
snap_md_pre target was deprecated...
Move the rules to snap_md_post and fix the syntax errors.

The cross-build make snapshot snapbecause of the missing
$TOOLDIR/bin/sparc--netbsdelf-gcc due to the invocation
with SPARC32_ENV=MACHINE=sparc MACHINE_ARCH=sparc.
A separate issue to resolve.

(It seems MK32BITLIBS hasn't worked for 20+ years and
noone noticed! Do we need it?)
2023-06-02 14:32:04 +00:00
lukem db689ccb2d etc.hp300, etc.sparc64: fix MKUPDATE handling
UPDATE was replaced with MKUPDATE 20 years ago,
but these directories were missed in the conversion.
2023-06-02 14:25:35 +00:00
riastradh 1bca1b82cb Revert "openssl: Nix build goo for dynamically loaded engines."
Turns out there is a regression lurking here: the devcrypto engine
was made dynamic-only (https://github.com/openssl/openssl/pull/7859),
so to maintain that functionality, we need to build dynamic engines.
Will fix the aarch64 build issue and wire things up separately.
2023-05-26 22:26:10 +00:00
riastradh 6377aad786 openssl: Nix build goo for dynamically loaded engines.
- Engines are deprecated in openssl 3.

- We never actually had the .so engines wired up to be built in
  openssl 1.1, and judging by the lack of obsolete entries in the set
  lists, I don't think we ever had them wired up to be built at all.
2023-05-26 13:21:51 +00:00
riastradh 7e9d04fc5d /etc/rc.d/sshd: New check cmd and reload precmd.
- check cmd: run `sshd -t' to check sshd_config file

- reload precmd: run check cmd before reloading so we don't nuke sshd
  if there's an error in the sshd_config file

(It is still possible to effectively nuke sshd by changing the
configuration tosomething that won't work on your network, but at
least we avoid making sshd just exit on reload when you make a typo
in a config option.)

XXX pullup-9
XXX pullup-10
2023-05-26 10:44:59 +00:00
mlelstv dc30f1e972 iscsictl uses authentication types (n)one, (c)hap and mutual (C)hap. 2023-05-21 12:02:43 +00:00
hauke 1958a15c49 Creating Type&Creator mappings for .bin (macbinary encoded) files,
mkisofs changes files, then turns around and complains they have been
changed.

This is a self-inflicted wound, so demote the error to a warning.

Reported upstream as <https://codeberg.org/schilytools/schilytools/issues/58>.

Arguably fixes PR toolchain/42166

Request pull-ups to netbsd-{8,9,10}.

XXX What about macppc?
2023-05-19 14:47:16 +00:00
christos bbcb423864 Add the engines directory too (hannken)
Note that we don't install engines now, but we could.
2023-05-16 18:57:49 +00:00
christos ae5e80608e OpenSSL entries are handled by NetBSD.dist.compat 2023-05-16 13:20:38 +00:00
christos bd01b1e6b8 add more OpenSSL-3.x 2023-05-15 21:13:07 +00:00
christos ad56910fbe Add openssl files 2023-05-15 19:03:23 +00:00
christos 4ee2c276d4 add openssl files 2023-05-15 19:02:34 +00:00
christos fe019e1f32 undo previous 2023-05-14 17:21:53 +00:00
christos 1936c0799b try to fix the build. 2023-05-14 12:45:56 +00:00
riastradh 283c6b4be3 openssl compat: Try this again!
compatdir appears to be for things like /usr/lib that have
/usr/lib/eabi as a subdirectory, so for /usr/lib/openssl it would
mean we have /usr/lib/openssl/eabi as a subdirectory.  But that's not
what we have; we have /usr/lib/eabi/openssl.

Let's try using NetBSD.dist.compat.in instead, which appears to be
intended for this purpose, from what I can gather.
2023-05-14 11:04:56 +00:00
mrg 877aec1b8e mark /usr/lib/openssl and /usr/lib/openssl/modules as "compatdir".
remove them as explicit part of all arm64 builds when they're only
(currently) used and consumed by llvm builds.

this fixes gcc builds and i don't think it breaks llvm ones though
i'm still waiting for that test.
2023-05-14 07:07:23 +00:00
riastradh bf2355496c aarch64: New directories for compat openssl on aarch64.
Hope I got the setlist tags right, not really sure how this works.
2023-05-13 13:04:14 +00:00
christos 147b6c818d switch sparc64/aarch64 to OpenSSL-3.x 2023-05-11 17:57:14 +00:00
christos 4c4e8cbe77 Add missing path for MKCOMPAT=no from Adam 2023-05-11 11:58:55 +00:00
christos 68eba3fad5 new openssl directories 2023-05-10 15:52:50 +00:00
skrll 75b842b847 RISC-V support that works on QEMU with a single hart.
Thanks for Simon Burge for plic(4).
2023-05-07 12:41:45 +00:00
nikita f0dad708b3 Resolve conflicts for lua 5.4.4 import.
Adjust various files for lua 5.4.4.
2023-04-16 20:46:16 +00:00
mlelstv 469d9aaeac Handle missing auth file.
Skip empty lines.
2023-02-18 07:51:52 +00:00
tsutsui 42aea38f3c Build a RAMDISK root kernel on NetBSD/next68k release build.
No sysinst(8) yet, but useful on bootstrap and rescue ops.
2023-02-11 19:12:31 +00:00