summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/Makefile.inc
diff options
context:
space:
mode:
authorderaadt <>2014-12-08 21:45:20 +0000
committerderaadt <>2014-12-08 21:45:20 +0000
commit9736a7f2a9e739ee9fc431040def5680fbb8794a (patch)
treebf17a76201de02c2ce50358a383001a6b6c5cc64 /src/lib/libc/stdlib/Makefile.inc
parentc8f8008b6d95ffedabe97be1582beacd08ae7afb (diff)
downloadopenbsd-9736a7f2a9e739ee9fc431040def5680fbb8794a.tar.gz
openbsd-9736a7f2a9e739ee9fc431040def5680fbb8794a.tar.bz2
openbsd-9736a7f2a9e739ee9fc431040def5680fbb8794a.zip
Change rand(), random(), drand48(), lrand48(), mrand48(), and srand48()
to returning strong random by default, source from arc4random(3). Parameters to the seeding functions are ignored, and the subsystems remain in strong random mode. If you wish the standardized deterministic mode, call srand_deterministic(), srandom_determistic(), srand48_deterministic(), seed48_deterministic() or lcong48_deterministic() instead. The re-entrant functions rand_r(), erand48(), nrand48(), jrand48() are unaffected by this change and remain in deterministic mode (for now). Verified as a good roadmap forward by auditing 8800 pieces of software. Roughly 60 pieces of software will need adaptation to request the deterministic mode. Violates POSIX and C89, which violate best practice in this century. ok guenther tedu millert
Diffstat (limited to '')
-rw-r--r--src/lib/libc/stdlib/Makefile.inc10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/libc/stdlib/Makefile.inc b/src/lib/libc/stdlib/Makefile.inc
index 3a13d9ff1a..3e99fe112d 100644
--- a/src/lib/libc/stdlib/Makefile.inc
+++ b/src/lib/libc/stdlib/Makefile.inc
@@ -1,4 +1,4 @@
1# $OpenBSD: Makefile.inc,v 1.56 2014/12/08 20:39:16 tedu Exp $ 1# $OpenBSD: Makefile.inc,v 1.57 2014/12/08 21:45:20 deraadt Exp $
2 2
3# stdlib sources 3# stdlib sources
4.PATH: ${LIBCSRCDIR}/arch/${MACHINE_CPU}/stdlib ${LIBCSRCDIR}/stdlib 4.PATH: ${LIBCSRCDIR}/arch/${MACHINE_CPU}/stdlib ${LIBCSRCDIR}/stdlib
@@ -43,12 +43,14 @@ MLINKS+=malloc.3 free.3 malloc.3 realloc.3 malloc.3 calloc.3
43MLINKS+=malloc.3 reallocarray.3 43MLINKS+=malloc.3 reallocarray.3
44MLINKS+=qsort.3 heapsort.3 qsort.3 mergesort.3 44MLINKS+=qsort.3 heapsort.3 qsort.3 mergesort.3
45MLINKS+=radixsort.3 sradixsort.3 45MLINKS+=radixsort.3 sradixsort.3
46MLINKS+=rand.3 srand.3 rand.3 rand_r.3 46MLINKS+=rand.3 srand.3 rand.3 rand_r.3 rand.3 srand_deterministic.3
47MLINKS+=random.3 initstate.3 random.3 setstate.3 47MLINKS+=random.3 initstate.3 random.3 setstate.3
48MLINKS+=random.3 srandom.3 random.3 srandomdev.3 48MLINKS+=random.3 srandom.3 random.3 srandomdev.3 random.3 srandom_deterministic.3
49MLINKS+=rand48.3 drand48.3 rand48.3 erand48.3 rand48.3 lrand48.3 49MLINKS+=rand48.3 drand48.3 rand48.3 erand48.3 rand48.3 lrand48.3
50MLINKS+=rand48.3 mrand48.3 rand48.3 nrand48.3 rand48.3 jrand48.3 50MLINKS+=rand48.3 mrand48.3 rand48.3 nrand48.3 rand48.3 jrand48.3
51MLINKS+=rand48.3 srand48.3 rand48.3 seed48.3 rand48.3 lcong48.3 51MLINKS+=rand48.3 srand48.3 rand48.3 srand48_deterministic.3
52MLINKS+=rand48.3 seed48.3 rand48.3 seed48_deterministic.3
53MLINKS+=rand48.3 lcong48.3 rand48.3 lcong48_deterministic.3
52MLINKS+=ptsname.3 grantpt.3 ptsname.3 unlockpt.3 54MLINKS+=ptsname.3 grantpt.3 ptsname.3 unlockpt.3
53MLINKS+=strtod.3 strtof.3 strtod.3 strtold.3 55MLINKS+=strtod.3 strtof.3 strtod.3 strtold.3
54MLINKS+=strtol.3 strtoll.3 strtol.3 strtoq.3 strtol.3 strtoimax.3 56MLINKS+=strtol.3 strtoll.3 strtol.3 strtoq.3 strtol.3 strtoimax.3