Commit Graph

48 Commits

Author SHA1 Message Date
riastradh db8ca554ec Use <sys/rndio.h> instead of <sys/rnd.h>. 2015-04-13 22:18:50 +00:00
wiz d3df20dd66 Sync usage with manpage a bit more. 2014-08-10 17:13:14 +00:00
wiz 233b62b2e9 Sort options and mark them as optional.
Bump date for previous.
2014-08-10 17:13:02 +00:00
tls ea6af427bd Merge tls-earlyentropy branch into HEAD. 2014-08-10 16:44:32 +00:00
apb 81c929ad04 Overwrite the seed file from the beginning, using pwrite(2). 2014-01-15 15:05:27 +00:00
joerg 8e1ba910ea Fix arguments for write. 2014-01-15 10:13:25 +00:00
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
wiz 69d02ecf2f Sort option descriptions, bump date for previous. 2011-11-23 12:15:30 +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
pgoyette 0b5ef36c08 Fix typo 2011-10-01 02:55:00 +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 cf9d39220a Add a list of device types for use with "rndctl -t ${typename}". 2009-01-04 12:01:43 +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
apb 046bb95d46 Adjust synopsis and description to make it clear that -d devname and
-t devtype are mutually exclusive.
2008-11-06 15:58:16 +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
wiz 990562bfef .Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.
2003-02-25 10:34:36 +00:00
wiz 09cbac4e7f New sentence, new line. From Robert Elz. 2002-10-03 15:41:44 +00:00
wiz 90158afe92 Sort options. Fix grammar. Use more mdoc. 2002-10-01 14:39:51 +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
ross dc5571b22e Generate <>& symbolically. I'm avoiding .../dist/... directories for now. 2002-02-08 01:21:55 +00:00
wiz e8e51dce31 Sort sections, use standard headers, sort SEE ALSO. 2001-11-16 12:08:19 +00:00
wiz 4ce43ae0cd Whitespace nits 2001-11-16 10:25:42 +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
wiz 73f545bb5b Drop arguments of .Os. 2001-06-05 11:22:41 +00:00
enami 9b6f3e1ce2 Don't explain -s twice. 2000-10-05 03:24:41 +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
erh fa45851f9b Add missing .El line. 1999-03-10 05:14:51 +00:00
explorer 91d6272def flags and type are seperate now 1999-02-28 17:42:37 +00:00
msaitoh f8c66df30b sort entries and delete extra periods in SEE also section. 1998-05-22 18:27:50 +00:00
perry 3fe138c146 RCS Id Police. 1998-01-09 08:03:16 +00:00
explorer 538f5cb890 Update copyright message (I wrote this, not the template of the day) 1997-11-04 05:47:24 +00:00
enami 0d4522a03f Fix .Nm usage. 1997-10-20 09:11:16 +00:00
mycroft ea1e38924b Remove bogons. 1997-10-13 14:16: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