summaryrefslogtreecommitdiffstats
path: root/sys/dev/random
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>2000-11-25 20:08:07 +0000
committermarkm <markm@FreeBSD.org>2000-11-25 20:08:07 +0000
commit24be0469f9100377c4aafdb8a17bb2624a3dde61 (patch)
treebb56b0e2c9f6b404a207ce2a89f2fd36ada7583c /sys/dev/random
parente31e67991ff57d05c8cbd7e1dd7b61025bf9da8f (diff)
downloadFreeBSD-src-24be0469f9100377c4aafdb8a17bb2624a3dde61.zip
FreeBSD-src-24be0469f9100377c4aafdb8a17bb2624a3dde61.tar.gz
D'uh. The explicit reseed was happening at the wrong security/privelige
levels.
Diffstat (limited to 'sys/dev/random')
-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 37aeb3d..6c9ee84 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;
}
OpenPOWER on IntegriCloud