X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/316670eb35587141e969394ae8537d66b9211e80..4b17d6b6e417f714551ec129064745ea9919780e:/security/mac_vfs.c diff --git a/security/mac_vfs.c b/security/mac_vfs.c index ba8e50fce..7bf550622 100644 --- a/security/mac_vfs.c +++ b/security/mac_vfs.c @@ -392,6 +392,19 @@ mac_vnode_notify_rename(vfs_context_t ctx, struct vnode *vp, dvp, dvp->v_label, cnp); } +void +mac_vnode_notify_open(vfs_context_t ctx, struct vnode *vp, int acc_flags) +{ + kauth_cred_t cred; + + if (!mac_vnode_enforce || + !mac_context_check_enforce(ctx, MAC_VNODE_ENFORCE)) + return; + + cred = vfs_context_ucred(ctx); + MAC_PERFORM(vnode_notify_open, cred, vp, vp->v_label, acc_flags); +} + /* * Extended attribute 'name' was updated via * vn_setxattr() or vn_removexattr(). Allow the