Commit Graph

25 Commits

Author SHA1 Message Date
jruoho
dd68a56f79 Use _PATH_URANDOM from paths(3). 2012-08-14 14:41:07 +00:00
tls
7b0b7dedd9 Entropy-pool implementation move and cleanup.
1) Move core entropy-pool code and source/sink/sample management code
   to sys/kern from sys/dev.

2) Remove use of NRND as test for presence of entropy-pool code throughout
   source tree.

3) Remove use of RND_ENABLED in device drivers as microoptimization to
   avoid expensive operations on disabled entropy sources; make the
   rnd_add calls do this directly so all callers benefit.

4) Fix bug in recent rnd_add_data()/rnd_add_uint32() changes that might
   have lead to slight entropy overestimation for some sources.

5) Add new source types for environmental sensors, power sensors, VM
   system events, and skew between clocks, with a sample implementation
   for each.

ok releng to go in before the branch due to the difficulty of later
pullup (widespread #ifdef removal and moved files).  Tested with release
builds on amd64 and evbarm and live testing on amd64.
2012-02-02 19:42:57 +00:00
apb
d560323cc4 Make "rndctl -L" overwrite the file with zeros, not with the
same data that was just read from the file.
2011-12-17 13:18:20 +00:00
tls
aae64c95c0 Make the rndsave structure public -- the kernel will learn to read it
and sysinst may learn to write it (since, on some systems, most of
the keyboard input they ever get happens to be during install).  Fix a
couple of minor problems with the random_seed rc script addition.
2011-11-26 01:17:17 +00:00
tls
4924aa205a Load entropy at system boot (only works at securelevel < 1); save
at system shutdown.  Disable with random_seed=NO in rc.conf if desired.

Goes to some trouble to never load or save to network filesystems.

Entropy should really be loaded by the boot loader but I am still
sorting out how to pass it to the kernel.
2011-11-23 10:47:48 +00:00
joerg
fdbae3b9b7 static + const + __dead 2011-08-27 18:48:59 +00:00
lukem
7b61bfdc7c fix sign-compare issues 2009-04-05 12:06:33 +00:00
apb
88ba92672f * Instead of silently ignoring extra args, print a usage error. This
adddresses the silent failure reported in PR 39862 by Brian A. Seklecki
* Adjust usage message to match the synopsis in the man page.
2008-11-06 16:01:54 +00:00
christos
2c6eadc9ce Move WARNS=3 to the Makefile.inc, and add a little const to the remaining
programs that did not compile before.
2005-06-27 01:00:04 +00:00
itojun
b5bc655b98 strlcat 2003-07-13 07:59:24 +00:00
agc
c2a3b5ec84 Add NetBSD RCS Ids. 2003-06-23 11:53:35 +00:00
itojun
262bdee727 do not hardcode buffer size 2003-05-17 23:16:47 +00:00
gmcgarry
a104b7da81 Type 'network' was an alias for 'net' and was changed to "net" in
rev 1.5.  Remove duplicate.  Reported by Christian Biere in PR17976.
2002-08-18 23:45:48 +00:00
enami
1fd6d975ac Since all members in rndpoolstat_t are unsigned, print them so. PR#14584. 2002-05-19 09:47:10 +00:00
enami
36c88aab99 - Recognize new type `rng'.
- Use getprogname().
2001-09-11 05:52:37 +00:00
enami
db33b671a9 Don't punt on really unknown type of device when fetching name of it.
Instead, warn and just print it as ???.
2001-09-08 23:29:05 +00:00
enami
d5b9e6ab8a Cosmetic changes. 2001-09-08 23:20:37 +00:00
joda
6532bb554c document -s 2000-08-28 13:27:37 +00:00
joda
4f419afab1 initialize sflag to zero; discovered on Digital UNIX, where I got
random (no pun intended) functionality
2000-08-25 16:47:17 +00:00
sommerfeld
e62920cf2e revised rndctl which can display pool statistics. 2000-06-20 02:40:10 +00:00
mycroft
479f35bc93 Make the usage string match the man page. 1999-03-30 17:32:44 +00:00
explorer
91d6272def flags and type are seperate now 1999-02-28 17:42:37 +00:00
perry
3fe138c146 RCS Id Police. 1998-01-09 08:03:16 +00:00
explorer
dc1765641f clean up warnings, gads 1997-10-13 04:05:58 +00:00
explorer
9a1e5bf2d3 Add rndctl(8) and man page 1997-10-13 03:58:05 +00:00