/freebsd/sys/security/mac/ |
H A D | mac_posix_sem.c | 125 MAC_POLICY_CHECK_NOSLEEP(posixsem_check_getvalue, active_cred, in mac_posixsem_check_getvalue() 127 MAC_CHECK_PROBE3(posixsem_check_getvalue, error, active_cred, in mac_posixsem_check_getvalue() 137 mac_posixsem_check_post(struct ucred *active_cred, struct ucred *file_cred, in mac_posixsem_check_post() argument 142 MAC_POLICY_CHECK_NOSLEEP(posixsem_check_post, active_cred, file_cred, in mac_posixsem_check_post() 144 MAC_CHECK_PROBE3(posixsem_check_post, error, active_cred, file_cred, in mac_posixsem_check_post() 154 mac_posixsem_check_stat(struct ucred *active_cred, struct ucred *file_cred, in mac_posixsem_check_stat() argument 159 MAC_POLICY_CHECK_NOSLEEP(posixsem_check_stat, active_cred, file_cred, in mac_posixsem_check_stat() 161 MAC_CHECK_PROBE3(posixsem_check_stat, error, active_cred, file_cred, in mac_posixsem_check_stat() 186 mac_posixsem_check_wait(struct ucred *active_cred, struct ucred *file_cred, in mac_posixsem_check_wait() argument 191 MAC_POLICY_CHECK_NOSLEEP(posixsem_check_wait, active_cred, file_cred, in mac_posixsem_check_wait() [all …]
|
H A D | mac_posix_shm.c | 152 mac_posixshm_check_stat(struct ucred *active_cred, struct ucred *file_cred, in mac_posixshm_check_stat() argument 157 MAC_POLICY_CHECK_NOSLEEP(posixshm_check_stat, active_cred, file_cred, in mac_posixshm_check_stat() 159 MAC_CHECK_PROBE3(posixshm_check_stat, error, active_cred, file_cred, in mac_posixshm_check_stat() 174 MAC_POLICY_CHECK_NOSLEEP(posixshm_check_truncate, active_cred, in mac_posixshm_check_truncate() 176 MAC_CHECK_PROBE3(posixshm_check_truncate, error, active_cred, in mac_posixshm_check_truncate() 233 mac_posixshm_check_read(struct ucred *active_cred, struct ucred *file_cred, in mac_posixshm_check_read() argument 238 MAC_POLICY_CHECK_NOSLEEP(posixshm_check_read, active_cred, in mac_posixshm_check_read() 240 MAC_CHECK_PROBE3(posixshm_check_read, error, active_cred, in mac_posixshm_check_read() 250 mac_posixshm_check_write(struct ucred *active_cred, struct ucred *file_cred, in mac_posixshm_check_write() argument 255 MAC_POLICY_CHECK_NOSLEEP(posixshm_check_write, active_cred, in mac_posixshm_check_write() [all …]
|
H A D | mac_framework.h | 305 int mac_posixsem_check_getvalue(struct ucred *active_cred, 308 int mac_posixsem_check_post(struct ucred *active_cred, 314 int mac_posixsem_check_stat(struct ucred *active_cred, 317 int mac_posixsem_check_wait(struct ucred *active_cred, 328 int mac_posixshm_check_read(struct ucred *active_cred, 334 int mac_posixshm_check_stat(struct ucred *active_cred, 336 int mac_posixshm_check_truncate(struct ucred *active_cred, 339 int mac_posixshm_check_write(struct ucred *active_cred, 591 int mac_vnode_check_poll(struct ucred *active_cred, 642 int mac_vnode_check_stat_impl(struct ucred *active_cred, [all …]
|
H A D | mac_vfs.c | 648 mac_vnode_check_poll(struct ucred *active_cred, struct ucred *file_cred, in mac_vnode_check_poll() argument 655 MAC_POLICY_CHECK(vnode_check_poll, active_cred, file_cred, vp, in mac_vnode_check_poll() 657 MAC_CHECK_PROBE3(vnode_check_poll, error, active_cred, file_cred, in mac_vnode_check_poll() 667 mac_vnode_check_read_impl(struct ucred *active_cred, struct ucred *file_cred, in mac_vnode_check_read_impl() argument 674 MAC_POLICY_CHECK(vnode_check_read, active_cred, file_cred, vp, in mac_vnode_check_read_impl() 676 MAC_CHECK_PROBE3(vnode_check_read, error, active_cred, file_cred, in mac_vnode_check_read_impl() 892 mac_vnode_check_stat_impl(struct ucred *active_cred, struct ucred *file_cred, in mac_vnode_check_stat_impl() argument 899 MAC_POLICY_CHECK(vnode_check_stat, active_cred, file_cred, vp, in mac_vnode_check_stat_impl() 901 MAC_CHECK_PROBE3(vnode_check_stat, error, active_cred, file_cred, in mac_vnode_check_stat_impl() 937 MAC_POLICY_CHECK(vnode_check_write, active_cred, file_cred, vp, in mac_vnode_check_write_impl() [all …]
|
H A D | mac_policy.h | 346 typedef int (*mpo_posixsem_check_getvalue_t)(struct ucred *active_cred, 351 typedef int (*mpo_posixsem_check_post_t)(struct ucred *active_cred, 360 typedef int (*mpo_posixsem_check_stat_t)(struct ucred *active_cred, 365 typedef int (*mpo_posixsem_check_wait_t)(struct ucred *active_cred, 381 typedef int (*mpo_posixshm_check_read_t)(struct ucred *active_cred, 390 typedef int (*mpo_posixshm_check_stat_t)(struct ucred *active_cred, 398 typedef int (*mpo_posixshm_check_write_t)(struct ucred *active_cred, 616 typedef int (*mpo_vnode_check_poll_t)(struct ucred *active_cred, 619 typedef int (*mpo_vnode_check_read_t)(struct ucred *active_cred, 655 typedef int (*mpo_vnode_check_stat_t)(struct ucred *active_cred, [all …]
|
/freebsd/sys/sys/ |
H A D | file.h | 98 struct ucred *active_cred, int flags, 101 struct ucred *active_cred, struct thread *td); 103 struct ucred *active_cred, struct thread *td); 105 struct ucred *active_cred, struct thread *td); 108 struct ucred *active_cred); 111 struct ucred *active_cred, struct thread *td); 113 struct ucred *active_cred, struct thread *td); 131 struct ucred *active_cred, struct thread *td); 383 return ((*fp->f_ops->fo_stat)(fp, sb, active_cred)); in fo_stat() 405 return ((*fp->f_ops->fo_chmod)(fp, mode, active_cred, td)); in fo_chmod() [all …]
|
H A D | vnode.h | 764 int ioflg, struct ucred *active_cred, struct ucred *file_cred); 790 struct ucred *active_cred, struct ucred *file_cred, ssize_t *aresid, 794 struct ucred *active_cred, struct ucred *file_cred, size_t *aresid, 1132 int vn_chmod(struct file *fp, mode_t mode, struct ucred *active_cred, 1134 int vn_chown(struct file *fp, uid_t uid, gid_t gid, struct ucred *active_cred, 1136 int vn_getsize_locked(struct vnode *vp, off_t *size, struct ucred *active_cred); 1137 int vn_getsize(struct vnode *vp, off_t *size, struct ucred *active_cred);
|
H A D | exec.h | 63 struct ucred *active_cred; member
|
H A D | socketvar.h | 487 int sopoll(struct socket *so, int events, struct ucred *active_cred, 490 struct ucred *active_cred, struct thread *td);
|
/freebsd/sys/kern/ |
H A D | sys_pipe.c | 746 error = mac_pipe_check_read(active_cred, rpipe->pipe_pair); in pipe_read() 1125 error = mac_pipe_check_write(active_cred, wpipe->pipe_pair); in pipe_write() 1373 error = vnops.fo_truncate(fp, length, active_cred, td); in pipe_truncate() 1375 error = invfo_truncate(fp, length, active_cred, td); in pipe_truncate() 1469 error = mac_pipe_check_poll(active_cred, rpipe->pipe_pair); in pipe_poll() 1543 error = mac_pipe_check_stat(active_cred, pipe->pipe_pair); in pipe_stat() 1553 return (vnops.fo_stat(fp, ub, active_cred)); in pipe_stat() 1598 error = vn_chmod(fp, mode, active_cred, td); in pipe_chmod() 1600 error = invfo_chmod(fp, mode, active_cred, td); in pipe_chmod() 1613 error = vn_chown(fp, uid, gid, active_cred, td); in pipe_chown() [all …]
|
H A D | sys_eventfd.c | 144 eventfd_read(struct file *fp, struct uio *uio, struct ucred *active_cred, in eventfd_read() argument 186 eventfd_write(struct file *fp, struct uio *uio, struct ucred *active_cred, in eventfd_write() argument 230 eventfd_poll(struct file *fp, int events, struct ucred *active_cred, in eventfd_poll() argument 314 struct ucred *active_cred, struct thread *td) in eventfd_ioctl() argument 326 eventfd_stat(struct file *fp, struct stat *st, struct ucred *active_cred) in eventfd_stat() argument
|
H A D | sys_socket.c | 117 soo_read(struct file *fp, struct uio *uio, struct ucred *active_cred, in soo_read() argument 124 error = mac_socket_check_receive(active_cred, so); in soo_read() 133 soo_write(struct file *fp, struct uio *uio, struct ucred *active_cred, in soo_write() argument 140 error = mac_socket_check_send(active_cred, so); in soo_write() 149 soo_ioctl(struct file *fp, u_long cmd, void *data, struct ucred *active_cred, in soo_ioctl() argument 279 soo_poll(struct file *fp, int events, struct ucred *active_cred, in soo_poll() argument 286 error = mac_socket_check_poll(active_cred, so); in soo_poll() 294 soo_stat(struct file *fp, struct stat *ub, struct ucred *active_cred) in soo_stat() argument 302 error = mac_socket_check_stat(active_cred, so); in soo_stat()
|
H A D | vfs_vnops.c | 678 cred = active_cred; in vn_rdwr() 740 ioflg, active_cred, file_cred, &iaresid, td); in vn_rdwr_inchunks() 1500 args.cred = active_cred; in vn_io_fault() 1720 error = vn_getsize(vp, &size, active_cred); in vn_ioctl() 1741 active_cred, td)); in vn_ioctl() 1746 active_cred, td)); in vn_ioctl() 2524 return (setfmode(td, active_cred, vp, mode)); in vn_chmod() 2539 return (setfown(td, active_cred, vp, uid, gid)); in vn_chown() 3802 active_cred, file_cred)); in vn_deallocate() 3807 struct ucred *active_cred, struct thread *td) in vn_fspacectl() argument [all …]
|
H A D | uipc_sem.c | 163 ksem_stat(struct file *fp, struct stat *sb, struct ucred *active_cred) in ksem_stat() argument 173 error = mac_posixsem_check_stat(active_cred, fp->f_cred, ks); in ksem_stat() 198 ksem_chmod(struct file *fp, mode_t mode, struct ucred *active_cred, in ksem_chmod() argument 208 error = mac_posixsem_check_setmode(active_cred, ks, mode); in ksem_chmod() 213 active_cred); in ksem_chmod() 223 ksem_chown(struct file *fp, uid_t uid, gid_t gid, struct ucred *active_cred, in ksem_chown() argument 233 error = mac_posixsem_check_setowner(active_cred, ks, uid, gid); in ksem_chown() 241 if (((uid != ks->ks_uid && uid != active_cred->cr_uid) || in ksem_chown() 242 (gid != ks->ks_gid && !groupmember(gid, active_cred))) && in ksem_chown() 243 (error = priv_check_cred(active_cred, PRIV_VFS_CHOWN))) in ksem_chown()
|
H A D | uipc_shm.c | 455 shm_read(struct file *fp, struct uio *uio, struct ucred *active_cred, in shm_read() argument 464 error = mac_posixshm_check_read(active_cred, fp->f_cred, shmfd); in shm_read() 488 error = mac_posixshm_check_write(active_cred, fp->f_cred, shmfd); in shm_write() 612 error = mac_posixshm_check_stat(active_cred, fp->f_cred, shmfd); in shm_stat() 1741 shm_chmod(struct file *fp, mode_t mode, struct ucred *active_cred, in shm_chmod() argument 1755 error = mac_posixshm_check_setmode(active_cred, shmfd, mode); in shm_chmod() 1760 VADMIN, active_cred); in shm_chmod() 1788 if (((uid != shmfd->shm_uid && uid != active_cred->cr_uid) || in shm_chown() 1789 (gid != shmfd->shm_gid && !groupmember(gid, active_cred))) && in shm_chown() 1790 (error = priv_check_cred(active_cred, PRIV_VFS_CHOWN))) in shm_chown() [all …]
|
H A D | tty_pts.c | 111 ptsdev_read(struct file *fp, struct uio *uio, struct ucred *active_cred, in ptsdev_read() argument 185 ptsdev_write(struct file *fp, struct uio *uio, struct ucred *active_cred, in ptsdev_write() argument 259 struct ucred *active_cred, struct thread *td) in ptsdev_ioctl() argument 385 ptsdev_poll(struct file *fp, int events, struct ucred *active_cred, in ptsdev_poll() argument 530 ptsdev_stat(struct file *fp, struct stat *sb, struct ucred *active_cred) in ptsdev_stat() argument
|
H A D | sys_timerfd.c | 181 timerfd_read(struct file *fp, struct uio *uio, struct ucred *active_cred, in timerfd_read() argument 230 struct ucred *active_cred, struct thread *td) in timerfd_ioctl() argument 250 timerfd_poll(struct file *fp, int events, struct ucred *active_cred, in timerfd_poll() argument 309 timerfd_stat(struct file *fp, struct stat *sb, struct ucred *active_cred) in timerfd_stat() argument
|
H A D | sys_procdesc.c | 421 procdesc_poll(struct file *fp, int events, struct ucred *active_cred, in procdesc_poll() argument 508 procdesc_stat(struct file *fp, struct stat *sb, struct ucred *active_cred) in procdesc_stat() argument
|
H A D | kern_descrip.c | 5162 badfo_readwrite(struct file *fp, struct uio *uio, struct ucred *active_cred, in badfo_readwrite() argument 5170 badfo_truncate(struct file *fp, off_t length, struct ucred *active_cred, in badfo_truncate() argument 5186 badfo_poll(struct file *fp, int events, struct ucred *active_cred, in badfo_poll() argument 5201 badfo_stat(struct file *fp, struct stat *sb, struct ucred *active_cred) in badfo_stat() argument 5215 badfo_chmod(struct file *fp, mode_t mode, struct ucred *active_cred, in badfo_chmod() argument 5262 path_poll(struct file *fp, int events, struct ucred *active_cred, in path_poll() argument 5295 invfo_rdwr(struct file *fp, struct uio *uio, struct ucred *active_cred, in invfo_rdwr() argument 5303 invfo_truncate(struct file *fp, off_t length, struct ucred *active_cred, in invfo_truncate() argument 5312 struct ucred *active_cred, struct thread *td) in invfo_ioctl() argument 5319 invfo_poll(struct file *fp, int events, struct ucred *active_cred, in invfo_poll() argument [all …]
|
/freebsd/sys/security/mac_stub/ |
H A D | mac_stub.c | 700 stub_posixsem_check_post(struct ucred *active_cred, struct ucred *file_cred, in stub_posixsem_check_post() argument 724 stub_posixsem_check_stat(struct ucred *active_cred, struct ucred *file_cred, in stub_posixsem_check_stat() argument 740 stub_posixsem_check_wait(struct ucred *active_cred, struct ucred *file_cred, in stub_posixsem_check_wait() argument 778 stub_posixshm_check_read(struct ucred *active_cred, struct ucred *file_cred, in stub_posixshm_check_read() argument 802 stub_posixshm_check_stat(struct ucred *active_cred, struct ucred *file_cred, in stub_posixshm_check_stat() argument 810 stub_posixshm_check_truncate(struct ucred *active_cred, in stub_posixshm_check_truncate() argument 826 stub_posixshm_check_write(struct ucred *active_cred, struct ucred *file_cred, in stub_posixshm_check_write() argument 1494 stub_vnode_check_poll(struct ucred *active_cred, struct ucred *file_cred, in stub_vnode_check_poll() argument 1502 stub_vnode_check_read(struct ucred *active_cred, struct ucred *file_cred, in stub_vnode_check_read() argument 1608 stub_vnode_check_stat(struct ucred *active_cred, struct ucred *file_cred, in stub_vnode_check_stat() argument [all …]
|
/freebsd/sys/security/mac_test/ |
H A D | mac_test.c | 1288 LABEL_CHECK(active_cred->cr_label, MAGIC_CRED); in test_posixsem_check_getvalue() 1315 LABEL_CHECK(active_cred->cr_label, MAGIC_CRED); in test_posixsem_check_post() 1353 LABEL_CHECK(active_cred->cr_label, MAGIC_CRED); in test_posixsem_check_stat() 1379 LABEL_CHECK(active_cred->cr_label, MAGIC_CRED); in test_posixsem_check_wait() 1455 LABEL_CHECK(active_cred->cr_label, MAGIC_CRED); in test_posixshm_check_read() 1494 LABEL_CHECK(active_cred->cr_label, MAGIC_CRED); in test_posixshm_check_stat() 1507 LABEL_CHECK(active_cred->cr_label, MAGIC_CRED); in test_posixshm_check_truncate() 1532 LABEL_CHECK(active_cred->cr_label, MAGIC_CRED); in test_posixshm_check_write() 2671 LABEL_CHECK(active_cred->cr_label, MAGIC_CRED); in test_vnode_check_poll() 2686 LABEL_CHECK(active_cred->cr_label, MAGIC_CRED); in test_vnode_check_read() [all …]
|
/freebsd/sys/security/mac_mls/ |
H A D | mac_mls.c | 1515 subj = SLOT(active_cred->cr_label); in mls_posixsem_check_rdonly() 1569 subj = SLOT(active_cred->cr_label); in mls_posixsem_check_write() 1647 subj = SLOT(active_cred->cr_label); in mls_posixshm_check_read() 1701 subj = SLOT(active_cred->cr_label); in mls_posixshm_check_stat() 1711 mls_posixshm_check_truncate(struct ucred *active_cred, in mls_posixshm_check_truncate() argument 1719 subj = SLOT(active_cred->cr_label); in mls_posixshm_check_truncate() 1755 subj = SLOT(active_cred->cr_label); in mls_posixshm_check_write() 2784 subj = SLOT(active_cred->cr_label); in mls_vnode_check_poll() 2802 subj = SLOT(active_cred->cr_label); in mls_vnode_check_read() 3085 subj = SLOT(active_cred->cr_label); in mls_vnode_check_stat() [all …]
|
/freebsd/sys/security/mac_biba/ |
H A D | mac_biba.c | 1655 subj = SLOT(active_cred->cr_label); in biba_posixsem_check_write() 1673 subj = SLOT(active_cred->cr_label); in biba_posixsem_check_rdonly() 1751 subj = SLOT(active_cred->cr_label); in biba_posixshm_check_read() 1805 subj = SLOT(active_cred->cr_label); in biba_posixshm_check_stat() 1823 subj = SLOT(active_cred->cr_label); in biba_posixshm_check_truncate() 1859 subj = SLOT(active_cred->cr_label); in biba_posixshm_check_write() 3154 subj = SLOT(active_cred->cr_label); in biba_vnode_check_poll() 3172 subj = SLOT(active_cred->cr_label); in biba_vnode_check_read() 3455 subj = SLOT(active_cred->cr_label); in biba_vnode_check_stat() 3489 biba_vnode_check_write(struct ucred *active_cred, in biba_vnode_check_write() argument [all …]
|
/freebsd/sys/security/mac_bsdextended/ |
H A D | ugidfw_vnode.c | 275 ugidfw_vnode_check_stat(struct ucred *active_cred, in ugidfw_vnode_check_stat() argument 279 return (ugidfw_check_vp(active_cred, vp, MBI_STAT)); in ugidfw_vnode_check_stat()
|
H A D | ugidfw_internal.h | 108 int ugidfw_vnode_check_stat(struct ucred *active_cred,
|