diff options
Diffstat (limited to 'usr/src/uts/common/io/random.c')
-rw-r--r-- | usr/src/uts/common/io/random.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/usr/src/uts/common/io/random.c b/usr/src/uts/common/io/random.c index c4984e956f..b5401b17cd 100644 --- a/usr/src/uts/common/io/random.c +++ b/usr/src/uts/common/io/random.c @@ -20,6 +20,8 @@ * * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. + * + * Copyright 2016 Joyent, Inc. */ @@ -289,6 +291,9 @@ rnd_write(dev_t dev, struct uio *uiop, cred_t *credp) if ((error = uiomove(buf, bytes, UIO_WRITE, uiop)) != 0) return (error); + if (crgetzone(credp) != global_zone) + continue; + switch (devno) { case DEVRANDOM: if ((error = random_add_entropy(buf, bytes, 0)) != 0) |