summaryrefslogtreecommitdiffstats
path: root/sys/dev/random/randomdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/random/randomdev.c')
-rw-r--r--sys/dev/random/randomdev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/random/randomdev.c b/sys/dev/random/randomdev.c
index bb7440c..9db07a1 100644
--- a/sys/dev/random/randomdev.c
+++ b/sys/dev/random/randomdev.c
@@ -147,7 +147,7 @@ random_open(dev_t dev __unused, int flags, int fmt __unused, struct thread *td)
int error;
if (flags & FWRITE) {
- error = suser(td->td_proc);
+ error = suser(td);
if (error)
return (error);
error = securelevel_gt(td->td_ucred, 0);
@@ -162,7 +162,7 @@ static int
random_close(dev_t dev __unused, int flags, int fmt __unused, struct thread *td)
{
if (flags & FWRITE) {
- if (!(suser(td->td_proc) ||
+ if (!(suser(td) ||
securelevel_gt(td->td_ucred, 0)))
random_reseed();
}
OpenPOWER on IntegriCloud