| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
and return an error instead. may prevent some unset/missing confusion.
ok deraadt millert
|
|
|
|
|
| |
getcap->cgetent. pwcache->user_from_uid. And then repair references.
ok jmc
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
does exist -- execv(3). Still call this a family but without "Nm".
Adjust Xr in various pages to refer to the precise function used
rather than the family, in most cases the semantics of execve(2) are
being referenced, so change the Xr.
ok jmc
|
|
|
|
| |
OK guenther@
|
|
|
|
| |
ok guenther jmc
|
| |
|
|
|
|
|
|
|
| |
lock file" would trash errno, creating confusion.
One instance found by richardipsum@fastmail, other two identified from
original commit
ok millert
|
| |
|
|
|
|
|
|
|
| |
have a different calling convention than the standard function...as seen
in kdump output.
ok deraadt@ schwarze@
|
|
|
|
|
|
| |
value < 0. errno is only updated in this case. Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.
|
| |
|
|
|
|
|
|
| |
i.e. those other than LC_CTYPE, into the CAVEATS section, and
standardize wording somewhat.
OK jmc@
|
|
|
|
|
|
| |
to avoid leaking it
ok deraadt@
|
|
|
|
|
|
| |
There is no point in checking permissions of files in root-owned
directories. If it even was a problem, secure_path(3) suffers from
unsolvable TOCTOU issues. OK deraadt@
|
|
|
|
|
| |
shared one manpage.
ok florian@
|
|
|
|
| |
This requires a libc major version bump. OK deraadt@
|
| |
|
|
|
|
| |
Pointed out by naddy@
|
|
|
|
|
|
|
|
| |
POSIX wants it in libc, that's where the function can be found on other
systems. Reported by naddy@, input from naddy@ and guenther@.
"looks ok" guenther@, ok deraadt@
Note: riding the libc/libpthread major cranks earlier today.
|
|
|
|
| |
from Lauri Tirkkonen
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Tweaked diff from brad@
manpage tweaks florian@ and jmc@
ok deraadt@ millert@
|
|
|
|
|
|
|
|
| |
This brings it back in line with the macros.
via Paco A. and the FRRouting project.
ok deraadt@ visa@ guenther@ tb@
|
| |
|
| |
|
|
|
|
|
|
| |
It replaces the existing pwcache.c functions user_from_uid(3) and
group_from_gid(3) with the pax equivalents. Adapted from NetBSD
(mycroft) changes from our own pax's cache.c. OK guenther@
|
|
|
|
|
|
|
|
| |
of the pointer returned by getpw{ent,nam,uid}(). We unmap the
buffer each time to catch callers using a stale passwd struct
pointer. As a special case, we do not unmap the buffer if the
previous lookup was for the same name or uid. This special case
may be removed in the future. OK deraadt@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The introduction of hw.smt means that logical CPUs can be disabled
after boot and prior to suspend/resume. If hw.smt=0 (the default),
there needs to be a way to count the number of hardware threads
available on the system at any given time.
So, import HW_NCPUONLINE/hw.ncpuonline from NetBSD and document it.
hw.ncpu becomes equal to the number of CPUs given to sched_init_cpu()
during boot, while hw.ncpuonline is equal to the number of CPUs available
to the scheduler in the cpuset "sched_all_cpus". Set_SC_NPROCESSORS_ONLN
equal to this new sysctl and keep _SC_NPROCESSORS_CONF equal to hw.ncpu.
This is preferable to adding a new sysctl to count the number of
configured CPUs and keeping hw.ncpu equal to the number of online
CPUs because such a change would break software in the ecosystem
that relies on HW_NCPU/hw.ncpu to measure CPU usage and the like.
Such software in base includes top(1), systat(1), and snmpd(8),
and perhaps others.
We don't need additional locking to count the cardinality of a cpuset
in this case because the only interfaces that can modify said cardinality
are sysctl(2) and ioctl(2), both of which are under the KERNEL_LOCK.
Software using HW_NCPU/hw.ncpu to determine optimal parallism will need
to be updated to use HW_NCPUONLINE/hw.ncpuonline. Until then, such software
may perform suboptimally. However, most changes will be similar to the
change included here for libcxx's std::thread:hardware_concurrency():
using HW_NCPUONLINE in lieu of HW_NCPU should be sufficient for determining
optimal parallelism for most software if the change to _SC_NPROCESSORS_ONLN
is insufficient.
Prompted by deraadt. Discussed at length with kettenis, deraadt, and sthen.
Lots of patch tweaks from kettenis.
ok kettenis, "proceed" deraadt
|
|
|
|
| |
ok krw@
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The latest POSIX description of times(3) (and all others I can find)
suggests that times(3) should return monotonically increasing values
and that these values are only useful for real time interval measurement.
All extant uses of times(3) confirm that this expectation is shared by
application programmers.
So, change gettimeofday(2) to clock_gettime(2)/CLOCK_MONOTONIC to ensure
the return value increases monotonically, even if the system clock is
changed by the superuser. Then update the manpage accordingly.
While we're updating the manpage, move the information about the return
values to a new RETURN VALUES section to bring times.3 up to speed with
other library man pages.
Manpage changes kicked around on tech@ with millert@ and jmc@.
times.3 ok millert@ tb@ jmc@
times.c ok millert@ tb@
|
| |
|
| |
|
| |
|
|
|
|
| |
ok deraadt@, jca@
|
|
|
|
| |
ok jasper@, jca@, deraadt@
|
| |
|
| |
|
|
|
|
|
|
|
| |
requires that, too (in XBD 7.3.1), even though the C standard
leaves it implementation-defined;
found during my kcgi audit on behalf of CAPEM;
OK deraadt (stupid me forgot to commit before lock).
|
|
|
|
| |
code. Adapted from a diff by Ross L Richardson.
|
|
|
|
|
| |
havoc all over the place. So add some casts to silence the compiler.
ok deraadt@ guenther@
|
|
|
|
|
|
| |
Theo already clamped down on these devices last year.
Triggered by a question from Nan Xiao <xiaonan830818 at gmail dot com>.
OK deraadt@
|
|
|
|
|
|
|
| |
cancellation points in POSIX, so change them to invoke the non-cancellation
point versions of open(), close(), nanosleep(), and write()
ok deraadt@ millert@
|
| |
|
|
|
|
|
|
| |
Prompted by Nan Xiao noticing the redundancy of bzero+termination - thanks.
ok deraadt@
|
|
|
|
|
|
| |
Riding previous libc bump.
ok kettenis@
|