IABSD.fr/src/include

Branch :


Log

Author Commit Date CI Message
6a970984 2022-01-05 20:57:27 funopen(): change seekfn argument to use off_t, not fpos_t On BSD, fpos_t is typedef'd to off_t but some systems use a struct. This means fpos_t is not a portable function argument or return value. Both FreeBSD and the Linux libbsd funopen() have switched to off_t for this--we should too. From Joe Nelson. OK deraadt@
832bedbc 2021-11-29 01:04:45 Niels agreed to remove the advertising clause; switching these to 3-term BSD license.
931108e9 2021-11-22 20:18:27 Implement rfc6840 (AD flag processing) if using trusted name servers libc can't do DNSSEC validation but it can ask a "security-aware" resolver to do so. Let's send queries with the AD flag set when appropriate, and let applications look at the AD flag in responses in a safe way, ie clear the AD flag if the resolvers aren't trusted. By default we only trust resolvers if resolv.conf(5) only lists name servers on localhost - the obvious candidates being unwind(8) and unbound(8). For non-localhost resolvers, an admin who trusts *all the name servers* listed in resolv.conf(5) *and the network path leading to them* can annotate this with "options trust-ad". AD flag processing gives ssh -o VerifyHostkeyDNS=Yes a chance to fetch SSHFP records in a secure manner, and tightens the situation for other applications, eg those using RES_USE_DNSSEC for DANE. It should be noted that postfix currently assumes trusted name servers by default and forces RES_TRUSTAD if available. RES_TRUSTAD and "options trust-ad" were first introduced in glibc by Florian Weimer. Florian Obser (florian@) contributed various improvements, fixed a bug and added automatic trust for name servers on localhost. ok florian@ phessler@
66e500ce 2021-06-09 19:44:55 Enable libexecinfo. With some build plumbing help from jsg@ ok kettenis@ sthen@
c0455c86 2021-06-03 13:19:45 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
296fbf9f 2021-06-02 07:29:03 add RTLD_NODELETE support if RTLD_NODELETE isn't POSIX, it is widely deployed: at least linux, freebsd, dragonfly, netbsd, solaris, illumos, apple, and fuchsia have it. ok kettenis@ on previous version with help from and ok guenther@ diff partially inspired from a diff from brad@
9be7043f 2021-01-21 00:16:36 Rearrange variables in dump / restore to handle -fno-common. Largely following the commit by mckusick in FreeBSD. ok naddy@
f950054f 2021-01-02 20:04:36 Move Makefiles for libc++ and libc++abi to gnu/lib in preparation for an upcoming update to those, which will see both codebases heading into the gnu/llvm dumpster. Feedback from jsg@ ok deraadt@ kettenis@
e7a945d3 2020-10-26 15:50:31 Hook up agentx.h. OK deraadt@
cf6da2c2 2020-10-20 19:30:14 Align the basename(3) and dirname(3) prototypes with the POSIX spec: Both functions take a non-const parameter. Implementations may modify the passed string, even though ours do not. ok stsp@ deraadt@ millert@
464c6a2f 2020-09-11 17:56:41 add format string checking annotations for dprintf(3) and vdprintf(3) ok millert@ deraadt@
9f1f2f9e 2020-09-06 12:57:25 Use __STDC_VERSION__ instead of __ISO_C_VISIBLE to guard _Static_assert. We need to test what the compiler supports, not what the C library provides. This prevents static_assert from being defined when compiling with the in-tree gcc (4.2.1) which does not support _Static_assert.
18b823ae 2020-09-05 10:41:31 Add C11's static_assert. tested in a bulk by naddy@ previously submitted by jsg@ and Martin Wanvik ok millert@
874055c7 2020-07-14 16:48:13 Fix TIB/TCB on powerpc64. Some bright sould decided that the TCB should be 8 bytes in the 64-bit ABI just like in the 32-bit ABI. But that means there is no "spare" word in the TCB that we can use to store a pointer to our struct pthread. So we have to treat powerpc64 special. Also recognize that the thread pointer points 0x7000 bytes after the TCB. Since the TCB is 8 bytes this means that TCB_OFFSET should be 0x7008. Pointed out by guenther@; ok deraadt@
4f3fcc39 2020-06-28 05:21:38 Allow switching between alternate devices (-F option) with sndioctl(1)
49f67e12 2020-06-28 05:17:25 Add a new SIOCTL_SEL control type to select one of a predefined set of mutually exclusive values. It's the same as SIOCTL_LIST except that exactly one list element may be selected.
433bc805 2020-06-18 04:44:11 Fix comments about sioctl_desc's maxval field
2981a53a 2020-05-10 00:56:06 Use a double-underscore prefix for local variables declared in macros that have arguments. Document this requirement/recommendation in style(9) prompted by mpi@ ok deraadt@
d07fece6 2020-02-26 13:53:58 Add API to control audio device parameters exposed by sndiod. The API exposes controls of modern audio hardware and sndiod software volume knobs in a uniform way. Hardware knobs are exposed through sndiod. Multiple programs may use the controls at the same time without the need to continuously scan the controls. For now sndiod exposes only its own controls and the master output and input volumes of the underlying hardware (if any), i.e. those typically exposed by acpi volume keys. ok deraadt
5ec7511b 2019-11-14 21:14:53 RDIRS for libcbor and libfido2
af4d66b3 2019-10-24 05:57:41 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.
9a9933b7 2019-07-11 03:54:17 add /usr/local/sbin. ok deraadt millert
e748cc96 2019-05-28 10:33:03 Include pthread.h to make this header standalone (needs pthread_t and others) Will get us rid of pointless patches in the ports tree. ok guenther@
e03a3151 2019-05-10 15:03:24 Inroduce malloc_conceal() and calloc_conceal(). Similar to their counterparts but return memory in pages marked MAP_CONCEAL and on free() freezero() is actually called.
c0197e40 2019-05-10 13:29:21 ld.so boot cleanup support: - put functions and data which are only used before calling the executable's start function into their own page-aligned segments for unmapping (only done on amd64, arm64, armv7, powerpc, and sparc64 so far) - pass .init_array and .preinit_array functions an addition argument which is a callback to get a structure which includes a function that frees the boot text and data - sometimes delay doing RELRO processing: for a shared-object marked DF_1_INITFIRST do it after the object's .init_array, for the executable do it after the .preinit_array - improve test-ld.so to link against libpthread and trigger its initialization late libc changes to use this will come later ok kettenis@
cc1fc287 2019-04-06 02:56:16 unbreak make includes on non-clang archs after libobjc removal found the hard way by nayden@ ok deraadt@
2584ca0b 2019-03-05 09:44:38 Build and install a shared libLLVM, llvm-config and llvm includes. This is required to build the radeonsi Mesa driver. ok patrick@
ba3116c2 2019-02-04 23:23:18 enable libelf
29511769 2019-02-04 17:18:08 add a pthread_get_name_np to match pthread_set_name_np. could be useful in ports. initial diff by David Carlier some time ago. ok jca
b59f966d 2019-02-04 16:45:40 Make gl_pathc, gl_matchc and gl_offs size_t in glob_t to match POSIX. This requires a libc major version bump. OK deraadt@
bf198cc6 2019-01-25 00:19:25 I am retiring my old email address; replace it with my OpenBSD one.
3d657e16 2019-01-14 06:23:06 There are cases where a program doing dns requests wants to set the Checking Disabled flag. Introduce a RES flag to do so. ok krw@ deraadt@ eric@
d320821e 2018-11-22 21:20:38 Our *int_fast{8,16}_t types are int/unsigned int, so SCN*FAST{8,16} shouldn't include 'hh' or 'h'. problem noted by Andreas Kusalananda Kähäri (andreas.kahari(at)abc.se) ok deraadt@ martijn@
acb3f83f 2018-11-21 06:57:04 Introducing malloc_usable_size() was a mistake. While some other libs have it, it is a function that is considered harmful, so: Delete malloc_usable_size(). It is a function that blurs the line between malloc managed memory and application managed memory and exposes some of the internal workings of malloc. If an application relies on that, it is likely to break using another implementation of malloc. If you want usable size x, just allocate x bytes. ok deraadt@ and other devs
f5c5425b 2018-11-18 16:15:18 Implement malloc_usable_size(); ok millert@ deraadt@ and jmc@ for the man page
7a9442eb 2018-11-05 08:23:40 Implement C11's aligned_alloc(3). ok guenther@
6151004e 2018-10-30 16:28:42 Add C11's timespec_get(3); minor bump for libc. Tweaked diff from brad@ manpage tweaks florian@ and jmc@ ok deraadt@ millert@
5a122e6e 2018-09-13 12:31:15 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@
2b699e5c 2018-07-29 19:40:41 Add _PATH_AUTHPROGDIR = "/usr/libexec/auth", this path will be used to unveil. Unfortunately the auth subsystem uses _PATH_AUTHPROG = "/usr/libexec/auth/login_", which it auth-program is appended to -- a rather gross idea which now shows lack of wisdom.
8b23add8 2018-07-13 09:25:22 Unveiling unveil(2). This brings unveil into the tree, disabled by default - Currently this will return EPERM on all attempts to use it until we are fully certain it is ready for people to start using, but this now allows for others to do more tweaking and experimentation. Still needs to send the unveil's across forks and execs before fully enabling. Many thanks to robert@ and deraadt@ for extensive testing. ok deraadt@
3ea600eb 2018-05-30 13:20:38 The open POSIX test suite reveals that sigpause(int sigmask) from 4.2 BSD takes a signal mask as argument while POSIX sigpause(int sig) expects a single signal. Do not expose our traditional BSD sigpause(3) to XPG/POSIX sources. OK guenther@
44c85a19 2018-03-16 12:31:09 Consistently spell "IPsec" in comments and debug outputs. From Raf Czlonka, ok sthen@
6c640833 2018-03-10 20:52:58 Implement sicos(3), sincosf(3) and sincosl(3). These functions are common extensions and modern compilers (such as clang) will use them to optimize separate calculations of sine and cosine. ok tom@, patrick@, deraadt@, jmc@
ea0d1f1f 2018-03-05 01:15:24 #define _MAX_PAGE_SHIFT in MD _types.h as the maximum pagesize an arch needs (looking at you sgi, but others required this before). This is for the circumstances we need pagesize known at compile time, not getpagesize() runtime. Use it for malloc storage sizes, for shm, and to set pthread stack default sizes. The stack sizes were a mess, and pushing them towards page-aligned is healthy move (which will also be needed by the coming stack register checker) ok guenther kettenis, discussion with stefan
4ea7ed56 2017-12-12 01:12:34 pledge()'s 2nd argument becomes char *execpromises, which becomes the pledge for a new execve image immediately upon start. Also introduces "error" which makes violations return -1 ENOSYS instead of killing the program ("error" may not be handed to a setuid/setgid program, which may be missing/ignoring syscall return values and would continue with inconsistant state) Discussion with many florian has used this to improve the strictness of a daemon
53213268 2017-11-28 18:57:02 Add a member to be used by __cxa_thread_atexit(). Remove padding which would now misalign things. ok guenther@
a0d792cd 2017-11-28 17:19:47 Implement a DL_REFERENCE dlctl. To be used by the upcoming __cxa_thread_atexit() implementation. ok guenther@
a318b99d 2017-11-04 22:53:57 Revert recent changes to unbreak ports/net/samba While it is not clear (to me) why that ports ends up with corrupted shared libs, reverting those changes fixes the issue and should allow us to close p2k17 more smoothly. Discussed with a bunch, ok ajacoutot@ guenther@
1047ef59 2017-10-28 21:23:14 Change pthread_cleanup_{push,pop} to macros that store the cleanup info on the stack instead of mallocing the list and move the APIs from libpthread to libc so that they can be used inside libc. Note: the standard was explicitly written to permit/support this "macro with unmatched brace" style and it's what basically everyone else already does. We xor the info with random cookies with a random magic to detect/trip-up overwrites. Major bump to both libc and libpthread due to the API move. ok mpi@
7c8f01eb 2017-10-17 09:34:52 <elf.h> should make it easier to port our ELF-related tools to other Unices. For the moment it only includes <sys/exec_elf.h> but the goal is to stop pulling it directly and also replace <elf_abi.h> at least for base applications. ok deraadt@, jasper@, naddy@
249f38f2 2017-10-15 23:40:33 Move the thread-related .h files to /usr/src/include/, since the implementation is now spread between libc and librthread. No changes to the content ok mpi@
0cb6afd9 2017-10-06 19:58:37 Use the modern POSIX idiom "-exec ... {} +" instead of find|xargs and combine the two find(1) invocations into one. From Klemens Nanni; ok tb@
091ba0ad 2017-09-10 21:50:36 str[n]casecmp_l(3) appeared in POSIX 2008, not in XPG 4; phessler@ reported that this oversight broke an armv7 bulk build; OK guenther@
3a628b46 2017-09-05 03:16:13 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. With important help from kettenis@, guenther@, and jca@. Repeated testing in ports bulk builds by naddy@. Additional testing by jca@, sebastia@, dcoppa@, and others. OK kettenis@ dcoppa@, and guenther@ on an earlier version. Riding guenther@'s libc/librthread major bump.
18cf7fd7 2017-08-10 13:35:18 fix typo in comment
6e13c3b6 2017-08-10 13:34:46 ___errno (three underbars) is long gone
c1664c68 2017-05-11 11:52:18 arc4random_buf should be bounded buffer, not bounded string ok millert@
6a20801c 2017-05-10 21:48:29 Add bounded attribute to freezero(). OK tom@
29879bdc 2017-04-20 16:07:52 Get TCB address using the RDHWR instruction instead of __get_tcb(). This gives fast access to the address on systems that implement the UserLocal register. TCB caching is still used when running in the single-threaded mode in order not to penalize old systems. The kernel counterpart of this change must be in place before using this diff! With guenther@
d8ee3b15 2017-04-17 15:53:21 Change build infrastructure to allow building both gcc and clang. This doesn't actually flip the switch yet, so aarch64 continues to be the only architecture for which we build clang. ok jsg@, deraadt@
c0e0c2a5 2017-04-10 05:45:02 Introducing freezero(3) a version of free that guarantees the process no longer has access to the content of a memmory object. It does this by either clearing (if the object memory remains cached) or by calling munmap(2). ok millert@, deraadt@, guenther@
f2704730 2017-03-12 23:28:13 <struct.h> is unused and should not be used. Delete it. ok millert@ deraadt@ kettenis@
15afe4d6 2017-03-09 10:13:03 As per style.9, prototypes should not have variable names associated with the types. OK jca@
14537fff 2017-03-06 18:50:28 Introducing recallocarray(3), a blend of calloc(3) and reallocarray(3) with the added feature that released memory is cleared. Much input from various developers. ok deraadt@ tom@
02a6e1c4 2017-02-04 19:16:25 The macro versions of htonl et al don't require them, but POSIX says <arpa/inet.h> needs to provide uint16_t and uint32_t. ok millert@ krw@ naddy@
828e760f 2017-02-04 02:54:33 Move the typedefs for in_{addr,port}_t from <sys/types.h> to <netinet/in.h> and <arpa/inet.h> ok and ports test naddy@ (thanks!) ok krw@ beck@ millert@
cc65dc7e 2017-01-27 13:30:39 install libcxxabi and libcxx headers when COMPILER_VERSION is clang ok patrick@
c9b8f0a2 2017-01-06 14:36:50 Add max_align_t. ok millert@
afa58948 2016-11-12 03:04:27 Kill the /usr/include/ssl symlink Proposed some time ago by tedu@, builk build by ajacoutot@
76c3425b 2016-11-08 19:56:56 Set owners and permissions only after all headers are installed. Add the -P flag to chown to change the symlinks themselves instead of their targets. Also change permissions of all symlinks, so they don't depend on the umask during make build. ok millert
b718d5d4 2016-10-16 19:28:44 Move libcrypto, librpcsvc and gnu/usr.bin/cc/include from RDIRS to PRDIRS, and add prereq targets, so some header files are generated by BUILDUSER during 'make prereq' instead of by root during 'make includes'. Switch the order of 'make cleandir' and 'make includes' during 'make build' so we don't generate many files twice. Except for some machine@ symlinks from ${MACHINE}/stand, /usr/obj is now clean from files generated by root during 'make build'. Those will be cleaned up in a second step. help, testing & ok deraadt, input from natano, further testing rpe
2b5055b0 2016-09-23 09:18:05 Unhook sqlite3.
7742623a 2016-09-20 21:10:22 Remove duplicated includes in stdlib.h and termios.h OK guenther@
e2d18ed9 2016-09-20 18:24:55 Add dl_unwind_find_exidx prototype. ok guenther@
9e9a60b0 2016-09-12 19:36:26 Don't declare select() in <unistd.h> ok deraadt@ millert@
407745ea 2016-09-12 19:35:31 Change the (unused) restimespec member of __res_state from a timespec to a local equivalent to eliminate a dependency on <sys/time.h> being included ok deraadt@ millert@
6ecde746 2016-09-09 18:12:37 Move the 10 (!) defintions of NULL to their own mini header file and update the NULL definition for C++11. OK deraadt@ guenther@ kettenis@
77abaea0 2016-09-04 14:51:39 Make the key sizes and offsets arrays const, ok tedu
bcaff74c 2016-09-04 11:53:23 Add the usual header stuff (#ifdef _ICDB_H_ etc) to icdb.h, ok tedu
f6bf8f90 2016-09-03 17:00:29 i forgot to commit sha2.h changes for SHA512/256
937c6c5f 2016-08-27 04:28:28 Pull in <sys/select.h> for fd_set ok deraadt@
8ae7fd5a 2016-05-30 02:53:29 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 "get off my lawn!" deraadt@
fbe95b35 2016-05-23 00:18:56 Stop supporting longjmperror(); it's not used, not portable, and the checks longjmp performs can't really be relied upon, even after we got rid of the false positives... ok millert@ deraadt@
df1557eb 2016-05-23 00:12:58 Remove iruserok(_sa)? and __ivaliduser(sa)? ok millert@ deraadt@
2032f1fe 2016-05-09 23:55:52 Remove sigreturn declaration and the now-unused libc syscall stub
3d8a654b 2016-05-07 21:58:24 remove dbm.h
fe38b55c 2016-05-07 19:05:21 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! 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@
157c34b3 2016-03-20 02:30:28 Prepare for future ld.so/libc bump: update <tib.h> with the definitions that will be needed and make libpthread work when ld.so/libc.a provide an initial TIB.
574dde88 2016-03-17 20:55:35 Remove #ifdef __vax__ bits ok deraadt@ tb@ (who had the same diff)
c6c30f45 2016-03-16 04:56:08 remove cpp version of __sputc, since the inline version is all we have ever used. ok jsg
abd93d17 2016-03-14 20:43:03 Expose snprintf() and vsnprintf() for XPG 5. It predates C99 but still specified snprintf() and vsnprintf() based on earlier drafts. Allows snprintf() and vsnprintf() to be used when _XOPEN_SOURCE is defined as 500. OK guenther@
696cd27b 2016-03-09 16:28:44 We are done providing support for the vax. lots of agreement.
1647db04 2016-02-04 22:04:34 Convert sigemptyset and sigfillset to inline functions to avoid warnings with newer gcc versions and -Werror=unused-value. OK guenther@
75191393 2016-01-25 12:17:48 Remove decls #if'0ed since rev. 1.1 POSIX used to specify those declarations, but later removed them. ok guenther@
d88f5702 2016-01-20 19:09:52 After nearly 20 years of warning that malloc.h is obsolete, it's about time we actually remove this header. It was originally added for ports, which is malloc.h-free now. additional ports bulk by aja@ ok bently@ dcoppa@ millert@ sthen@
bde5d162 2015-12-20 11:29:29 Expose internal functions necessary to open audio devices and midi ports using existing file descriptors.
e7fbb21c 2015-11-20 23:40:32 POSIX says that ffs(), strcasecmp(), strncasecmp(), r?index() and the b* byte functions belong in strings.h, not string.h so break them out of string.h into a new strings.h. As long as there is no POSIX or X/OPEN define in use string.h will pull in strings.h. OK naddy@ deraadt@
025678fa 2015-11-18 17:59:56 add a version field to prevent mayhem if different data gets stored
e55899f0 2015-11-18 16:48:34 add icdb.h here (this header may go away entirely, but the functions need to live somewhere in the meantime.)
46d82e2e 2015-11-18 16:46:49 Add icdb, the internal c database. A simpler replacement for the old Berzerkeley DB code.