Commit Graph

5733 Commits

Author SHA1 Message Date
jschauma f1d394dd63 regen from IANA 2022-11-22 2022-11-28 02:48:33 +00:00
jschauma 4c42df3c76 regen from IANA 2022-09-28 2022-11-28 02:46:58 +00:00
christos ae082add65 lua libm API from Phil Rulon 2022-11-21 22:01:32 +00:00
ozaki-r a97d0b3002 tests: build and install added test files 2022-11-17 08:45:35 +00:00
ozaki-r 3df6c9b812 tests: add tests for invalid extra operations on a shutdown socket
The tests cover some error paths that normally happen.
2022-11-04 08:01:42 +00:00
skrll a856f9893d Provide MI PMAP support on AARCH64 2022-11-03 09:04:56 +00:00
ozaki-r c3619612ae tests: add tests for TCP with nc 2022-11-02 09:37:56 +00:00
jmcneill bf46a11b02 Stop building TISDP2420. 2022-10-29 08:52:47 +00:00
jmcneill 2eecf961dc Remove commented out kernel configs 2022-10-29 08:52:22 +00:00
wiz 6e5a4bb545 MAKEDEV: make nvmm node group-writable (was readable only; group nvmm)
Needed by qemu
2022-09-21 18:55:21 +00:00
riastradh b672ca148d /etc/ssh: Install ssh_known_hosts with mode 644.
Makes it agree with the mtree and more convenient for admin to edit.

XXX pullup-8
XXX pullup-9
2022-08-30 22:36:48 +00:00
riastradh 03cefdfdcf etc: Fix permissions of various editable configuration files.
This way they match the mtree and make sense and don't cause editors
to ask to override read-only files when editing them.

Exception: Not sure /etc/bluetooth/protocols makes as much sense to
edit, but the mtree says 644, so if you want to change it, make sure
to change it in both places -- Makefile and mtree.

XXX pullup-8
XXX pullup-9
2022-08-30 13:40:37 +00:00
riastradh d5d881d693 /root: Install .cshrc and .profile links with the same mode.
Previously we would:

1. Install /root/.cshrc and /root/.profile with mode FILESMODE=644 as
   requested in src/etc/root/Makefile and as echoed in
   /etc/mtree/special.

2. Create hard links at /.cshrc and /.profile through CONFIGLINKS.

3. Because LINKSMODE was unset and defaults to NOBINMODE=444, change
   the mode to 444.

This scenario is confusing, and mtree objects to it, which is bad for
warning fatigue in a security-relevant mechanism.  (There are also
several other files mtree objects to out of the box -- we should fix
those too.)

With this change we install the links with the same mode as the
original files, in agreement with the mtree.  The files, .cshrc and
.profile, are intended to be editable configuration files, so 644
makes sense while 444 makes no sense and gets in the way of editors
like vi.

Discussed on tech-userlevel:
https://mail-index.netbsd.org/tech-userlevel/2022/08/29/msg013498.html

XXX pullup-8
XXX pullup-9
2022-08-30 13:14:48 +00:00
uwe d9eecdb9ca wscons.conf: add commented out config examples for the Terminus font 2022-08-29 15:39:19 +00:00
brook c5a23dac66 By default, do not install any bootable images.
The previous commit introduced the ability to install a set of
bootable images as a normal part of a release build.  While this made
it easy to install bootable images, the contents of a release build
depend on whether or not U-Boot packages are installed in /usr/pkgsrc,
which is the default location searched by installboot(8).

