diff options
Diffstat (limited to 'sys/security/mac/mac_pipe.c')
-rw-r--r-- | sys/security/mac/mac_pipe.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/sys/security/mac/mac_pipe.c b/sys/security/mac/mac_pipe.c index d36fbea..64b6f09 100644 --- a/sys/security/mac/mac_pipe.c +++ b/sys/security/mac/mac_pipe.c @@ -2470,6 +2470,37 @@ mac_check_socket_visible(struct ucred *cred, struct socket *socket) } int +mac_check_system_acct(struct ucred *cred, struct vnode *vp) +{ + int error; + + if (vp != NULL) { + ASSERT_VOP_LOCKED(vp, "mac_check_system_acct"); + } + + if (!mac_enforce_system) + return (0); + + MAC_CHECK(check_system_acct, cred, vp, + vp != NULL ? &vp->v_label : NULL); + + return (error); +} + +int +mac_check_system_nfsd(struct ucred *cred) +{ + int error; + + if (!mac_enforce_system) + return (0); + + MAC_CHECK(check_system_nfsd, cred); + + return (error); +} + +int mac_check_system_reboot(struct ucred *cred, int howto) { int error; |