diff options
| author | marks <none@none> | 2008-01-29 09:30:50 -0800 |
|---|---|---|
| committer | marks <none@none> | 2008-01-29 09:30:50 -0800 |
| commit | 0616c50e4599a5a6e28907629ef1e590d70dff7c (patch) | |
| tree | b111ccbb856cf464b5491388b1e2adb1cc648af1 /usr/src | |
| parent | c6f08383a2dc4e4b97e3bd267c9e7e4c49c9536e (diff) | |
| download | illumos-joyent-0616c50e4599a5a6e28907629ef1e590d70dff7c.tar.gz | |
6650101 SNAS: Read access is allowed after stream file is quarantined from CIFS share.
Diffstat (limited to 'usr/src')
| -rw-r--r-- | usr/src/uts/common/fs/zfs/zfs_vnops.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/usr/src/uts/common/fs/zfs/zfs_vnops.c b/usr/src/uts/common/fs/zfs/zfs_vnops.c index 192d2e6f7c..337b4c0249 100644 --- a/usr/src/uts/common/fs/zfs/zfs_vnops.c +++ b/usr/src/uts/common/fs/zfs/zfs_vnops.c @@ -438,6 +438,11 @@ zfs_read(vnode_t *vp, uio_t *uio, int ioflag, cred_t *cr, caller_context_t *ct) ZFS_VERIFY_ZP(zp); os = zfsvfs->z_os; + if (zp->z_phys->zp_flags & ZFS_AV_QUARANTINED) { + ZFS_EXIT(zfsvfs); + return (EACCES); + } + /* * Validate file offset */ @@ -4061,13 +4066,21 @@ zfs_map(vnode_t *vp, offset_t off, struct as *as, caddr_t *addrp, segvn_crargs_t vn_a; int error; + ZFS_ENTER(zfsvfs); + ZFS_VERIFY_ZP(zp); + if ((prot & PROT_WRITE) && (zp->z_phys->zp_flags & (ZFS_IMMUTABLE | ZFS_READONLY | - ZFS_APPENDONLY))) + ZFS_APPENDONLY))) { + ZFS_EXIT(zfsvfs); return (EPERM); + } - ZFS_ENTER(zfsvfs); - ZFS_VERIFY_ZP(zp); + if ((prot & (PROT_READ | PROT_EXEC)) && + (zp->z_phys->zp_flags & ZFS_AV_QUARANTINED)) { + ZFS_EXIT(zfsvfs); + return (EACCES); + } if (vp->v_flag & VNOMAP) { ZFS_EXIT(zfsvfs); |
