summaryrefslogtreecommitdiffstats
path: root/lib/libc (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* delete old lint ARGSUSED commentsguenther2015-11-011-8/+1
|
* Invoke the _HIDDEN() sigprocmask label rather than the public one.miod2015-10-312-8/+10
|
* This is sigprocmask, not sigpending.miod2015-10-311-2/+2
|
* Do not include a timestamp in the syslog message. There is no need --deraadt2015-10-313-35/+13
| | | | | | | | syslogd will fill it in immediately upon reception on the other side of sendsyslog(2). Our libc only talks to our syslogd, which will fix the timestamp before forwarding. syslog_r has done this for a long time already. ok tedu bluhm
* For getgrent.3:guenther2015-10-303-28/+36
| | | | | | | | | | | | | | | - delete the commented out setgrfile bits, as well as the MLINK - rename getgr{nam,gid}_r()'s 'buffer' parameters to 'buf' to be consistent with getpwnam(3) and practically all other section 3 manpages - we have sysconf(_SC_GETGR_R_SIZE_MAX) now, so uncomment and revise the text For getpwnam.3: - rename buflen to bufsize for consistency - rewrite the description of the getpw{nam,uid}_r functions to match the better getgr{nam,gid}_r() description, adding sysconf() bits Add sysconf(3) to SEE ALSO for both encouraged by schwarze@ ok millert@
* update text to be more like posix, in particular wrt length = 0tedu2015-10-291-18/+9
|
* (struct timezone *)0 -> NULL, while I'm here.mmcc2015-10-291-2/+2
|
* We are always using _PATH_RESCONF, so no need to remember the path oneric2015-10-283-21/+6
| | | | | | the resolver. ok millert@ deraadt@
* Remove support for [addr]:port syntax from the "nameserver" line.deraadt2015-10-281-22/+1
| | | | | | | This extension never made it to other systems. (pledge is also happy with this. The idea of DNS @ any port collides with pledge encouraring differentiation between DNS and non-DNS sockets) ok phessler jung sthen kettenis
* Rewrite the mbtowc(3) page for clarity. Explain what needs to be done on error.stsp2015-10-281-42/+54
| | | | | With input from jmc, zhuk, schwarze, and bentley. ok jmc zhuk bentley
* Wrap the remaining math functions in libc: __fpclassify*(), __flt_rounds(),guenther2015-10-2725-30/+113
| | | | | | and ldexp(). ok millert@
* The fd of the passwd database is marked close-on-exec nowguenther2015-10-272-14/+8
| | | | | Incorrect text pointed out by tedu@ ok deraadt@ millert@ tedu@
* don't keep the passwd database open; callers do not expect that they willtedu2015-10-261-11/+1
| | | | | become responsible for calling endpwent. ok deraadt
* Wrap waitpid() so calls go direct; weaken wait() and wait3().guenther2015-10-254-12/+34
| | | | Strip out unnecessary #includes and use NULL instead of (struct rusage *)0
* Move the _atfork_list definition to atexit.c so that the fork syscall stubguenther2015-10-252-5/+6
| | | | | | doesn't get pulled into all static executables ok millert@ jca@
* Hide __atexit and __atexit_register_cleanup()guenther2015-10-255-8/+12
| | | | | | | | Wrap __cxa_{atexit,finalize}() so the call from exit() goes direct Switch regress/lib/libc/atexit/ to be built with -static so that it can still access __atexit* ok millert@ jca@
* Nuke union of d_packname with un_d_boot0 & un_d_boot1, keepingkrw2015-10-251-5/+0
| | | | | | | d_packname as a simple field. Also nuke the access #defines, and support for b0 and b1 capabilities in disktab. ok deraadt@ miod@
* The only thing that was translated into multiple languages in OpenBSDbluhm2015-10-2524-4963/+3
| | | | | | | | | are the errno messages and signal names. Everything else is in English. We are not planning to translate more text. Running a mixed system with less than 1% of the text in native language makes no sense. So remove the NLS support from libc messages. The catopen(3) functions stay as they are. OK stsp@ mpi@
* Use sigaction() instead of signal() to avoid pulling in unnecessaryguenther2015-10-253-7/+8
| | | | | | | wrappers. To keep uses from crawling back in, mark signal() as deprecated inside libc. ok deraadt@
* typommcc2015-10-241-3/+3
|
* Move #includes from private.h to the .c files that need them, getting rid ofguenther2015-10-244-18/+15
| | | | | | several. Switch from FILENAME_MAX to PATH_MAX (it's for open(), not fopen()). ok deraadt@ tedu@ krw@
* nl_langinfo(3) conforms to POSIX.bentley2015-10-241-2/+7
| | | | ok jmc@
* Unify all the errno names inbluhm2015-10-243-9/+9
| | | | | | | | - include comment - libc errlist - nls C msg - man page OK tedu@
* remove a paste error and get section numbers right for sysctl(3);jmc2015-10-241-5/+4
|
* Verify that opened message catalog is valid, i.e. avoid integer overflowstobias2015-10-231-17/+105
| | | | | | and out of boundary accesses. with input by miod, ok stsp
* Switch if_nameindex(3) to use the new NET_RT_IFNAMES sysctl to get theclaudio2015-10-234-91/+76
| | | | | | | | list of interface names. At the same time switch if_nametoindex(3) and if_indextoname(3) to use if_nameindex(3) instead of getifaddrs(3). if_nameindex(3) exposes much less then getifaddrs(3) and is allowed by pledge(2). With and OK deraadt@
* Fix waitpid() loop again: do the errno check only if waitpid() returns -1guenther2015-10-231-11/+11
| | | | | | | and check WIFEXITED() only if it returns != -1. Delete the logging of errors other than ECHILD: EFAULT and EINVAL are impossible here. ok deraadt@ millert@
* Use waitpid() instead of wait() to avoid returning early from another childguenther2015-10-231-2/+3
| | | | | | exiting, and loop the waitpid() on EINTR ok deraadt@ millert@
* Loop the waitpid() on EINTR, and save and restore the disposition ofguenther2015-10-231-9/+12
| | | | | | | SIGINT and SIGQUIT with sigaction() instead of signal() so that all bits are preserved. ok deraadt@ millert@
* Merge the sigaction() and sigprocmask() overloads/wrappers from libpthreadguenther2015-10-2340-107/+246
| | | | | | | | | into libc, and move pthread_sigmask() as well (just a trivial wrapper). This provides consistent handling of SIGTHR between single- and multi-threaded programs and is a step in the merge of all the libpthread overloads, providing some ASM and Makefile bits that the other wrappers will need. ok deraadt@ millert@
* Add 3 new pledge requests. "ps" exposes enough sysctl information forderaadt2015-10-231-2/+24
| | | | | | | ps-style programs (there are quite a few in the tree, including tmux). "vminfo" exposes a bit more system operation information, which many observation programs want (such as top). settime allows setting the system time, and will be used to pledge-protect the last ntpd process.
* crank libc majorderaadt2015-10-231-1/+1
|
* Remove dnssocket() and dnsconnect(), since we decided to use a SOCK_DNSderaadt2015-10-232-10/+4
| | | | | flag instead. ok guenther tedu semarie
* Switch to using SOCK_DNS flag, rather than the dnssocket() andderaadt2015-10-231-3/+4
| | | | | | dnssonnect() calls. Be a bit careful crossing over this, need a kernel no older than Monday. ok guenther tedu semarie
* Cast ctype function arguments to unsigned char.mmcc2015-10-222-4/+4
| | | | ok guenther@
* document "id" request; from Gregor Bestderaadt2015-10-221-2/+16
|
* Document SOCK_DNS flagderaadt2015-10-201-2/+13
| | | | ok guenther tedu semarie
* Remove old tame() stubderaadt2015-10-193-20/+2
|
* Pull in <float.h> instead of declaring __flt_rounds() locallyguenther2015-10-181-3/+2
| | | | ok miod@ jsg@
* libc DNS functions will now use the new dnssocket() / dnsconnect()deraadt2015-10-181-3/+3
| | | | | | | | | | | system calls. These signal to the pledge kernel code that a DNS transaction is happening. These special sockets only work well with port 53 (there are some cute plans...). Programs calling pledge "inet" will not work! You need pledge "dns", and of course, you need a fairly fresh kernel. ok guenther kettenis tedu
* better placement for dnssocket/dnsconnectderaadt2015-10-182-8/+8
|
* create libc stubs for dnssocket() and dnsconnect()deraadt2015-10-182-4/+10
|
* Rename SYSEXIT() to SYSCALL_END() for consistency with most other archs.guenther2015-10-175-25/+14
| | | | | | No change in resulting object files ok millert@
* Move the last of the __DBINTERFACE_PRIVATE bits from <db.h> to libc's wrapperguenther2015-10-172-4/+50
| | | | | | and eliminate the now superfluous -D option ok kettenis@ millert@
* PROTO_NORMAL for pledge(); ok guentherderaadt2015-10-171-1/+2
|
* Check file sizes only for regular files. The current code breaks savecoretobias2015-10-161-3/+3
| | | | | | due to its kvm handling. ok deraadt
* Merge nlist out of boundary access fix with other nlist implementations.tobias2015-10-161-6/+7
| | | | | | While at it, merge style and typo fixes back into nlist(3), too. ok deraadt, jsing, millert
* Validate parsed ELF values to prevent out of boundary accesses.tobias2015-10-161-33/+44
| | | | | | | | While at it, return proper return value when encountering a stripped binary. Instead of -1 (illegal file), it should be the amount of symbols that were tried to be resolved. ok millert
* Document flock requestmillert2015-10-141-2/+12
|
* In rev 1.15 the sizeof argument was fixed in a strlcat() call butmillert2015-10-131-2/+2
| | | | | | the truncation check immediately following it was not updated to match. Not an issue in practice since the buffers are the same size. OK deraadt@