tangled
alpha
login
or
join now
jcs.org
/
openbsd-src
0
fork
atom
jcs's openbsd hax
openbsd
0
fork
atom
overview
issues
pulls
pipelines
openbsd-src
/
lib
/
libc
/
hidden
/
at
jcs
7 folders
63 files
arpa
better placement for dnssocket/dnsconnect
10 years ago
machine
Move mutex, condvar, and thread-specific data routes, pthread_once, and pthread_exit from libpthread to libc, along with low-level bits to support them. Major bump to both libc and libpthread.
8 years ago
net
Switch if_nameindex(3) to use the new NET_RT_IFNAMES sysctl to get the 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@
10 years ago
netinet
Wrap <ifaddrs.h>, <netinet/in.h>, and <netinet/if_ether.h> so internal calls go direct and all the symbols are weak
10 years ago
rpc
Wrap <rpc/*.h> so that calls go direct and the symbols are all weak. Hide __xprt_register() and _authenticate(); truncate <rpc/svc_auth.h>
10 years ago
rpcsvc
Stop publicly declaring _yp_dobind() and struct dom_binding, closing out a rant Theo wrote 24 years ago. Mark __ypexclude_{add,is,free}() as hidden
10 years ago
sys
Add elf_aux_info(3)
2 years ago
_stdio.h
Modify the FILE object's members. Bump the libc major. Now we can bump the short members _file and _flags to int and drop the SHRT_MAX tests. Reorder the members, merge __sfileext into the object, switch the *printf and *scanf families from _FILEEXT_SETUP() to the FILEINIT() initializer, and update the allocation code in findfp(). Also, delete the __sF, _srget, and __swbuf symbols that remain from the previous step for our transition.
8 months ago
asr.h
Allow the caller of asr functions to create and use a specific context. Diff from eric@ and florian@, commiting on their behalf since they are absent and we want to ride the minor shlib bump.
6 years ago
assert.h
Wrap <assert.h> so that __assert2() goes direct
10 years ago
blf.h
Wrap blowfish, sha*, md5, and rmd160 so that internal calls go direct
10 years ago
bsd_auth.h
libc's authentication privsep layer performed insufficient username validation. Repair work mostly by markus and millert, first of all solving the primary problem, then adding some additional validation points. And then futher validation in login and su. This will be 6.5/021_libcauth.patch.sig and 6.6/010_libcauth.patch.sig Reported by Qualys
6 years ago
ctype.h
New POSIX xlocale implementation written from scratch. Complete in the sense that all POSIX *locale(3) and *_l(3) functions are included, but in OpenBSD, we of course only really care about LC_CTYPE and we only support ASCII and UTF-8.
8 years ago
db.h
Remove dead support for changing BDB hash algorithm and cache of alternatives
10 years ago
dirent.h
Add scandirat(3); from freebsd
2 years ago
dlfcn.h
Correct error returns, do not print eror message to stdout (there is a dlerror() function for that) and mark dladdr() as PROTO_NORMAL to be able to call it from a malloc.c MALLOC_STATS leak reporting project I'm working on. ok kettenis@
5 years ago
err.h
Pull in namespace.h when building all .c files using gcc's -include option, so that we can provide asm labels for the memcpy/memset/__stack_smash_handler calls that it generates ab initio. Eliminate direct #includes of it. Make sure it's a dependency of all objects (unnecessary for asm, but close enough).
10 years ago
errno.h
Use a Thread Information Block in both single and multi-threaded programs. 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!
10 years ago
fcntl.h
Use a Thread Information Block in both single and multi-threaded programs. 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!
10 years ago
float.h
Make sure attributes are applied to function declarations before they're 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>
9 years ago
fstab.h
Wrap <fstab.h> so that calls go direct and the symbols are all weak (Do you sense a theme?)
10 years ago
fts.h
Wrap <fts.h> and <ftw.h> so that internal calls to fts_*() go direct and fts_*(), ftw(), and nftw() are weak symbols
10 years ago
ftw.h
Wrap <fts.h> and <ftw.h> so that internal calls to fts_*() go direct and fts_*(), ftw(), and nftw() are weak symbols
10 years ago
getopt.h
Don't wrap initialized variables: binutils appears to be mishandling them on arm and m88k
10 years ago
grp.h
Add uid_from_user() and gid_from_group(), derived from pax's cache.c. 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@
7 years ago
icdb.h
Wrap <icdb.h> so that calls go direct and the symbols are all weak
10 years ago
ieeefp.h
Wrap fpgetround() so internal calls to it (seen on arm, powerpc, and sh) go direct instead of through the PLT.
9 years ago
ifaddrs.h
Wrap <ifaddrs.h>, <netinet/in.h>, and <netinet/if_ether.h> so internal calls go direct and all the symbols are weak
10 years ago
inttypes.h
Wrap <inttypes.h> and finish wrapping of <wchar.h> so that calls go direct and the symbols not in the C standard are weak
10 years ago
langinfo.h
New POSIX xlocale implementation written from scratch. Complete in the sense that all POSIX *locale(3) and *_l(3) functions are included, but in OpenBSD, we of course only really care about LC_CTYPE and we only support ASCII and UTF-8.
8 years ago
link_elf.h
Complete the ld.so boot cleanup: move most libc initialization from _csu_finish() to _libc_preinit(), which is an .init_array function in shared libc (and mark it INITFIRST) or a .preinit_array function in static libc, grabbing the _dl_cb callback there from ld.so. Then in _csu_finish(), invoke the dl_clean_boot() callback to free ld.so's startup bits before main() gets control.
6 years ago
locale.h
New POSIX xlocale implementation written from scratch. Complete in the sense that all POSIX *locale(3) and *_l(3) functions are included, but in OpenBSD, we of course only really care about LC_CTYPE and we only support ASCII and UTF-8.
8 years ago
login_cap.h
secure_path(3) hasn't been called since we recognized the TOCTOU issues a few years back, so we can remove it. Since nothing in the ecosystem calls it, I am not cranking the libc major as required, surely another crank will come along soon. noticed by Dante Catalfamo ok millert
4 years ago
math.h
Wrap the remaining math functions in libc: __fpclassify*(), __flt_rounds(), and ldexp().
10 years ago
md5.h
namespace.h is pulled in via -include, so don't do it here
10 years ago
ndbm.h
Wrap <dbm.h> and <ndbm.h> so that calls go direct and the symbols are all weak
10 years ago
netdb.h
Finish wrapping <netdb.h> so that calls go direct and the symbols are all weak
10 years ago
netgroup.h
Wrap <netgroup.h> so internal calls go direct and the symbols are all weak
10 years ago
nl_types.h
Pull in namespace.h when building all .c files using gcc's -include option, so that we can provide asm labels for the memcpy/memset/__stack_smash_handler calls that it generates ab initio. Eliminate direct #includes of it. Make sure it's a dependency of all objects (unnecessary for asm, but close enough).
10 years ago
poll.h
Use a Thread Information Block in both single and multi-threaded programs. 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!
10 years ago
pthread.h
Mark pthread_equal() as unused inside libc
8 years ago
pwd.h
Add uid_from_user() and gid_from_group(), derived from pax's cache.c. 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@
7 years ago
readpassphrase.h
Wrap <readpassphrase.h> so internal calls go direct and readpassphrase is weak
10 years ago
regex.h
Wrap <langinfo.h> and <regexp.h> so internal calls go direct and the symbols are weak
10 years ago
resolv.h
Wrap <resolv.h> so that internal calls go direct
10 years ago
rmd160.h
Wrap blowfish, sha*, md5, and rmd160 so that internal calls go direct
10 years ago
sched.h
Wrap <sched.h> and <sys/futex.h> so that internal calls go direct
8 years ago
search.h
lsearch(3): reimplement using lfind(3)
4 years ago
sha1.h
Wrap blowfish, sha*, md5, and rmd160 so that internal calls go direct
10 years ago
sha2.h
Add functions for SHA512/256. The standard says you're supposed to start 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
9 years ago
signal.h
Move sigwait(3) from libpthread to libc
7 years ago
siphash.h
Wrap blowfish, sha*, md5, and rmd160 so that internal calls go direct
10 years ago
softfloat.h
Make softfloat's internal float_raise also available under a hidden, internal name, so that local references to it do not need to go through the plt. (this routine is used by libm and thus can't be made internal to libc)
10 years ago
spawn.h
Wrap <spawn.h> to make all the symbols there weak
10 years ago
stdio.h
Modify the FILE object's members. Bump the libc major. Now we can bump the short members _file and _flags to int and drop the SHRT_MAX tests. Reorder the members, merge __sfileext into the object, switch the *printf and *scanf families from _FILEEXT_SETUP() to the FILEINIT() initializer, and update the allocation code in findfp(). Also, delete the __sF, _srget, and __swbuf symbols that remain from the previous step for our transition.
8 months ago
stdio_ext.h
Add <stdio_ext.h> with the seven APIs needed to have gnulib operate without poking directly into the FILE structure.
2 years ago
stdlib.h
Add mkdtemps(3), like mkdtemp(3) but with a suffix. OK deraadt@ tb@
2 years ago
string.h
Instead of trying to handle ffs() with the normal rename-mark-hidden-and-alias dance, mark it protected. This works better for both gcc and clang: gcc blocks overriding of internal calls, while clang permits inlining again.
8 years ago
syslog.h
Declare sendsyslog to match its man page
2 years ago
termios.h
Use PROTO_DEPRECATED() make tcdrain() weak in libc, to guarantee libpthread can override it
10 years ago
tib.h
spelling fixes; from paul tagliamonte any changes not taken noted on tech, but chiefly here i did not take the cancelation - cancellation changes;
3 years ago
time.h
Add support for timeconting in userland.
5 years ago
ttyent.h
Wrap <ttyent.h> so that calls go direct and the symbols are all weak.
10 years ago
uchar.h
Provide C11 <uchar.h>. OK millert@. Tested by naddy@ in a bulk and by matthieu@ in the new foot(1) port. I originally wrote the code in 2022 at the prodding of espie@. Using one improvement to a manual page from jmc@.
2 years ago
unistd.h
Add pathconfat(2): pathconf(2) but with at-fd and flags arguments, the latter supporting the ability to get timestamp resolution of symlinks.
2 years ago
utime.h
Wrap <utime.h> to make utime() a weak symbol
10 years ago
uuid.h
Wrap <uuid.h> so that calls go direct and the symbols are all weak
10 years ago
vis.h
Wrap <vis.h> so that calls go direct and the symbols are all weak
10 years ago
wchar.h
Make the FILE object opaque. Move the __sFILE definition into libc/hidden/_stdio.h. All programs that refer to the internal structure of the FILE object can't be compiled from now on. std{in,out,err} doesn't refer __sF[] now, but the hidden __sF along with __srget and __swbuf symbols are kept temporarily to make our transition easier. But those symbols will be deleted soon. The shared library versions are bumped for libc and all the other libraries that refer to std{in,out,err}.
8 months ago
wctype.h
Simplify wctype() and wctype_l(): we have one set of classification types used by all (== both) locales; put their implementation in one file and make the mapping static there. The rl_wctype member of _RuneLocale and its initialization go away at the same time.
3 years ago