History log of /openbsd-src/lib/libc/stdlib/random.c (Results 1 – 25 of 31)
Revision Date Author Comments
# e34cb67c 28-Nov-2017 tb <tb@openbsd.org>

GNU ld has prefixed the contents of .gnu.warning.SYMBOL sections
with "warning: " since 2003, so the messages themselves need not
contain the prefix anymore.

From Scott Cheloha
ok jca, deraadt


# c6cbd355 05-Apr-2016 guenther <guenther@openbsd.org>

Prefer _MUTEX_*LOCK over _THREAD_PRIVATE_MUTEX_*LOCK() when thread-specific
data isn't necessary.

ok mpi@, ok&tweak natano@


# aea60bee 16-Jan-2015 deraadt <deraadt@openbsd.org>

Move to the <limits.h> universe.
review by millert, binary checking process with doug, concept with guenther


# 26a0a4c4 16-Dec-2014 sthen <sthen@openbsd.org>

typo; ok deraadt


# 0e6cb3cf 16-Dec-2014 deraadt <deraadt@openbsd.org>

warn for correct symbol


# de928067 09-Dec-2014 deraadt <deraadt@openbsd.org>

improve warnings from rand_r(), rand(), and random()
It may take a few iterations to get the tone right.
previously discussed with millert


# f7510a6e 08-Dec-2014 deraadt <deraadt@openbsd.org>

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 subs

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

show more ...


# 57b09d85 13-Oct-2014 chl <chl@openbsd.org>

remove unused variable

ok tedu@


# 00694a1d 13-Jul-2014 tedu <tedu@openbsd.org>

once srandomdev() is called, switch to using arc4random() but mask off the
high bit as required by posix. wouldn't want to break any standards.
idea and ok deraadt


# c8689e2e 15-Jun-2014 deraadt <deraadt@openbsd.org>

oops, typo. James Hartley is fast at trying -current


# ecdcc353 15-Jun-2014 deraadt <deraadt@openbsd.org>

In srandomdev(), use arc4random_buf() instead of from the kernel.
discussion with matthew


# b53a866d 13-Jun-2014 deraadt <deraadt@openbsd.org>

use getentropy; from matthew


# 3d4cb4cc 01-Aug-2013 kettenis <kettenis@openbsd.org>

Add linker warnings for rand() and random() and various related functions.

ok deraadt@


# bb2902e7 15-Mar-2013 tedu <tedu@openbsd.org>

threadsafe random().
reported by ajacoutot and (much earlier, sorry) by Alexey Suslikov


# b10cd188 01-Jun-2012 guenther <guenther@openbsd.org>

Improve standards conformance: ecvt(), fcvt(), gcvt(), mktemp(), ttyslot(),
and valloc() are not in the current version, while posix_memalign() mkstemp(),
and mkdtemp() are, and setstate()'s argument

Improve standards conformance: ecvt(), fcvt(), gcvt(), mktemp(), ttyslot(),
and valloc() are not in the current version, while posix_memalign() mkstemp(),
and mkdtemp() are, and setstate()'s argument has lost a bogus 'const'.

ok millert@ jmc@ espie@ kettenis@; ports build testing by naddy@

show more ...


# ec4c3b82 21-Mar-2012 millert <millert@openbsd.org>

Fix a bug where random() always returns 0 when srandom() is seeded
with 0. Use 1 and not 0 as the first element of the state array,
similar to what glibc does. OK nicm@


# 05aaf954 30-Nov-2005 otto <otto@openbsd.org>

Use sysctl(KERN_ARND) to get n bytes, instead of just 4 at a time
and remove fallback code. If somebody is dumb enough to make the
sysctl fail using systrace, he deserves what he gets. Saves 7 syscal

Use sysctl(KERN_ARND) to get n bytes, instead of just 4 at a time
and remove fallback code. If somebody is dumb enough to make the
sysctl fail using systrace, he deserves what he gets. Saves 7 syscalls
on process startup.
looks good miod@ ok deraadt@ tedu@

show more ...


# c2c925de 08-Aug-2005 espie <espie@openbsd.org>

zap remaining rcsid.

Kill old files that are no longer compiled.

okay theo


# d8bc04e4 30-Mar-2005 pat <pat@openbsd.org>

ansi + de-register

ok otto deraadt


# 6580fee3 02-Jun-2003 millert <millert@openbsd.org>

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999. Proofed by myself and Theo.


# 17ba7080 28-Feb-2003 millert <millert@openbsd.org>

Use int32_t, not long since this deals with 32bit quantities.
Inspired by a change in NetBSD and reported by Jan Johansson.


# 99d815f8 06-Dec-2002 millert <millert@openbsd.org>

In srandomdev(), if we can't access /dev/arandom, use the sysctl() instead.
We don't want to use the sysctl() by default since we are reading more
than just a few bytes of entropy when setting up the

In srandomdev(), if we can't access /dev/arandom, use the sysctl() instead.
We don't want to use the sysctl() by default since we are reading more
than just a few bytes of entropy when setting up the state.

show more ...


# cbf1311a 04-Apr-2000 millert <millert@openbsd.org>

Fix the leak for real (that's what I get for hacking when i can't sleep).


# 13446e16 04-Apr-2000 millert <millert@openbsd.org>

Fix an fd leak if the read from /dev/arandom fails. Pointed out by
Markus Friedl.


# 9b26c4b3 03-Apr-2000 millert <millert@openbsd.org>

Add srandomdev() from FreeBSD for use by sendmail and others.


12