aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/random/randomdev.c
diff options
context:
space:
mode:
authorMark Murray <markm@FreeBSD.org>2000-11-25 20:08:07 +0000
committerMark Murray <markm@FreeBSD.org>2000-11-25 20:08:07 +0000
commit5d4e386e64d9632dc652c915673ac013eb97acbf (patch)
tree8ad060c21d7c4725a400b2d920c3c7421b9777e1 /sys/dev/random/randomdev.c
parentbadfcb1bef026d0f12b356b295c147752f55936b (diff)
downloadsrc-5d4e386e64d9632dc652c915673ac013eb97acbf.tar.gz
src-5d4e386e64d9632dc652c915673ac013eb97acbf.zip
D'uh. The explicit reseed was happening at the wrong security/privelige
levels.
Notes
Notes: svn path=/head/; revision=69174
Diffstat (limited to 'sys/dev/random/randomdev.c')
-rw-r--r--sys/dev/random/randomdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/random/randomdev.c b/sys/dev/random/randomdev.c
index 37aeb3da9e3f..6c9ee849034a 100644
--- a/sys/dev/random/randomdev.c
+++ b/sys/dev/random/randomdev.c
@@ -107,7 +107,7 @@ random_open(dev_t dev, int flags, int fmt, struct proc *p)
static int
random_close(dev_t dev, int flags, int fmt, struct proc *p)
{
- if ((flags & FWRITE) && (securelevel > 0 || suser(p)))
+ if ((flags & FWRITE) && !(securelevel > 0 || suser(p)))
random_reseed();
return 0;
}