summaryrefslogtreecommitdiffstats
path: root/lib/libc/hidden (follow)
Commit message (Collapse)AuthorAgeFilesLines
* sigsetmask() and sigblock() are no longer used by any setjmp implementationguenther2016-09-261-3/+3
| | | | | so the internal hidden names are unused; switch to PROTO_DEPRECATED() and drop the DEF_WEAK()s
* Don't declare select() in <unistd.h>guenther2016-09-121-2/+1
| | | | ok deraadt@ millert@
* Make sure attributes are applied to function declarations before they'reguenther2016-09-064-18/+58
| | | | | | | | used or defined, as clang isn't as forgiving as gcc. Also, declare __flt_rounds() so that libc can build it despire clang providing its own <float.h> ok stefan@ kettenis@
* Add functions for SHA512/256. The standard says you're supposed to starttedu2016-09-031-2/+11
| | | | | | | | with different magic numbers, so we need to add some functions instead of just asking the user to truncate as desired. Sigh. SHA512 is quite a bit faster than SHA256 on 64 bit CPUs, but 256 bit hashes are usually quite sufficient. Best of both. ok deraadt tom
* Reduce qabs() and qdiv() to aliases of llabs() and lldiv().guenther2016-08-141-3/+3
| | | | | | Merge the manual pages and call them deprecated there. ok and manpage tweak jmc@, ok natano@
* Wrap fpgetround() so internal calls to it (seen on arm, powerpc, and sh)guenther2016-07-261-0/+30
| | | | | | go direct instead of through the PLT. ok millert@ kettenis@
* Stop publicly declaring _yp_dobind() and struct dom_binding, closing outguenther2016-05-301-2/+6
| | | | | | a rant Theo wrote 24 years ago. Mark __ypexclude_{add,is,free}() as hidden "get off my lawn!" deraadt@
* Wrap <machine/sysarch.h> to prevent overriding internal calls, forguenther2016-05-291-0/+25
| | | | | | alpha and mips64 ok millert@
* Remove dead support for changing BDB hash algorithm and cache of alternativesguenther2016-05-291-1/+4
| | | | ok natano@ millert@ deraadt@
* Remove iruserok(_sa)? and __ivaliduser(sa)?guenther2016-05-231-3/+1
| | | | ok millert@ deraadt@
* Remove sigreturn declaration and the now-unused libc syscall stubguenther2016-05-091-2/+1
|
* remove ancient dbm functions (ndbm remains). nothing uses them in forever.tedu2016-05-071-31/+0
|
* Use a Thread Information Block in both single and multi-threaded programs.guenther2016-05-0714-31/+197
| | | | | | | | | | | | | | | | | This stores errno, the cancelation flags, and related bits for each thread and is allocated by ld.so or libc.a. This is an ABI break from 5.9-stable! Make libpthread dlopen'able by moving the cancelation wrappers into libc and doing locking and fork/errno handling via callbacks that libpthread registers when it first initializes. 'errno' *must* be declared via <errno.h> now! Clean up libpthread's symbol exports like libc. On powerpc, offset the TIB/TCB/TLS data from the register per the ELF spec. Testing by various, particularly sthen@ and patrick@ ok kettenis@
* Turd polish: use HIDDEN= instead of PSEUDO= for ptrace syscall stub, toguenther2016-03-301-0/+25
| | | | make its underlying symbol name look like others.
* Eliminate userspace caching by getlogin_r/setlogin; make the getloginguenther2016-03-301-3/+3
| | | | | | | | syscall behave exactly like userspace getlogin_r() and rename it to match. Eliminate the reduced-to-no-op wrappers of the syscalls. Eliminate the unnecessary per-thread static buffering by getlogin(). ok kettenis@ deraadt@
* Rename the system call sendsyslog2 to sendsyslog. Keep the old onebluhm2016-03-211-5/+2
| | | | | | as osendsyslog for a while. The three argument variant is the only one that will stay. input kettenis@; OK deraadt@
* Rearrange C runtime bits: now that ld.so exports environ and __progname,guenther2016-03-201-1/+6
| | | | | | | | | | | move their definitions and initialization in static links to libc.a Make crt0 always invoke a new func _csu_finish() in libc to process the auxv and to either register the ld.so cleanup function (in dynamic links) or initialize environ and __progname and do MC_DISABLE_KBIND (in static links). In libc, get pagesize from auxv; cache that between getpagesize() and sysconf(_SC_PAGESIZE) ok mpi@ "good time" deraadt@
* environ and __progname are not declared in a public header; declare themguenther2016-03-131-1/+4
| | | | | | in libc's hidden/stdlib.h instead of in each .c file that needs one ok deraadt@ gsoares@ mpi@
* Wrap <icdb.h> so that calls go direct and the symbols are all weakguenther2015-11-251-0/+35
| | | | ok tedu@
* Add a syscall stub for sendsyslog2(2), and use it in syslog_r(3), passingderaadt2015-11-251-1/+4
| | | | | | LOG_CONS to the kernel. As a result, the /dev/console opening code can be removed. ok kettenis millert beck
* Use reentrant versions of getpw{nam,uid} and getgr{nam,gid} withinmillert2015-11-242-6/+6
| | | | | | | libc to avoid reusing the static buffers returned by the non-reentrant versions. Since this is inside libc we can use constants for the buffer sizes instead of having to call sysconf(). OK guenther@ deraadt@
* Add _shadow variants to the two popular getpw functions (uid and nam).tedu2015-11-181-1/+3
| | | | | | | | | This version of the function will always open the secure/shadow/master password files. Soon, the regular variants of these functions will not. (Intermixing shadow and regular gets a little weird; don't do that.) Not using struct spwd and getspwnam functions to reduce churn in callers. Should just be a one line diff in most places. ok deraadt
* Split the intra-thread functionality from kill(2) into its own syscallguenther2015-11-101-1/+2
| | | | | | | | | | | | thrkill(2), rolling the kill(2) syscall number with the ABI change to avoid breaking binaries during during the transition. thrkill(2) includes a 'tcb' argument that eliminates the need for locking in pthread_kill() and simplifies pthread_cancel(). Switch __stack_smash_handler() to use thrkill(2) and explicitly unblock SIGABRT. Minor bump to both libc and libpthread: make sure you install a new kernel! ok semarie@
* libc.so can't be unloaded, so move the hidden atexit() and pthread_atfork()guenther2015-11-102-2/+27
| | | | | | | | | | | stubs for the executable from crtbegin.o into libc, which lets them be excluded from static links that don't use them. For this, drop the normal crt{begin,end}S.o from libc.so: the .init and .fini sections for libc aren't called at the right times anyway, so it's good that they're unused. libc.so just needs __guard_local and the .note.openbsd.ident section, so add them to stack_protector.c for now (this will be improved) "good time" deraadt@
* Do not include a timestamp in the syslog message. There is no need --deraadt2015-10-311-2/+2
| | | | | | | | 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
* Wrap the remaining math functions in libc: __fpclassify*(), __flt_rounds(),guenther2015-10-272-0/+58
| | | | | | and ldexp(). ok millert@
* Wrap waitpid() so calls go direct; weaken wait() and wait3().guenther2015-10-251-0/+28
| | | | Strip out unnecessary #includes and use NULL instead of (struct rusage *)0
* Hide __atexit and __atexit_register_cleanup()guenther2015-10-251-1/+2
| | | | | | | | 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@
* Use sigaction() instead of signal() to avoid pulling in unnecessaryguenther2015-10-251-2/+2
| | | | | | | wrappers. To keep uses from crawling back in, mark signal() as deprecated inside libc. ok deraadt@
* Switch if_nameindex(3) to use the new NET_RT_IFNAMES sysctl to get theclaudio2015-10-231-3/+3
| | | | | | | | 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@
* Merge the sigaction() and sigprocmask() overloads/wrappers from libpthreadguenther2015-10-231-5/+5
| | | | | | | | | 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@
* Remove dnssocket() and dnsconnect(), since we decided to use a SOCK_DNSderaadt2015-10-231-7/+1
| | | | | flag instead. ok guenther tedu semarie
* better placement for dnssocket/dnsconnectderaadt2015-10-182-8/+8
|
* create libc stubs for dnssocket() and dnsconnect()deraadt2015-10-181-1/+7
|
* Move the last of the __DBINTERFACE_PRIVATE bits from <db.h> to libc's wrapperguenther2015-10-171-1/+49
| | | | | | and eliminate the now superfluous -D option ok kettenis@ millert@
* PROTO_NORMAL for pledge(); ok guentherderaadt2015-10-171-1/+2
|
* Wrap <resolv.h> so that internal calls go directguenther2015-10-051-0/+46
| | | | ok millert@
* Wrap <search.h> to make all the symbols there weakguenther2015-10-041-0/+35
|
* Wrap <spawn.h> to make all the symbols there weakguenther2015-10-041-0/+45
|
* recv() and send() aren't overriden by libpthread (vs recvfrom() and sendto()!)guenther2015-10-041-1/+3
| | | | so wrap them to make internal calls go direct
* getpeereid() and sockatmark() are neither used in libc nor in ISO C, so markguenther2015-10-041-1/+3
| | | | them deprecated and weak
* Don't wrap initialized variables: binutils appears to be mishandling themguenther2015-09-197-8/+20
| | | | | | on arm and m88k problems with optind observed by jsg@
* Wrap <langinfo.h> and <regexp.h> so internal calls go direct andguenther2015-09-142-0/+53
| | | | the symbols are weak
* Wrap <locale.h> so internal calls go directguenther2015-09-141-0/+26
|
* Wrap <sys/sem.h> so internal calls go direct and all the symbols are weakguenther2015-09-141-0/+28
|
* Wrap <asr.h> so internal calls go direct and all the symbols are weakguenther2015-09-141-0/+38
|
* Wrap <ifaddrs.h>, <netinet/in.h>, and <netinet/if_ether.h> so internalguenther2015-09-143-0/+101
| | | | calls go direct and all the symbols are weak
* Wrap <net/if.h> and <net/if_dl.h> so internal calls go direct and all theguenther2015-09-142-0/+53
| | | | symbols are weak
* Wrap <readpassphrase.h> so internal calls go direct and readpassphrase is weakguenther2015-09-141-0/+25
|
* Wrap <netgroup.h> so internal calls go direct and the symbols are all weakguenther2015-09-141-0/+28
|