This commit requires users to explicitly list the bootable images to
be installed, which by default is none (i.e., prior behavior).
2022-08-22 16:50:25 +00:00
brook 99f61d3fde Create bootable images in ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/gzimg.
Release builds for arm platforms create compressed images in
${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/gzimg.  However, in some
cases, e.g., armv7.img.gz, they are not bootable.  Consequently, boot
blocks must be manually installed in the images, which is an extra
barrier for testing systems or adopting NetBSD.  This has prompted
creation of external repositories, e.g., armbsd.org, to host a
collection of bootable images.  However, this does not ease the burden
on developers compiling their own systems; for them, manual
installation of boot blocks is still required.

For arm platforms, etc/etc.evbarm/Makefile.inc contains the commands
used to create system images.  Because installboot(8) can write boot
blocks directly to system images, a loop through possible boards can
create a series of bootable images during the normal build process.

In the case of many arm platforms, installboot(8) uses U-Boot boot
blocks, which are not part of the NetBSD source code.  Developers can,
however, install as many U-Boot boot blocks as desired, either in the
default location of /usr/pkg/share/u-boot or in a set of directories
pointed to by the U-Boot search path, the INSTALLBOOT_UBOOT_PATHS
environment variable.  For each board with an available boot block, a
board-specific bootable image will be created in
${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/gzimg.  If a boot block is
not available, which is the typical situation currently, no additional
image will be created.

This facility creates opportunities to build bootable images for any
number of boards within the scope of a standard release build.
However, that is not required and will not occur without the
intervention of installing U-Boot boot blocks prior to the build.
2022-08-21 15:01:08 +00:00
lukem dac6dcb8de Deprecate extsrc/, EXTSRCSRCDIR, MKEXTSRC
Remove support for building extsrc/:
1. Makefile: remove do-extsrc target.
2. build.sh: remove options -y and -Y extsrcdir.
3. distrib/sets: remove support for extsrc in various tools
   including the options -L ext and -y, and the extsrc sets.
4. doc/BUILDING.mdoc: remove docs for extsrc/, EXTSRCSRCDIR, MKEXTSRC (etc)
5. bsd.own.mk and various Makefiles: remove support for extsrc/,
   EXTSRCSRCDIR, MKEXTSRC.

As proposed on tech-kern and tech-userlevel on 2022-01-07
and followed up on 2022-08-21.
2022-08-21 07:10:03 +00:00
riastradh cc725e3507 viocon(4): New virtio tty driver imported from OpenBSD.
viocon* at virtio?

/dev/ttyVI??

Tested under qemu with:

qemu-system-aarch64 ... \
  -device virtio-serial \
  -chardev socket,path=/tmp/ttyVI00,server=on,wait=off,id=ttyVI00 \
  -device virtconsole,chardev=ttyVI00,name=org.NetBSD.dev.ttyVI00 \
  ...

I updated MAKEDEV.conf to create /dev/ttyVI?? on all ports where it
looks likely to work based on:
(a) having pci or a non-pci virtio attachment,
(b) `qemu-system-$ARCH -M ?' mentioned something resembling the port,
    and
(c) `qemu-system-$ARCH -device virtio-serial' launched without
    complaining about the virtio-serial device.

(Criterion (c) excluded sparc and sparc64.)
2022-08-12 11:15:40 +00:00
kre fa7d65a3b6 Add ATF tests for realpath(1)
Note that realpath can act differently for root than for other users
(where an ordinary user will see EACCESS root just barrels right through).

The tests adapt themselves, when run as root, less error cases can be
tested than when run as some other user.
2022-07-21 09:52:48 +00:00
kre 15e7028037 Cleanup the "hup" function - quote properly, and test for the pid
file existing (with something in it) before simply using it, so the
error message can be controlled, rather than just sh's cannot open file msg.
2022-07-21 07:53:28 +00:00
kre d8eb9e45f2 Get rid of the (insulting)
We recommend that you create a non-root account...
message from single user mode shell startups.
2022-07-21 07:51:12 +00:00
kre bd7c53a85d Make this better ... Allow config file for raidN to be found
in /etc/conf/raid/raidN (as well as in /etc/raidN.conf) (less
clutter in /etc).

Allow config files to exist for raids that are autoconfigured (just
skip anything autoconfigured) - this allows a (simplistic) recovery
mechanism if autoconf fails, and makes it simpler to enable/disable
autoconf at will, while keeping the raid working.

While here, add sh quoting where it is needed, and remove it from
where it is pointless.
2022-07-21 07:49:36 +00:00
mrg 355d19546f add libxvct include subdir. 2022-07-14 06:53:40 +00:00
kre 6c36afa3ab If /rescue is at the head of $PATH (which is how it starts out in /rescue/sh
unless changed by something - and has been since NetBSD 3) don't blindly
simply change it to a PATH that doesn't have /rescue in it at all.

This doesn't solve the "/rescue/tar execs /usr/bin/gzip" problem completely,
as if PATH is in the environment when /rescue/sh is started, that one will
override the shell's built in PATH, but this is better than nothing.
2022-07-09 09:43:51 +00:00
tsutsui 34941bda13 Add luna68k specific section 4 man pages.
Taken from mostly OpenBSD/luna88k and partially NetBSD/hp300.
2022-06-12 03:51:13 +00:00
nia b7957d1677 build system: Revert all the recent additions of MK[...] knobs that
allow conditionally disabling the building of certain user space
programs in the 'base' set.

There is not enough consensus that this is the right way and a few
people had strong objections, see source-changes-d@.
2022-06-06 10:56:27 +00:00
rin dd3ee07da4 Introduce libc_aligned.so for evbppc-powerpc32, which provides
strictly-aligned versions of memcmp(3), bcopy(3), memcpy(3), and
memmove(3).

This is used for 403 by ld.so.conf with machdep.no_unaligned variable.

With this library, unaligned memory accesses are significantly reduced
for 403 (from several hundreds to few tens per sec under heavy load);
only ld.elf_so (typically few times per fork) and statically-linked
binaries do such access.
2022-05-30 15:06:54 +00:00
nia 8469593b52 mk: Add a MKPPP flag to exclude pppd(8) and related utilities from
the build
2022-05-29 08:09:59 +00:00
andvar 67cf5ffde0 s/hierach/hierarch/ 2022-05-28 21:57:39 +00:00
nia e994758d71 mk: Add MKFINGER, MKTALK flags for not building
talk, talkd, finger, fingerd.
2022-05-28 14:31:11 +00:00
nia fff9d4a2fe Fix typo. Hopefully this didn't break anyone's build, sorry. 2022-05-28 12:36:56 +00:00
nia f2e2da3feb mk: Add MKNTP, MKTCPDUMP knobs. 2022-05-28 11:17:35 +00:00
nia 6678627ac7 mk: Rename the MKMBONE option to MKMROUTING for greater accuracy and
to match the related kernel config option.
2022-05-25 21:25:46 +00:00
nia f52526086f mk: Allow setting MKDHCPD=no to build base without the ISC DHCP server,
useful for embedded images that don't need to act as one.
2022-05-25 20:44:01 +00:00
nia 30fbdc74a3 mk: Allow building base without the MBONE applications by setting
MKMBONE=no in mk.conf
2022-05-25 10:18:28 +00:00
rillig 345652c15e tests/compress: demonstrate truncation of target file
Reported by Giorgos Keramidas in PR#19722.
2022-05-22 17:55:08 +00:00
andvar f42f89fd6f fix various small typos, mainly in comments. 2022-05-22 11:27:33 +00:00
rin fccec4780a Build OPENBLOCKS_A6 kernel for evbarmv5-e[bl].
It works --- except for:

- mvsata(4) problems (already reported repeatedly)
- NFS root with mvgbe(4) is weird; the system eventually locks up

Yes, we need to fix them...
2022-05-20 16:12:34 +00:00
uwe 069a423686 MAKEDEV.tmpl: make /dev/wsfont world-readable
Now that we have WSDISPLAYIO_LISTFONTS we want users to be able to use it.

NB: older kernels didn't check that WSDISPLAYIO_LDFONT was performed
on wsfont(4) device opened for writing and relied on its restrictive
root-only permissions to restrict who can load fonts.
2022-05-17 11:41:41 +00:00
mrg d254323219 create ./usr/libdata/firmware/radeon same as the non-/usr version
should fix builds for non x86/arm64.
2022-05-15 21:41:56 +00:00
martin 901c0b91c9 PR 56835: fix sshd startup script to only whine about bogus keys it
created if it actualy did create keys (one should thing that a
function called sshd_keygen() only is called to create keys, but
the "precmd" magic makes it run every time sshd is started or stopped).

Patch from Tom Lane, with modifications suggested by kre and a minor
additional cosemtic change.
2022-05-15 11:47:42 +00:00
mrg c90a6d284e install the lower case radeon firmware files into /usr/libdata/firmware.
radeon has different case but same name firmware files.  the lower case
ones are already installed into /libdata/firmware, and to avoid having
to provide some special method to build on systems with case-preserving
file systems (such as macOS), we install the lower case ones in /usr.

this means that anyone that requires the lower case files must either
have /usr as part of the / file system, or manually keep them updated.

last part of PR#54976, though i doubt we'll try to pull up these.

this is enabled on i386, amd64 and arm64.
2022-05-15 00:24:14 +00:00
brad 84213c7105 Like /etc/rc.d/network, add the ability to put a '!' character as the
first character in /etc/gpio.conf and have the rest evaluated in a
shell.  It is useful to be able to do actions after setting up gpio
pins or attaching gpioiic(4).
2022-04-30 13:48:09 +00:00
pgoyette 726aa68aee Add a new test for PR kern/56713 and set to expected_failure for now. 2022-04-29 22:17:49 +00:00
andvar f84252b461 fix various typos in comments and log messages. 2022-04-16 18:15:20 +00:00
riastradh d49616184d membar_ops(3): Add some automatic tests.
These tests run two threads for five seconds each to try to trigger
races in the event of broken memory barriers.  They run only on
machines with at least two CPUs; on uniprocessor systems there's no
point -- the membars can correctly just be (instruction barrier)
no-ops.
2022-04-08 23:35:51 +00:00
riastradh 5640623e4f etc: Sort NetBSD.dist.tests. 2022-04-08 23:14:10 +00:00
andvar 2fa7e14158 fix various typos, mainly in comments, but also log messages, docs, game text. 2022-04-08 10:17:52 +00:00
christos f6ca6d6231 add named plugins directory. 2022-03-06 17:51:42 +00:00
gutteridge 08a9f63190 LOGIN: fix typo in description 2022-03-02 01:55:18 +00:00
alnsn 0e59248afa Enable critical_filesystems_zfs. 2022-02-20 14:42:07 +00:00
alnsn 082b9a1ec4 Small changes in mount_critical_filesystems_zfs
avoid unnecessary eval, switch to $() and -ne.

from kre@, thanks!
2022-02-06 16:23:12 +00:00
alnsn a8b6a164d2 Compare $_mount_es with 0 2022-02-03 21:02:47 +00:00
alnsn ae342f4716 Add mount_critical_filesystems_zfs
The new function is similar to mount_critical_filesystems
but it walks through ZFS datasets and mounts matching entries.
2022-02-03 20:52:44 +00:00
pho 9f39150738 lib/librefuse: Implement FUSE session API and its signal handling functionality 2022-01-22 07:53:05 +00:00
kre ca09957470 Install the missing sh syntax element in the MKDEBUGKERNEL = no test, so
that "continue" is a command as intended, and not an invalid last arg to
the '[' command (the last arg is required to be ']').

Sometime the proverbial someone should go through this and remove all the
obsolete test -o and -a operators, and probably do something with test's
usage of ! as well.   Not today, or not by me anyway.
2022-01-05 01:46:28 +00:00
christos 6eb4570d40 Create empty files for the "extra" kernels. Grr I should fix this properly
(run checkflists after building the kernels)
2022-01-02 20:09:03 +00:00
christos 508aca192c Enable split-debug files for kernels. Enabled by default with MKDEBUG=yes. 2021-12-29 22:22:12 +00:00
christos a3f7d3a6b3 Put back the code to add DEBUG=-g in config and to add the debug kernels
in the kernel sets. Having the .gdb kernels in the EXTRA_KERNELS does not
work, since we only walk through the standard kernels in the Makefile. Also
doing DEBUG=-g in config twice does not hurt.
2021-12-23 14:50:59 +00:00
christos 4aa4344fed Revert previous, not needed MKKDEBUG does it. 2021-12-20 20:20:35 +00:00
christos 814fa5ccf1 PR/55557: Andreas Gustafsson" Introduce a new variable MKDEBUGKERNEL which
as the name implies, includes a netbsd.gdb inside each kernel set:
$ tar -tzvf kern-GENERIC.tgz
-rwxr-xr-x  0 root   wheel 29398264 Dec 19 12:50 ./netbsd
-rwxr-xr-x  0 root   wheel 208125880 Dec 19 12:50 ./netbsd.gdb
2021-12-20 14:41:26 +00:00
maya 8b9ca392fe Add newer nouveau firmware build goo
Symlinks inferred from linux-firmware/WHENCE and compared to a linux distro's
firmware.

Note: said linux distro appears to have some mistakes compared to the
linux-firmware repo in linking ucode_unload.bin to unload_bl.bin and vice
versa in some places.
I didn't replicate this aspect, and lack the hardware to test it.
2021-12-13 23:59:35 +00:00
maya 1eb4f57936 Add amdgpu firmware build goo (disabled) 2021-12-12 20:33:21 +00:00
brad bf53d44167 A driver and user land utility for the Sparkfun Serial Controlled Motor
Driver module as illustrated here:

https://www.sparkfun.com/products/13911

A SCMD module is a ARM SOC simular to a Arduino in front of a motor
driver chip.  The single SCMD module can control two motors and up to
16 additional modules can be chained together using an internal I2C
bus.  One can interface with the SCMD using tty uart commands, SPI or
I2C.  The driver in this commit adds a kernel driver for the I2C and
SPI interfaces.  The command line utility provides a set of
convenience commands that support most of the functions of the SCMD
and is able to use the tty uart mode, SPI user land or the included
kernel driver in a uniform manor.

The use of the SCMD module is mostly for small robots and the like,
but it can control anything that is controllable by voltage.
2021-12-07 17:39:53 +00:00
sborrill 956275fd6a Revert previous. Explicitly load the value of npf or pf 2021-11-30 11:00:29 +00:00
simonb 79395b1711 Add /etc/sshd/ssh_host_ed25519_key* . 2021-11-30 06:21:58 +00:00
uwe ccd5c3ac25 /etc/shells - Add tmux.
We ship tmux in base and tmux can be used as user's default shell.
2021-11-27 18:39:15 +00:00
sborrill bf76deaf12 Load rc configuration based on rcvar, not name, so that correct settings
in /etc/rc.conf.d are loaded.

Usually this does not matter as rcvar and name are set to the same value.
For pf_boot and npf_boot, rcvar is set to pf and npf respectively.

Prior to the change, if:
rc.conf contains nfp=YES
rc.conf.d/npf does not exist

Then:
/etc/rc.d/npf_boot rcvar
outputs:
# npf_boot
$npf=YES

If:
rc.conf contains npf=NO (or is not set)
rc.conf.d/npf contains npf=YES

Then:
/etc/rc.d/npf_boot rcvar
outputs:
# npf_boot
$npf=NO

This means that in the latter case, at boot time the npfctl start command
is never run and the firewall is not operational.
2021-11-26 13:11:36 +00:00
sborrill 1438126a18 Use rcvar=$name syntax consistently in rc.d scripts which makes it easier to
search for rc.d scripts where rcvar differs from name. No functional change.
2021-11-26 12:51:24 +00:00
christos 0a50b87edf Set the path unconditionally to what rc sets it to, so that when running
individual scripts like 'env - /etc/rc.d/syslogd restart' programs like
rcorder are found.
2021-11-06 23:11:43 +00:00
brad 1f3d8cb8fe Driver for the Sensirion SHT30/SHT31/SHT35 temperature and humidity
sensor such as:

https://www.adafruit.com/product/2857

This is a higher priced sensor with a lot of features, including the
ability to do sub-second periodic updates.  The driver supports
everything about the sensor except for the alert pin.
2021-11-06 13:34:39 +00:00
nia 8e79eccae6 Recognize argon2 passwords as valid in daily security reports.
from RVP in misc/56486
2021-11-04 12:40:00 +00:00
skrll c31b12547a Add MIPSSIM{,64} as appropriate 2021-11-03 08:05:39 +00:00
kim 074604b560 Fix grammar in comment (affect vs. effect) 2021-10-28 07:24:40 +00:00
nia 0e837f732b passwd.conf(5): switch default cipher for new user accounts to Argon2id
As well as offering a dynamic amount of iterations and memory usage,
which fits well with NetBSD's goal of running on a diverse range of
hardware devices, Argon2id offers improved resistance to GPU-based
password cracking and side channel attacks.
2021-10-26 20:44:45 +00:00
christos da1070e967 PR/56452: RVP: MAKEDEV should also create /dev/dri/renderD* devices 2021-10-12 17:19:20 +00:00
jmcneill c3146444be efi: Add /dev/efi character device
Introduce a /dev/efi character device that provides a means for accessing
UEFI RT variable services from userland. Compatible with the FreeBSD ioctl
interface for ease of porting their libefivar and associated tools.

The ioctl interface is defined in sys/efiio.h.

To enable support for this on an arch, the kernel needs `pseudo-device efi`
and the MD EFI implementation needs to register its backend by calling
efi_ops_register(). This commit includes an implementation for Arm.
2021-10-10 13:03:08 +00:00
nia 2da9f9a665 Change the default shell of the "toor" user to /rescue/sh
toor is a backup account to be used in case of trouble.

When root's default shell was changed to from /bin/csh to /bin/sh,
toor lost its purpose.

/rescue/sh is an ideal choice here because it's a static binary,
while we've moved to dynamic linking for the rest of the system.

Discussed a few times over the years on tech-userlevel.
2021-10-08 18:02:57 +00:00
skrll dac6eef826 Don't include bsd.own.mk here - none of the other etc.<foo>/Makefile.inc
files do.
2021-10-04 06:50:35 +00:00
jmcneill 582345a779 riscv: Include kernel and bootloader in releasedir.
This change adds a kern-GENERIC set and distributes an INSTALL kernel
along with bootriscv64.efi as part of a standard release build.
2021-10-01 10:38:03 +00:00
maya f9d97969cb Restore MKNOUVEAUFIRMWARE and MKRADEONFIRMWARE and make gpufw set unconditional
Simplifies logic.
(Second commit - first one was partial)

Restoring MK* requested by mrg on tech-kern discussion
https://mail-index.netbsd.org/tech-kern/2021/09/25/msg027695.html
2021-09-26 15:52:40 +00:00
martin 39237b4ead If key generation happens with not enough entropy in the system, add
a warning to motd pointing at entropy(7) and give instructions how to
re-generate the (weak) keys after fixing up entropy.

Add a "keyregen" command, which forces regeneration of all host keys
to simplify the replacement of weak keys.
2021-09-26 10:53:20 +00:00
maya f54624bd74 Move DRM-driver firmware from base to its own set, gpufw
This set is only installed on amd64,i386,evbarm.
This set is installed on minimal installs and on install media, in
case someone needs it for basic driver functionality.

Comments:
Switched to a single MK tunable for it - that is probably unneeded.

An upcoming DRM update will include even fatter firmware, and we'd
like to minimize the impact of it.
2021-09-25 08:54:29 +00:00
christos 79d5820b5e Move the sanitizer libraries from 9.0.0 -> 13.0.0 to match our current clang
version.
2021-09-16 23:32:49 +00:00
rin 62012fa3c6 Build KUROBOX_PRO for evbarmv5eb.
Other marvell-based machines may also work, but not tested yet.
2021-08-30 00:14:45 +00:00
christos 2557380693 Inetd enhancements by James Browning, Gabe Coffland, Alex Gavin, Solomon Ritzow
Described in:
    https://www.mail-archive.com/tech-userlevel@netbsd.org/msg03114.html
And developed in:
    https://github.com/ritzow/src/pull/1

From their notes:

All new functionality should be explained by the updated manpage.

The manpage has been refactored a bit: A new section "Directives"
has been added and the information about default hostnames and
IPsec directives has been moved there, and the new file include
directive information is also there.

getconfigent has the most major changes. A newline is no longer
read immediately, but is called only by a "goto more" (inside an
if(false) block). This allows multiple definitions or directives
to exist on a single line for anything that doesn't terminate using
a newline. This means a key-values service definition can be followed
by another key-values service definition, a positional definition,
or an ipsec, hostname, or .include directive on the same line.

memset is no longer used explicitly to clear the servtab structure,
a function init_servtab() is used instead, which uses a C struct
initializer.

The servtab se_group field is its own allocation now, and not just
a pointer into the user:group string.

Refactored some stuff out of getconfigent to separate functions
for use by parse_v2.c. These functions in inetd.c are named with
the form parse_*()

parse_v2.c only has code for parsing a key-values service definition
into a provided servtab. It should not have anything that affects
global state other than line and line_number.

Some function prototypes, structures, and #defines have been moved
from inetd.c to inetd.h.

The function config_root replaces config as the function called on
a config file load/reload. The code removed from the end of
config(void) is now called in config_root, so it is not run on each
recursive config call.

setconfig(void) was removed and its code added into config_root
because that is the only place it is called, and redundant checks
for non-null globals were removed because they are always freed by
endconfig. The fseek code was also removed because the config files
are always closed by endconfig.

Rate limiting code was updated to add a per-service per-IP rate
limiting form. Some of that code was refactored out of other places
into functions with names in the form rl_*()

We have not added any of the license or version information to the
new files parse_v2.c, parse_v2.h, and inetd.h and we have not
updated the license or version info for inetd.c.

Security related:

The behavior when reading invalid IPsec strings has changed. Inetd
no longer exits, it quits reading the current config file instead.
Could this impact program security?

We have not checked for memory leaks. Solomon tried to use dmalloc
without success. getconfigent seemed to have a memory leak at each
"goto more". It seems like inetd has never free'd allocated strings
when throwing away erroneous service definitions during parsing
(i.e. when "goto more" is called when parsing fields). OpenBSD's
version calls freeconfig on "goto more"
(c5eae130d6/usr.sbin/inetd/inetd.c (L1049))
but NetBSD only calls it when service definitions are no longer
needed. This has been fixed. freeconfig is called immediately before
any "goto more". There shouldn't be any time when a servtab is in
an invalid state where freeconfig would break.
2021-08-29 09:54:18 +00:00
andvar c69f42d323 fix mainly same typos as in my previous commit but outside sys/dev/dm. 2021-08-21 23:00:30 +00:00
mrg 22cfb1f2ea install experimental/* and ext/opt_random.h. they're expected to
be there (and the latter was removed by accident.)

regen for everyone (also picks up missing tgmath.h for many ports.)

fixes build of pkgsrc/databases/mongodb for me.
2021-08-16 06:56:20 +00:00
martin 80f935560b Add directory for new mkdep test binaries 2021-08-12 11:50:42 +00:00
rillig 2e1c5b53fe tests/lint: add test skeletons for messages from lint2 2021-08-05 22:36:07 +00:00
mlelstv c413ec6508 Reverse devpubd dependeny to avoid dangling reference to zfs which is
an optional part of the build.
2021-08-03 05:15:20 +00:00
mlelstv ad07108f16 Run devpubd before volume managers and pseudo disks. 2021-07-31 14:47:04 +00:00
jmcneill 7451feb941 aarch64: Restrict KERNEL_SUFFIXES to img only 2021-07-24 17:07:59 +00:00
jmcneill 065fe7e8c6 smbios: Add character device for accessing SMBIOS tables
The /dev/smbios character device gives an aperture into physical memory
that allows read-only access to the SMBIOS header and tables.
2021-07-24 11:39:18 +00:00
ozaki-r 83b6f2d1d3 tests: add tests for ALTQ CBQ 2021-07-14 03:22:33 +00:00
tsutsui 78a0766dec Create rd3 device nodes, for HPDisk. 2021-07-09 19:01:29 +00:00
nia f3c68eb2b0 Remove uscanner(4) driver
This exists for compatibility with a Linux interface which was apparently
deprecated in Linux 2.6. There are various mailing list threads going
back to 2004 where the usefulness of this driver is discussed, but
the conclusion is that scanner software has all moved to using ugen(4)
instead, and enabling this driver will not help you scan things.
2021-06-29 10:22:33 +00:00
mlelstv b259e1d9fc run sysctl early enough. 2021-06-13 10:14:40 +00:00
joerg 53d1339bf7 Update LLVM build system for 249b40b558955afe5ac2b549edcf2d7f859c8cc9
This enables the use of modules for a significant build performance gain
when building with clang as host compiler or when using HAVE_LLVM=yes.
Switch libc++ to using the copy from the mono-repo.
2021-05-30 01:56:44 +00:00
thorpej 2d410374f0 Provide a binary/kernel/netbsd-GENERIC.QEMU.gz in the Alpha release
hierarchy.  This is identical to netbsd-GENERIC, except it has been
dbsym'd so that the kernel symbols are available when running under
Qemu (which loads the kernel directly, but does not load the symbol
table).
2021-05-29 18:48:45 +00:00
rin 759be7cf05 Switch arm64.img to big-endian for aarch64eb, as libsa/efiboot support
bi-endian FFS/disklabel now.

Many thanks to mrg@ for working on this!!
2021-05-27 08:43:02 +00:00
christos cb128adb3d use the date tool 2021-05-26 20:22:28 +00:00
yamaguchi f0101d0e08 Add a new link-aggregation pseudo interface named lagg(4)
- FreeBSD's lagg(4) based implementation
 - MP-safe and MP-scalable
2021-05-17 04:07:41 +00:00
rin 0c720f9cde Turn on constty instead of ttyE0 as done for majority of other ports
in order to make both framebuffer and serial consoles happy.

Also, change TERM from vt220 to vt100 for console and constty
in accordance with other ports.
2021-05-08 10:08:33 +00:00
mrg 3a8103109b update for libX11 1.7.0. 2021-04-27 06:51:49 +00:00
christos d25e0fedfb Handle mipsn64 2021-04-25 23:40:51 +00:00
mrg af9b7ed461 create the gcc-10 subdirs, and don't create the gcc-8 ones. 2021-04-12 02:09:27 +00:00
christos 637547d0a7 refresh with latest 2021-04-08 19:03:43 +00:00
rin 385a602eeb - Hook DHT kernel
- Add bin and ub to KERNEL_SUFFIXES
- Group and sort kernels
2021-04-02 07:08:36 +00:00
christos 5e0abed52f add named plugin dir 2021-03-31 04:58:01 +00:00
christos d80018d9b8 handle copying of plugins to the chroot 2021-03-31 04:57:25 +00:00
sborrill 4f6c3ffcd1 Need to explicitly load value of zfs variable as zfs=YES may be set in
/etc/rc.conf.d/zfs, not /etc/rc.conf.
2021-03-09 12:42:46 +00:00
christos b60051daa5 require NETWORKING otherwise amd can come up before the network is up and
it needs to be able to do DNS.
2021-03-01 23:02:30 +00:00
jakllsch 531ea916a2 Add /etc/ip6addrctl.conf as optional file so it is backed up. 2021-02-26 18:39:10 +00:00
rin 486b89c051 For ramdisk image, generate only 2 pairs of pty devices, instead of 16,
in order to save space further.
2021-02-25 07:58:39 +00:00
hannken 0c0601776b Enable "/etc/zfs/exports" from "zfs share" in rc.d/mountd and rc.d/mountall. 2021-02-16 10:02:42 +00:00
pgoyette 0d15fa02aa Add KERNEL_DIR to /etc/release
"Sure, why not" from xtos!
2021-02-14 18:45:44 +00:00
martin b2434f4d17 llvmlockdir -> lvmlockdir 2021-01-26 15:08:02 +00:00
martin 9869002d85 Rename etc/rc.d/llvmlockdir to lvmlockdir - it has nothing to do with LLVM,
the name probably was a freudian slip of my fingers when I split that
fragment out of another rc.d script.
2021-01-26 13:31:19 +00:00
rillig a5778d2e53 lint: install custom stdbool.h, used for strict bool mode 2021-01-17 19:32:52 +00:00
rillig 93104a9b2f lint: remove custom stdbool.h for strict bool mode again
Adding it broke the official builds.
2021-01-16 22:18:14 +00:00
rillig ea370484da add directory /usr/libdata/lint/strict-bool
This is needed for usr.bin/xlint/xlint.
2021-01-16 20:30:05 +00:00
riastradh cba96d16f7 Various entropy integration improvements.
- New /etc/security check for entropy in daily security report.

- New /etc/rc.d/entropy script runs (after random_seed and rndctl) to
  check for entropy at boot -- in rc.conf, you can:

  . set `entropy=check' to halt multiuser boot and enter single-user
    mode if not enough entropy

  . set `entropy=wait' to make multiuser boot wait until enough entropy

  Default is to always boot without waiting -- and rely on other
  channels like security report to alert the operator if there's a
  problem.

- New man page entropy(7) discussing the higher-level concepts and
  system integration with cross-references.

- New paragraph in afterboot(8) about entropy citing entropy(7) for
  more details.

This change addresses many of the issues discussed in security/55659.
This is a first draft; happy to take improvements to the man pages and
scripted messages to improve clarity.

I considered changing motd to include an entropy warning with a
reference to the entropy(7) man page, but it's a little trickier:
- Not sure it's appropriate for all users to see at login rather than
  users who have power to affect the entropy estimate (maybe it is,
  just haven't decided).
- We only have a mechanism for changing once at boot; the message would
  remain until next boot even if an operator adds enough entropy.
- The mechanism isn't really conducive to making a message appear
  conditionally from boot to boot.
2021-01-10 23:24:25 +00:00
martin 80e3db0075 If MKX11 and MKDEBUG, add the xdebug set to the obsolete file handling. 2020-12-29 16:46:44 +00:00
martin 5dd83105b3 Adjust to "pool" usage in our standard ntp.conf, pointed out
by Connor McLaughlan.
2020-12-25 13:42:02 +00:00
uwe c34ee3711d run_rc_command - don't prefix the rcvar variable name with the dollar sign.
The output without the dollar sign is less confusing as it's actual
valid shell syntax:

  $ /etc/rc.d/foo rcvar
  # food
  food=YES

Brought up on tech-userlevel@ by Rocky Hotas with some LGTMs from
other people and no objections.

We still refer to '$food' in warnings/errors though.
2020-12-20 21:30:28 +00:00
pgoyette 56b2bfc290 Add directory entry for new libossaudio test 2020-12-12 02:50:26 +00:00
jmcneill 161b30af53 acpi: add character device for accessing ACPI tables
The /dev/acpi character device gives an aperture into physical memory
that allows only read access to known ACPI tables: RSDP, XSDT/RSDT, and
the root tables. Adapt acpidump(8) to use this interface by default,
falling back to the old /dev/mem method if it is not available or if
ACPIDUMP_USE_DEVMEM=1 is set in the environment. The user visible benefit
of this change is that "options INSECURE" is no longer required to
dump ACPI tables.
2020-12-06 02:57:29 +00:00
wiz d5fdd803ef Update default pkgsrc database location from /var/db/pkg to /usr/pkg/pkgdb. 2020-12-02 14:18:13 +00:00
rin 7f6948285e Build RPI and RPI2 kernels also for earmv6{,hf}eb. 2020-12-01 04:20:21 +00:00
kamil a0bbc3d2d8 man.conf(5): Drop support for .me files
The .me troff macros are unused for any known man-pages.
2020-11-30 14:27:23 +00:00
riastradh 0be824883b Simplify default motd text and include donation link. 2020-11-25 21:40:22 +00:00
tsutsui 10596905a4 Create wd0 and wd1 device node for G1IDE kernel. 2020-11-25 15:14:03 +00:00
martin 9b9b5e208c Add /dev/pts as standard mountpoint for a ptyfs. 2020-11-23 12:41:47 +00:00
christos 80a97e389b Add /var/games/warp 2020-11-11 19:56:09 +00:00
kamil 994be4e978 Reintroduce the support of MKCATPAGES
Requested by <mrg>
2020-11-10 21:47:40 +00:00
rin 4bfe1533f7 Add nvme(4) and raid(4). 2020-11-10 11:22:22 +00:00
kamil fa9b238449 + ./usr/share/games/warp 2020-11-10 10:31:48 +00:00
rin 571f6efb48 Add nvme(4) and raid(4). 2020-11-10 08:52:36 +00:00
kamil 17e0cdd2e4 Remove the catman directories
No longer relevant after the MKCATPAGES removal.
2020-11-09 01:07:04 +00:00
christos 1501493b50 Add col tests 2020-11-01 22:29:13 +00:00
kamil 990d4b76d9 Register the usr/share/gdb dir 2020-10-24 07:03:00 +00:00
kim 063923df4b network: Update rtsol options
- Use "-6" instead of "--noipv4" as it seems more appropriate based on
  the dhcpcd(8) manual page.
- Remove "-f /dev/null" as it seems unnecessary with "-6".
- Remove "--persistent" as it is in the default /etc/dhcpcd.conf,
  and this way the user can change it, if they would like to (either
  through dhcpcd_flags or by editing /etc/dhcpcd.conf).

The "-b" (or "--background") option is needed to avoid a timeout error
message (and a delay in booting), so it is still left in place.
2020-10-16 15:31:04 +00:00
mgorny 268edb6f45 Add tests for process_xmm_to_s87() and process_s87_to_xmm() 2020-10-15 17:44:44 +00:00
kim f5010e6cd4 Update "rtsol" keyword: leave IPv6 autoconf on
There is no need to turn off ipv6_autoconf or dhcp6 in dhcpcd to match
the previous behaviour with in-kernel RA processing.
2020-10-15 07:05:27 +00:00
kim 2f25d90010 Make "rtsol" functional again. 2020-10-11 22:38:48 +00:00
jnemeth dcf9d0d48c Also edns-udp-size. 2020-10-11 22:14:55 +00:00
jnemeth db7cb834a5 Set max-udp-size as per DNS flag day 2020, see
https://www.isc.org/blogs/dns-flag-day-2020-2/ .
2020-10-11 22:11:36 +00:00
kim a477b03dfb Add iburst to peer and server. 2020-10-05 06:45:40 +00:00
kim eb131804a5 Use "pool" for the pool.ntp.org servers. Add some new hints.
- Use the "pool" keyword for obtaining servers from ntp.pool.org.
  - Add "tos minclock" and "tos maxclock" to limit the number of servers.
  - Add "restrict source" to apply appropriate restrictions to servers.
    (Specifically "nopeer" cannot be applied to "pool" servers.)
  - A single "pool" entry suffices -- using "2.netbsd.pool.ntp.org" so
    that we get both IPv4 and IPv6 addresses. (No addresses are returned
    for just "netbsd.pool.ntp.org.")
- Add a comment about "tinker panic 0" -- useful for VMs and laptops.
- Add a comment about "discard minimum" -- useful for some SNTP clients.
- Add an explanation for the "limited" restriction keyword.
- Unify whitespace and comment formatting.
2020-10-04 13:50:44 +00:00