diff options
author | green <green@FreeBSD.org> | 2004-02-20 04:08:28 +0000 |
---|---|---|
committer | green <green@FreeBSD.org> | 2004-02-20 04:08:28 +0000 |
commit | bf4ea3aa0d6dbae1deda3f2e95d4ed3c77866ef7 (patch) | |
tree | 22e5a9061ea7dd5b09501920f3630e702a17ccd8 /lib/libc | |
parent | 59b7a05d47a71d19ef8540b882ab62c6ac273af1 (diff) | |
download | FreeBSD-src-bf4ea3aa0d6dbae1deda3f2e95d4ed3c77866ef7.zip FreeBSD-src-bf4ea3aa0d6dbae1deda3f2e95d4ed3c77866ef7.tar.gz |
Document dependence of mktemp(3) on the non-reentrant arc4random(3).
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/stdio/mktemp.3 | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/libc/stdio/mktemp.3 b/lib/libc/stdio/mktemp.3 index e875a03..432d0de 100644 --- a/lib/libc/stdio/mktemp.3 +++ b/lib/libc/stdio/mktemp.3 @@ -219,6 +219,13 @@ and the return status of the call should be tested for failure. This will ensure that the program does not continue blindly in the event that an attacker has already created the file with the intention of manipulating or reading its contents. +.Pp +The implementation of these functions calls +.Xr arc4random 3 , +which is not reentrant. +You must provide your own locking around this and other consumers of the +.Xr arc4random 3 +API. .Sh SEE ALSO .Xr chmod 2 , .Xr getpid 2 , |