diff options
| author | Jerry Jelinek <jerry.jelinek@joyent.com> | 2015-04-08 16:01:25 +0000 |
|---|---|---|
| committer | Jerry Jelinek <jerry.jelinek@joyent.com> | 2015-04-08 16:01:25 +0000 |
| commit | a72f8b51ab96881c2bb6022f67bb3d835b6a5642 (patch) | |
| tree | a83b38e3b34a112ec7ed4bf8a679dfc2b9ee2f9a /usr/src/uts/common/io/zfd.c | |
| parent | 910e97a0dff98308e6a74265d3e2bbec4e75e6a7 (diff) | |
| download | illumos-joyent-a72f8b51ab96881c2bb6022f67bb3d835b6a5642.tar.gz | |
OS-4108 'zlogin -I' should have some way to know that /dev/zfd/0 is being read inside the zone
Diffstat (limited to 'usr/src/uts/common/io/zfd.c')
| -rw-r--r-- | usr/src/uts/common/io/zfd.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/usr/src/uts/common/io/zfd.c b/usr/src/uts/common/io/zfd.c index 0b52a9179d..3edaa62bbe 100644 --- a/usr/src/uts/common/io/zfd.c +++ b/usr/src/uts/common/io/zfd.c @@ -694,6 +694,21 @@ zfd_wput(queue_t *qp, mblk_t *mp) M_HANGUP); miocack(qp, mp, 0, 0); return; + case ZFD_HAS_SLAVE: + /* + * The process that passed the ioctl must be running in + * the global zone. + */ + if (crgetzoneid(iocbp->ioc_cr) != GLOBAL_ZONEID) { + miocack(qp, mp, 0, EINVAL); + return; + } + if ((zfds->zfd_state & ZFD_STATE_SOPEN) != 0) { + miocack(qp, mp, 0, 0); + } else { + miocack(qp, mp, 0, ENOTTY); + } + return; default: break; } |
