Stop clobbering the return value of getenv(3) with strtok(3).
The getenv(3) manual discourages tampering with the returned string.
Instead, copy the value to the heap such that it can be safely modified.
This fixes a bug that Luca Del Re <l.osd at ldr.name>
found on Alpine Linux and reported to bsd.lv.
The consequence of the bug was likely implementation-dependent, but
on both OpenBSD and Alpine Linux, the first colon after the first
byte of the MANPATH variable was set to NUL in the actual environment
of the man(1) process, and this truncated value would later be
passed to the pager child process by execv(3). Hence, while
MANPATH=:mypath1 worked as expected, the pager would only see
MANPATH=mypath1 if man(1) saw any of the following:
MANPATH=mypath1:
MANPATH=mypath1:mypath2
MANPATH=mypath1::mypath2
add missing LDEPs, though there's something strange about this because
upstream's cmake files are using lib<whatever>.so.x.y on linker command
lines rather than -lwhatever.
A specially crafted ELF interpreter binary can trigger a KASSERT() in
vmcmd_map_readvn(). While this points at some deficiencies in
elf_load_file(), we have no intention to supporting such weirdly crafted
binaries (even if they're technically valid). So return EINVAL instead.
ok deraadt@
TIOCGSID can dereference a freed t_session, because we are storing s_leader
in the wrong place. This is a cold hard crash crashes. Some folk are
looking at fixing this properly but it will take some time, so in the meantime
we should just fail the ioctl.
From Acts1632, ok kettenis
devel/py-test-check: update to 2.9.1
ok and suggestion to explicitly list sysutils/py-packaging as a runtime
dependency (instead of indirectly depending on it through devel/pytest) by tb@
Specify the correct "read" and "write" bits to the NVMMU based on the
opcode of the NVMe command. Drop the opcode itself, since it isn't needed.
This allows us to drop the magic "null check" bit that is no longer
supported by the firmware that Apple ships with newer macOS releases.
Based on work done by Sven Peter over at Asahi Linux.
ok jmatthew@