示例#1
0
int
mac_socket_check_create(struct ucred *cred, int domain, int type, int proto)
{
	int error;

	MAC_POLICY_CHECK_NOSLEEP(socket_check_create, cred, domain, type,
	    proto);
	MAC_CHECK_PROBE4(socket_check_create, error, cred, domain, type,
	    proto);

	return (error);
}
示例#2
0
int
mac_cred_check_setresgid(struct ucred *cred, gid_t rgid, gid_t egid,
    gid_t sgid)
{
	int error;

	MAC_POLICY_CHECK_NOSLEEP(cred_check_setresgid, cred, rgid, egid, sgid);
	MAC_CHECK_PROBE4(cred_check_setresgid, error, cred, rgid, egid,
	    sgid);

	return (error);
}
示例#3
0
int
mac_posixshm_check_setowner(struct ucred *cred, struct shmfd *shmfd, uid_t uid,
    gid_t gid)
{
	int error;

	MAC_POLICY_CHECK_NOSLEEP(posixshm_check_setowner, cred, shmfd,
	    shmfd->shm_label, uid, gid);
	MAC_CHECK_PROBE4(posixshm_check_setowner, error, cred, shmfd,
	    uid, gid);

	return (error);
}
示例#4
0
int
mac_posixshm_check_mmap(struct ucred *cred, struct shmfd *shmfd, int prot,
    int flags)
{
	int error;

	MAC_POLICY_CHECK_NOSLEEP(posixshm_check_mmap, cred, shmfd,
	    shmfd->shm_label, prot, flags);
	MAC_CHECK_PROBE4(posixshm_check_mmap, error, cred, shmfd, prot,
	    flags);

	return (error);
}
示例#5
0
int
mac_pipe_check_ioctl(struct ucred *cred, struct pipepair *pp,
    unsigned long cmd, void *data)
{
	int error;

	mtx_assert(&pp->pp_mtx, MA_OWNED);

	MAC_POLICY_CHECK_NOSLEEP(pipe_check_ioctl, cred, pp, pp->pp_label,
	    cmd, data);
	MAC_CHECK_PROBE4(pipe_check_ioctl, error, cred, pp, cmd, data);

	return (error);
}