aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Add runtime fallback for GRND_INSECURELaurent Bercot2022-06-231-3/+13
| | | | | | | | | | | | | | | | | | | The grndinsecure sysdep is only build-time tested and returns yes if the kernel headers declare GRND_INSECURE. That is a problem because the kernel headers are most likely provided by the toolchain and do not reflect the exact capabilities of the run-time kernel. If the run-time kernel doesn't support that option, getrandom() fails. That made random_buf_early() busyloop. To avoid that, we now fallback to random_devurandom() as an implementation of random_buf_early() if getrandom() fails when used with GRND_INSECURE. This adds a slight amount of overhead to random_buf_early(), so it's probably better to just disable the sysdep at build time if you're making binaries that will run on older kernels. Signed-off-by: Laurent Bercot <ska@appnovation.com>
* Export random_devurandom, fix APIsLaurent Bercot2022-06-085-15/+7
| | | | Signed-off-by: Laurent Bercot <ska@appnovation.com>
* Clean up / homogenize openreadnclose() familyLaurent Bercot2022-06-086-38/+32
| | | | Signed-off-by: Laurent Bercot <ska@appnovation.com>
* Remove unused variable in generic selfpipe_trapLaurent Bercot2022-06-041-1/+0
| | | | Signed-off-by: Laurent Bercot <ska@appnovation.com>
* Add blake2s implementation to stdcryptoLaurent Bercot2022-06-017-0/+180
| | | | Signed-off-by: Laurent Bercot <ska@appnovation.com>
* Rework endianness conversion primitivesLaurent Bercot2022-06-0150-99/+156
| | | | Signed-off-by: Laurent Bercot <ska@appnovation.com>
* Add openc_*at functionsLaurent Bercot2022-05-3017-16/+118
| | | | Signed-off-by: Laurent Bercot <ska@appnovation.com>
* Add waitn_posix() and waitn_reap_posix()Laurent Bercot2022-04-155-21/+52
| | | | Signed-off-by: Laurent Bercot <ska@appnovation.com>
* Remove uint32_func definitionLaurent Bercot2022-04-091-3/+0
| | | | Signed-off-by: Laurent Bercot <ska@appnovation.com>
* Prepare for 2.12.0.0. librandom revamp.Laurent Bercot2022-04-0921-318/+242
| | | | Signed-off-by: Laurent Bercot <ska@appnovation.com>
* Add sysdep for GRND_INSECURELaurent Bercot2022-03-271-0/+16
| | | | Signed-off-by: Laurent Bercot <ska@appnovation.com>
* Don't write to /dev/urandom. (It's useless or even harmful.)Laurent Bercot2022-03-272-7/+1
|
* Fix envdir_noclampLaurent Bercot2022-02-271-3/+3
| | | | Signed-off-by: Laurent Bercot <ska@appnovation.com>
* Bloat envdir with a noclamp optionLaurent Bercot2022-02-255-77/+206
| | | | Signed-off-by: Laurent Bercot <ska@appnovation.com>
* Don't autoshrink after slurpingLaurent Bercot2022-02-251-12/+7
| | | | Signed-off-by: Laurent Bercot <ska@appnovation.com>
* Full errno paranoia in selfpipe signal handlerLaurent Bercot2022-02-171-0/+3
| | | | Signed-off-by: Laurent Bercot <ska@appnovation.com>
* Add gccattr_nonstring, modernize gccattributes.hLaurent Bercot2021-12-191-12/+14
| | | | Signed-off-by: Laurent Bercot <ska@appnovation.com>
* Add opendir_at, prepare for 2.11.1.0Laurent Bercot2021-12-043-2/+19
| | | | Signed-off-by: Laurent Bercot <ska@appnovation.com>
* Don't return voidLaurent Bercot2021-10-301-1/+1
| | | | | | | Error by: Studio 12.6 Sun C 5.15 SunOS_i386 2017/05/30 Reported by schmonz Signed-off-by: Laurent Bercot <ska@appnovation.com>
* Axe iobufferLaurent Bercot2021-09-2520-641/+27
| | | | Signed-off-by: Laurent Bercot <ska@appnovation.com>
* Don't forget child_spawn eitherLaurent Bercot2021-09-025-22/+22
| | | | Signed-off-by: Laurent Bercot <ska@appnovation.com>
* Don't forget textclient_commandvLaurent Bercot2021-09-021-1/+1
| | | | Signed-off-by: Laurent Bercot <ska@appnovation.com>
* Make textclient_command work with errno > 127Laurent Bercot2021-09-021-1/+1
| | | | Signed-off-by: Laurent Bercot <ska@appnovation.com>
* Infinite recursion my ass cheeksLaurent Bercot2021-09-021-1/+1
| | | | | | Sometimes clang warnings have a point. Signed-off-by: Laurent Bercot <ska@appnovation.com>
* fix selfpipe_tophalf typeLaurent Bercot2021-08-261-1/+1
| | | | Signed-off-by: Laurent Bercot <ska@appnovation.com>
* Add ipc_bind_reuse_permsLaurent Bercot2021-08-223-3/+22
| | | | Signed-off-by: Laurent Bercot <ska@appnovation.com>
* Add tain_infiniteLaurent Bercot2021-08-182-0/+6
| | | | Signed-off-by: Laurent Bercot <ska@appnovation.com>
* Add some ip46 macrosLaurent Bercot2021-08-182-0/+26
| | | | Signed-off-by: Laurent Bercot <ska@appnovation.com>
* Add sig_altignore()2.11.0.0Laurent Bercot2021-07-292-0/+16
| | | | Signed-off-by: Laurent Bercot <ska@appnovation.com>
* Huge incompatible changes.Laurent Bercot2021-07-28364-1687/+1065
| | | | | | | | | | | | - Obsolete skalibs/environ.h and skalibs/getpeereid.h removed. - rc4 and md5 removed. - All *_t types renamed to avoid treading on POSIX namespace. - subgetopt() renamed to lgetopt(). - signal functions reworked; skasigaction removed; sig_stack removed - Various functions removed: skaoffsetof(), selfpipe_untrap() - New posixplz function: munmap_void. Signed-off-by: Laurent Bercot <ska@appnovation.com>
* Don't use dirfd as an identifierLaurent Bercot2021-07-241-2/+2
| | | | Signed-off-by: Laurent Bercot <ska@appnovation.com>
* Hide cdb_find_state in the common caseLaurent Bercot2021-07-243-52/+62
| | | | Signed-off-by: Laurent Bercot <ska@appnovation.com>
* Add cdb_init_at and cdb_init_fromfd, rename cdb_readerLaurent Bercot2021-07-246-31/+54
| | | | Signed-off-by: Laurent Bercot <ska@appnovation.com>
* New 2.11.0.0 branch with several modificationsLaurent Bercot2021-07-2349-736/+240
| | | | | | | | - libbiguint removed - cdb_make changed to cdbmake (because different ui) - cdb redesigned Signed-off-by: Laurent Bercot <ska@appnovation.com>
* Save errno when freeing a cdbLaurent Bercot2021-07-211-1/+8
| | | | Signed-off-by: Laurent Bercot <ska@appnovation.com>
* bugfix: offset in cdb mmapLaurent Bercot2021-06-302-3/+3
| | | | | | | An offset of -1 worked because most OSes treat it as 0, but DS9k would fail on it. Signed-off-by: Laurent Bercot <ska@appnovation.com>
* cdb always mmapsLaurent Bercot2021-06-294-43/+29
| | | | Signed-off-by: Laurent Bercot <ska@appnovation.com>
* gccattributes.h: define gccattr_returns_twiceLaurent Bercot2021-06-141-0/+3
| | | | Signed-off-by: Jesse Young <jlyo@jlyo.org>
* doc: allreadwrite: document scatter/gatter functionsLaurent Bercot2021-06-141-3/+2
| | | | Signed-off-by: Jesse Young <jlyo@jlyo.org>
* Cosmetic fixesLaurent Bercot2021-05-143-10/+9
|
* bugfix: ipc_bind_reuse_lock must ignore umaskLaurent Bercot2021-02-131-1/+2
|
* Align infinity on 2^61Laurent Bercot2021-01-271-1/+1
|
* Don't touch /dev/urandom when getrandom() existsLaurent Bercot2021-01-151-9/+8
|
* bugfix: genqdyn_n() definitionLaurent Bercot2021-01-121-3/+3
|
* Add chroot sysdep, fix endianness sysdep string in .hLaurent Bercot2020-12-141-0/+20
|
* Add mkptemp2()Laurent Bercot2020-12-093-15/+26
|
* Get rid of webipc.h and DJBUNIX_FLAG_*Laurent Bercot2020-12-0929-141/+139
| | | | | | | | | | | | | | Decent semantic header separation is hard. It's always an ongoing process. Here socket.h always included webipc.h for listen(), and webipc.h always included djbunix.h for socket_internal() and socketpair_internal(). That's ugh. Just move all the socket stuff into one socket header. Of course, djbunix.h is still needed most of the time for fd_close() and other operations on fds, but those are generic anyway. Also, O_CLOEXEC exists everywhere now, so we can use it as well as O_NONBLOCK instead of redefining the flags in djbunix.h.
* Some trivial bugfixes and cleanupsLaurent Bercot2020-12-079-8/+14
|
* Fix iobufferk_init on recent Linux; remove last superfluous coeLaurent Bercot2020-12-043-20/+9
|
* Add documenting comments to exec.hLaurent Bercot2020-12-041-26/+19
|