Module Name: src
Committed By: riastradh
Date: Sun Mar 2 22:53:45 UTC 2025
Modified Files:
src/lib/libc/gen: arc4random.c
Log Message:
arc4random(3): Update comments to reflect removal of failure modes.
PR lib/59117: arc4random has some failure modes it shouldn't
To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/lib/libc/gen/arc4random.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libc/gen/arc4random.c
diff -u src/lib/libc/gen/arc4random.c:1.40 src/lib/libc/gen/arc4random.c:1.41
--- src/lib/libc/gen/arc4random.c:1.40 Sun Mar 2 22:46:23 2025
+++ src/lib/libc/gen/arc4random.c Sun Mar 2 22:53:45 2025
@@ -1,4 +1,4 @@
-/* $NetBSD: arc4random.c,v 1.40 2025/03/02 22:46:23 riastradh Exp $ */
+/* $NetBSD: arc4random.c,v 1.41 2025/03/02 22:53:45 riastradh Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -42,17 +42,16 @@
*
* The arc4random(3) API may abort the process if:
*
- * (a) the crypto self-test fails,
- * (b) pthread_atfork or thr_keycreate fail, or
- * (c) sysctl(KERN_ARND) fails when reseeding the PRNG.
+ * (a) the crypto self-test fails, or
+ * (b) sysctl(KERN_ARND) fails when reseeding the PRNG.
*
- * The crypto self-test, pthread_atfork, and thr_keycreate occur only
- * once, on the first use of any of the arc4random(3) API. KERN_ARND
- * is unlikely to fail later unless the kernel is seriously broken.
+ * The crypto self-test occurs only once, on the first use of any of
+ * the arc4random(3) API. KERN_ARND is unlikely to fail later unless
+ * the kernel is seriously broken.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: arc4random.c,v 1.40 2025/03/02 22:46:23 riastradh Exp $");
+__RCSID("$NetBSD: arc4random.c,v 1.41 2025/03/02 22:53:45 riastradh Exp $");
#include "namespace.h"
#include "reentrant.h"