summaryrefslogtreecommitdiff
path: root/lib/libc/gen
AgeCommit message (Collapse)Author
2023-06-30getentropy(3): use .Sx to xref CAVEATSuwe
2023-06-30getrandom(2), getentropy(3): Rework man pages.riastradh
Make supportable promises. Omit needless verbiage. Give caveats with cross-references to entropy(7). Emphasize that security is necessarily relative to system configuration. XXX pullup-10
2023-06-29vis(3): Avoid nonportable MIN in portable code.riastradh
2023-01-22fmtmsg.3: fix typorillig
2023-01-18KNF nit: opening brace of a function on next line.simonb
2023-01-05Add errc() and verrc() to the list of functions which do not return,kre
but exit() instead. This was omitted when the *c() set of functions were added in 2014.
2022-12-06getbsize(3): Use .Ev for BLOCKSIZEuwe
2022-12-04lib: Mark up error names in man pages with .Eruwe
2022-12-04Sections 2 and 3 have RETURN VALUES, not DIAGNOSTICSuwe
2022-11-10closefrom.3: add a history sectiongutteridge
2022-10-26fix RCSID.andvar
2022-09-13pthread_atfork(3): Block signals during the call to pthread_atfork.riastradh
This doesn't affect the calls to the atfork handlers -- it only protects access to the lists of handlers from interruption by a signal, in case the signal handler calls fork(2).
2022-05-31libc: Reintroduce getentropy.riastradh
This was introduced two years ago when the getrandom/getentropy API question was still open, and removed because the discussion was ongoing. Now getentropy is more widely adopted and soon to be in POSIX. So reintroduce the symbol into libc since we'll be keeping it anyway. Discussion of details of the semantics, as interpreted by NetBSD, is ongoing, but the symbol needs to get in before the netbsd-10 branch. The draft POSIX text is (https://www.opengroup.org/austin/docs/austin_1110.pdf): SYNOPSIS #include <unistd.h> int getentropy(void *buffer, size_t length); DESCRIPTION The getentropy() function shall write length bytes of data starting at the location pointed to by buffer. The output shall be unpredictable high quality random data, generated by a cryptographically secure pseudo-random number generator. The maximum permitted value for the length argument is given by the {GETENTROPY_MAX} symbolic constant defined in <limits.h>. RETURN VALUES Upon successful completion, getentropy() shall return 0; otherwise, -1 shall be retunred and errno set to indicate the error. ERRORS The getentropy() function shall fail if: [EINVAL] The value of length is greater than {GETENTROPY_MAX}. The getentropy() function may fail if: [ENOSYS] The system does not provide the necessary source of entropy. RATIONALE The getentropy() function is not a cancellation point. Minor changes from the previous introduction of getentropy into libc: - Return EINVAL, not EIO, on buflen > 256. - Define GETENTROPY_MAX in limits.h. The declaration of getentropy in unistd.h and definition of GETENTROPY_MAX in limits.h are currently conditional on _NETBSD_SOURCE. When the next revision of POSIX is finalized, we can expose them also under _POSIX_C_SOURCE > 20yymmL as usual -- and this can be done as a pullup without breaking existing compiled programs.
2022-05-31fix various typos in comments, documentation and messages.andvar
2022-05-15s/wich/which in comments.andvar
2022-04-19lib: remove CONSTCOND commentrillig
Since 2021-01-31, lint doesn't need it anymore for the common pattern of 'do ... while (0)'.
2022-04-16fix various typos in comments and log messages.andvar
2022-03-27popen.3: revert s/null-/nul-/ change, this is subject to debategutteridge
2022-03-24popen.3: minor spelling, grammar, style, and xref tweaksgutteridge
2022-03-12reallocarr returns errno. preserve it.christos
2022-03-12setmode(3): use reallocarr instead of realloc(x * y)nia
2022-03-12setmode(3): use reallocarr instead of malloc(x * y)nia
2022-01-04exec(3): execlpe() first argument should be named "file"uwe
"path" arguments are names used as-is, "file" arguments to "p" functions are used to construct the pathname using $PATH if necessary.
2021-12-10s/occured/occurred/ in comments, log messages and man pages.andvar
2021-12-10s/unaccessible/inaccessible/andvar
2021-12-05s/numberic/numeric/ in comment.msaitoh
2021-11-15More cleanups and typo corrections.kre
2021-11-15Clean up.wiz
2021-11-15Sort SEE ALSO.wiz
2021-11-15Add man pages for posix_spawn_file_actions_add{f,}chdir from piyushchristos
2021-11-07Commit the userland portion of the posix_spawn_chdir project by Piyush Sachdevachristos
2021-11-02fts(3): Use reallocarr instead of realloc(x * y), eliminate a temporarynia
variable.
2021-10-29Add "--" 'options end' parameter to the sh -c call that runs thekre
command, so that the command cannot appear to be more options (which always then fails, as there would be no arg for "-c" to treat as the command string in that case). For the full (LONG) explanation, see: http://mail-index.netbsd.org/current-users/2021/10/29/msg041629.html
2021-10-29scandir(3): Convert malloc(x * y) and realloc(x * y) to reallocarrnia
2021-09-11Add missing double p and d for stopped and overriden accordingly.andvar
Fix few more typos along the way, mainly in copy-pasted comments.
2021-09-11popen.3: move popenve from BUGS to HISTORYrillig
2021-08-09fix various typos in compatibility, mainly in comments.andvar
2021-08-07typodholland
2021-07-11Make sure dd_size is init'd, even when nothing has been read (so itkre
will be 0). Reported on tech-userlevel by Mouse 20210711T044753+0000
2021-06-18PR/56260: Alex Richardson: Out-of-bounds stack read in lib/libc/gen/vis.cchristos
Also sync with other FreeBSD changes.
2021-05-24Clarify what happens when you longjmp(..., 0).riastradh
Derived from C99 7.13.2.1 `The longjmp function'.
2021-05-03Add links for the other functions documented in arc4random(3).simonb
2021-05-03Whitespace police.simonb
2021-04-20Instead of compiling files with -fcommon, create an include file and declarechristos
the 3 symbols that need to be common using an attribute. Put all the 3 symbol definitions in libc in one place (initfini.c). Reviewed by joerg@
2021-04-12use -fcommon where necessary.mrg
2021-03-30libc/gen: fix hack for previously unsupported lint initializersrillig
Supported since init.c 1.182 from 2021-03-30.
2021-03-11s/skiping/skipping/msaitoh
2021-03-10Add manpage links for asysctl(3) and asysctlbyname(3), already describedsimonb
in sysctl(3).
2021-02-26Fix xref, add missing word.wiz
2021-02-26Add missing endutent.3 to MAN.rin