summaryrefslogtreecommitdiffstats
path: root/sys/fs/unionfs/union_subr.c
diff options
context:
space:
mode:
authordaichi <daichi@FreeBSD.org>2007-10-14 13:37:52 +0000
committerdaichi <daichi@FreeBSD.org>2007-10-14 13:37:52 +0000
commitdc348d6e70a80e44c77b3ceee969b94c04b37cf3 (patch)
treea39ab0c5471223739534a2c0c5fa5952f3019b1e /sys/fs/unionfs/union_subr.c
parentf372c9fc9b4256b53b40d0c220aa194b415ef499 (diff)
downloadFreeBSD-src-dc348d6e70a80e44c77b3ceee969b94c04b37cf3.zip
FreeBSD-src-dc348d6e70a80e44c77b3ceee969b94c04b37cf3.tar.gz
Log:
Improved access permission check treatments. Submitted by: Masanori Ozawa <ozawa@ongs.co.jp> (unionfs developer) Reviewed by: jeff, kensmith Approved by: re (kensmith) MFC after: 1 week
Diffstat (limited to 'sys/fs/unionfs/union_subr.c')
-rw-r--r--sys/fs/unionfs/union_subr.c6
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);
OpenPOWER on IntegriCloud