summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen (follow)
Commit message (Collapse)AuthorAgeFilesLines
* setting uid to -1 won't work with setresuid, so detect that conditiontedu2019-10-181-1/+19
| | | | | and return an error instead. may prevent some unset/missing confusion. ok deraadt millert
* More correction of section 3 layout. directory->opendir, fts->fts_open,deraadt2019-09-027-59/+36
| | | | | getcap->cgetent. pwcache->user_from_uid. And then repair references. ok jmc
* ypclnt -> yp_bind;jmc2019-08-301-3/+3
|
* mop up stdarg rename; ok deraadtjmc2019-08-301-3/+3
|
* No specific called "exec(3)", so move primary manpage to a name whichderaadt2019-08-113-14/+10
| | | | | | | | 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
* Replace cross-references to sigvec(3) with sigaction(2).millert2019-07-261-5/+3
| | | | OK guenther@
* improve verb-tense for explaining the calling convention of __deraadt2019-07-051-3/+3
| | | | ok guenther jmc
* snprintf/vsnprintf return < 0 on error, rather than -1.deraadt2019-07-031-2/+2
|
* The "always hint that getpw operation is happening with access() the YPderaadt2019-07-023-3/+16
| | | | | | | lock file" would trash errno, creating confusion. One instance found by richardipsum@fastmail, other two identified from original commit ok millert
* tweak previous; ok guentherjmc2019-06-301-5/+6
|
* Document that getcwd() and realpath() are built on system calls thatguenther2019-06-291-2/+17
| | | | | | | have a different calling convention than the standard function...as seen in kdump output. ok deraadt@ schwarze@
* When system calls indicate an error they return -1, not some arbitraryderaadt2019-06-2817-55/+55
| | | | | | 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.
* delete duplicate .Xr below SEE ALSOschwarze2019-06-281-3/+2
|
* More consistently put remarks about the less useful LC_* categoties,schwarze2019-05-163-6/+37
| | | | | | i.e. those other than LC_CTYPE, into the CAVEATS section, and standardize wording somewhat. OK jmc@
* The fd used by nlist() isn't application visible, so mark it close-on-execguenther2019-05-131-2/+2
| | | | | | to avoid leaking it ok deraadt@
* Remove useless secure_path(3) calls.millert2019-03-232-25/+12
| | | | | | 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@
* remove a sentence that was once helpful when dirname.3 and basename.3benno2019-03-081-3/+3
| | | | | shared one manpage. ok florian@
* Make gl_pathc, gl_matchc and gl_offs size_t in glob_t to match POSIX.millert2019-02-042-25/+24
| | | | This requires a libc major version bump. OK deraadt@
* I am retiring my old email address; replace it with my OpenBSD one.millert2019-01-2517-40/+40
|
* Restore .Xr to pthread_sigmaskjca2019-01-131-3/+4
| | | | Pointed out by naddy@
* Move sigwait(3) from libpthread to libcjca2019-01-123-3/+153
| | | | | | | | 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.
* getgruid_r -> getgrgid_rtb2018-12-281-3/+3
| | | | from Lauri Tirkkonen
* Mention aligned_alloc(), prompted by Brad; ok jmc@otto2018-11-051-4/+6
|
* typo; fix from hiltjo posthumaderaadt2018-10-311-3/+3
|
* use Mdocdate;jmc2018-10-301-2/+2
|
* Add C11's timespec_get(3); minor bump for libc.guenther2018-10-303-3/+136
| | | | | | Tweaked diff from brad@ manpage tweaks florian@ and jmc@ ok deraadt@ millert@
* Fix a "copy-and-paste" error that Coverity picked up in the augment codedlg2018-10-091-2/+2
| | | | | | | | This brings it back in line with the macros. via Paco A. and the FRRouting project. ok deraadt@ visa@ guenther@ tb@
* Correct the uid_from_user() and gid_from_group() comments.millert2018-09-221-7/+7
|
* missing comma in previous;jmc2018-09-131-2/+2
|
* Add uid_from_user() and gid_from_group(), derived from pax's cache.c.millert2018-09-133-86/+442
| | | | | | 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@
* Use an mmap()'d buffer instead of a static buffer for the contentsmillert2018-08-213-80/+136
| | | | | | | | 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@
* Add hw.ncpuonline to count the number of online CPUs.cheloha2018-07-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* <sys/mount.h> and <sys/swap.h> no longer require <sys/param.h>guenther2018-04-271-3/+3
| | | | ok krw@
* improve markup quality in the cases found by the new "--" style messageschwarze2018-03-161-5/+4
|
* Return monotonically increasing values.cheloha2018-03-022-27/+32
| | | | | | | | | | | | | | | | | | | | | 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@
* Adjust references for sysctl(3) to sysctl(2)deraadt2018-01-125-18/+18
|
* sysctl(3) can now be renamed to sysctl(2)deraadt2018-01-122-2259/+2
|
* Fix spelling: bet -> net from Scott Bennett, thankstb2017-11-071-3/+3
|
* No need to include <sys/param.h> before <sys/sysctl.h>.mpi2017-10-281-3/+3
| | | | ok deraadt@, jca@
* Use <elf.h> instead of <elf_abi.h>mpi2017-10-271-2/+2
| | | | ok jasper@, jca@, deraadt@
* add missing HISTORY; based on CVS logs and release announcementsschwarze2017-10-172-8/+18
|
* draft-ietf-tcpm-initcwnd was published as rfc 6928mikeb2017-10-161-3/+3
|
* iscntrl(0) is != 0 at least since Version 7 AT&T UNIX, and POSIXschwarze2017-10-041-3/+3
| | | | | | | 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).
* Document readdir_r() return value and update style of the examplemillert2017-09-181-6/+9
| | | | code. Adapted from a diff by Ross L Richardson.
* __progname has type char *, we cannot change its type without causingotto2017-09-171-3/+3
| | | | | havoc all over the place. So add some casts to silence the compiler. ok deraadt@ guenther@
* Update the documentation regarding /dev/mem and /dev/kmem;schwarze2017-09-121-2/+4
| | | | | | Theo already clamped down on these devices last year. Triggered by a question from Nan Xiao <xiaonan830818 at gmail dot com>. OK deraadt@
* shm_open(), sysconf(), tcflow(), and tcsendbreak() are not permitted to beguenther2017-09-102-6/+6
| | | | | | | cancellation points in POSIX, so change them to invoke the non-cancellation point versions of open(), close(), nanosleep(), and write() ok deraadt@ millert@
* Fix spelling of 4.3BSD-Net/2.schwarze2017-09-101-3/+3
|
* sysctl strings include the termingating NUL character in both in and out lengthstom2017-09-101-2/+4
| | | | | | Prompted by Nan Xiao noticing the redundancy of bzero+termination - thanks. ok deraadt@
* Remove unused 32bit version of elf_hash().mpi2017-09-052-61/+2
| | | | | | Riding previous libc bump. ok kettenis@