本文整理汇总了C++中MAC_CHECK_PROBE2函数的典型用法代码示例。如果您正苦于以下问题:C++ MAC_CHECK_PROBE2函数的具体用法?C++ MAC_CHECK_PROBE2怎么用?C++ MAC_CHECK_PROBE2使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了MAC_CHECK_PROBE2函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: mac_priv_check
/*
* Restrict access to a privilege for a credential. Return failure if any
* policy denies access.
*/
int
mac_priv_check(struct ucred *cred, int priv)
{
int error;
MAC_POLICY_CHECK_NOSLEEP(priv_check, cred, priv);
MAC_CHECK_PROBE2(priv_check, error, cred, priv);
return (error);
}
示例2: mac_posixshm_check_create
int
mac_posixshm_check_create(struct ucred *cred, const char *path)
{
int error;
MAC_POLICY_CHECK_NOSLEEP(posixshm_check_create, cred, path);
MAC_CHECK_PROBE2(posixshm_check_create, error, cred, path);
return (error);
}
示例3: mac_socket_check_stat
int
mac_socket_check_stat(struct ucred *cred, struct socket *so)
{
int error;
MAC_POLICY_CHECK_NOSLEEP(socket_check_stat, cred, so, so->so_label);
MAC_CHECK_PROBE2(socket_check_stat, error, cred, so);
return (error);
}
示例4: mac_system_check_reboot
int
mac_system_check_reboot(struct ucred *cred, int howto)
{
int error;
MAC_POLICY_CHECK_NOSLEEP(system_check_reboot, cred, howto);
MAC_CHECK_PROBE2(system_check_reboot, error, cred, howto);
return (error);
}
示例5: mac_kenv_check_get
int
mac_kenv_check_get(struct ucred *cred, char *name)
{
int error;
MAC_POLICY_CHECK_NOSLEEP(kenv_check_get, cred, name);
MAC_CHECK_PROBE2(kenv_check_get, error, cred, name);
return (error);
}
示例6: mac_cred_check_visible
int
mac_cred_check_visible(struct ucred *cr1, struct ucred *cr2)
{
int error;
MAC_POLICY_CHECK_NOSLEEP(cred_check_visible, cr1, cr2);
MAC_CHECK_PROBE2(cred_check_visible, error, cr1, cr2);
return (error);
}
示例7: mac_cred_check_relabel
int
mac_cred_check_relabel(struct ucred *cred, struct label *newlabel)
{
int error;
MAC_POLICY_CHECK_NOSLEEP(cred_check_relabel, cred, newlabel);
MAC_CHECK_PROBE2(cred_check_relabel, error, cred, newlabel);
return (error);
}
示例8: mac_sysvmsq_check_msqrcv
int
mac_sysvmsq_check_msqrcv(struct ucred *cred, struct msqid_kernel *msqkptr)
{
int error;
MAC_POLICY_CHECK_NOSLEEP(sysvmsq_check_msqrcv, cred, msqkptr,
msqkptr->label);
MAC_CHECK_PROBE2(sysvmsq_check_msqrcv, error, cred, msqkptr);
return (error);
}
示例9: mac_posixshm_check_unlink
int
mac_posixshm_check_unlink(struct ucred *cred, struct shmfd *shmfd)
{
int error;
MAC_POLICY_CHECK_NOSLEEP(posixshm_check_unlink, cred, shmfd,
shmfd->shm_label);
MAC_CHECK_PROBE2(posixshm_check_unlink, error, cred, shmfd);
return (error);
}
示例10: mac_sysvmsq_check_msgrmid
int
mac_sysvmsq_check_msgrmid(struct ucred *cred, struct msg *msgptr)
{
int error;
MAC_POLICY_CHECK_NOSLEEP(sysvmsq_check_msgrmid, cred, msgptr,
msgptr->label);
MAC_CHECK_PROBE2(sysvmsq_check_msgrmid, error, cred, msgptr);
return (error);
}
示例11: mac_proc_check_wait
int
mac_proc_check_wait(struct ucred *cred, struct proc *p)
{
int error;
PROC_LOCK_ASSERT(p, MA_OWNED);
MAC_POLICY_CHECK_NOSLEEP(proc_check_wait, cred, p);
MAC_CHECK_PROBE2(proc_check_wait, error, cred, p);
return (error);
}
示例12: mac_system_check_swapoff
int
mac_system_check_swapoff(struct ucred *cred, struct vnode *vp)
{
int error;
ASSERT_VOP_LOCKED(vp, "mac_system_check_swapoff");
MAC_POLICY_CHECK(system_check_swapoff, cred, vp, vp->v_label);
MAC_CHECK_PROBE2(system_check_swapoff, error, cred, vp);
return (error);
}
示例13: mac_kld_check_load
int
mac_kld_check_load(struct ucred *cred, struct vnode *vp)
{
int error;
ASSERT_VOP_LOCKED(vp, "mac_kld_check_load");
MAC_POLICY_CHECK(kld_check_load, cred, vp, vp->v_label);
MAC_CHECK_PROBE2(kld_check_load, error, cred, vp);
return (error);
}
示例14: mac_pipe_check_write
int
mac_pipe_check_write(struct ucred *cred, struct pipepair *pp)
{
int error;
mtx_assert(&pp->pp_mtx, MA_OWNED);
MAC_POLICY_CHECK_NOSLEEP(pipe_check_write, cred, pp, pp->pp_label);
MAC_CHECK_PROBE2(pipe_check_write, error, cred, pp);
return (error);
}
示例15: mac_system_check_acct
int
mac_system_check_acct(struct ucred *cred, struct vnode *vp)
{
int error;
if (vp != NULL) {
ASSERT_VOP_LOCKED(vp, "mac_system_check_acct");
}
MAC_POLICY_CHECK(system_check_acct, cred, vp,
vp != NULL ? vp->v_label : NULL);
MAC_CHECK_PROBE2(system_check_acct, error, cred, vp);
return (error);
}