diff options
Diffstat (limited to 'sys/fs/unionfs/union_subr.c')
-rw-r--r-- | sys/fs/unionfs/union_subr.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/fs/unionfs/union_subr.c b/sys/fs/unionfs/union_subr.c index 887ef70..6156da6 100644 --- a/sys/fs/unionfs/union_subr.c +++ b/sys/fs/unionfs/union_subr.c @@ -1110,6 +1110,12 @@ unionfs_check_rmdir(struct vnode *vp, struct ucred *cred, struct thread *td) return (0); /* open vnode */ +#ifdef MAC + if ((error = mac_check_vnode_open(cred, vp, VEXEC|VREAD)) != 0) + return (error); +#endif + if ((error = VOP_ACCESS(vp, VEXEC|VREAD, cred, td)) != 0) + return (error); if ((error = VOP_OPEN(vp, FREAD, cred, td, NULL)) != 0) return (error); |