/freebsd/sys/kern/ |
H A D | subr_acl_posix1e.c | 57 struct acl *acl, accmode_t accmode, struct ucred *cred) in vaccess_acl_posix1e() argument 65 KASSERT((accmode & ~(VEXEC | VWRITE | VREAD | VADMIN | VAPPEND)) == 0, in vaccess_acl_posix1e() 67 KASSERT((accmode & VAPPEND) == 0 || (accmode & VWRITE), in vaccess_acl_posix1e() 88 if ((accmode & VEXEC) && !priv_check_cred(cred, PRIV_VFS_LOOKUP)) in vaccess_acl_posix1e() 96 if ((accmode & VEXEC) && (acl_posix1e_acl_to_mode(acl) & in vaccess_acl_posix1e() 102 if ((accmode & VREAD) && !priv_check_cred(cred, PRIV_VFS_READ)) in vaccess_acl_posix1e() 105 if (((accmode & VWRITE) || (accmode & VAPPEND)) && in vaccess_acl_posix1e() 109 if ((accmode & VADMIN) && !priv_check_cred(cred, PRIV_VFS_ADMIN)) in vaccess_acl_posix1e() 132 if ((accmode & dac_granted) == accmode) in vaccess_acl_posix1e() 138 if ((accmode & (dac_granted | priv_granted)) == in vaccess_acl_posix1e() [all …]
|
H A D | subr_acl_nfs4.c | 67 accmode_t accmode; member 86 _access_mask_from_accmode(accmode_t accmode) in _access_mask_from_accmode() argument 90 for (i = 0; accmode2mask[i].accmode != 0; i++) { in _access_mask_from_accmode() 91 if (accmode & accmode2mask[i].accmode) in _access_mask_from_accmode() 172 struct acl *aclp, accmode_t accmode, struct ucred *cred) in vaccess_acl_nfs4() argument 179 KASSERT((accmode & ~(VEXEC | VWRITE | VREAD | VADMIN | VAPPEND | in vaccess_acl_nfs4() 184 KASSERT((accmode & VAPPEND) == 0 || (accmode & VWRITE), in vaccess_acl_nfs4() 187 if (accmode & VADMIN) in vaccess_acl_nfs4() 193 accmode &= ~VSYNCHRONIZE; in vaccess_acl_nfs4() 195 access_mask = _access_mask_from_accmode(accmode); in vaccess_acl_nfs4() [all …]
|
H A D | vfs_subr.c | 5587 accmode_t accmode, struct ucred *cred) in vaccess() argument 5592 KASSERT((accmode & ~(VEXEC | VWRITE | VREAD | VADMIN | VAPPEND)) == 0, in vaccess() 5594 KASSERT((accmode & VAPPEND) == 0 || (accmode & VWRITE), in vaccess() 5614 if ((accmode & dac_granted) == accmode) in vaccess() 5629 if ((accmode & dac_granted) == accmode) in vaccess() 5642 if ((accmode & dac_granted) == accmode) in vaccess() 5659 if ((accmode & VEXEC) && ((dac_granted & VEXEC) == 0) && in vaccess() 5668 if ((accmode & VEXEC) && ((dac_granted & VEXEC) == 0) && in vaccess() 5674 if ((accmode & VREAD) && ((dac_granted & VREAD) == 0) && in vaccess() 5678 if ((accmode & VWRITE) && ((dac_granted & VWRITE) == 0) && in vaccess() [all …]
|
H A D | vfs_vnops.c | 395 accmode_t accmode; in vn_open_vnode() local 405 accmode = 0; in vn_open_vnode() 412 accmode |= VWRITE; in vn_open_vnode() 415 accmode |= VREAD; in vn_open_vnode() 417 accmode |= VAPPEND; in vn_open_vnode() 420 accmode |= VCREAT; in vn_open_vnode() 424 accmode |= VEXEC; in vn_open_vnode() 427 accmode |= VVERIFY; in vn_open_vnode() 428 error = mac_vnode_check_open(cred, vp, accmode); in vn_open_vnode() 432 accmode &= ~(VCREAT | VVERIFY); in vn_open_vnode() [all …]
|
/freebsd/sys/security/mac_bsdextended/ |
H A D | mac_bsdextended.c | 465 ugidfw_accmode2mbi(accmode_t accmode) in ugidfw_accmode2mbi() argument 470 if (accmode & VEXEC) in ugidfw_accmode2mbi() 472 if (accmode & VWRITE) in ugidfw_accmode2mbi() 474 if (accmode & VREAD) in ugidfw_accmode2mbi() 476 if (accmode & VADMIN_PERMS) in ugidfw_accmode2mbi() 478 if (accmode & VSTAT_PERMS) in ugidfw_accmode2mbi() 480 if (accmode & VAPPEND) in ugidfw_accmode2mbi()
|
H A D | ugidfw_vnode.c | 63 struct label *vplabel, accmode_t accmode) in ugidfw_vnode_check_access() argument 66 return (ugidfw_check_vp(cred, vp, ugidfw_accmode2mbi(accmode))); in ugidfw_vnode_check_access() 168 struct label *vplabel, accmode_t accmode) in ugidfw_vnode_check_open() argument 171 return (ugidfw_check_vp(cred, vp, ugidfw_accmode2mbi(accmode))); in ugidfw_vnode_check_open()
|
H A D | ugidfw_internal.h | 35 int ugidfw_accmode2mbi(accmode_t accmode); 54 struct label *vplabel, accmode_t accmode); 82 struct label *vplabel, accmode_t accmode);
|
/freebsd/sys/security/mac/ |
H A D | mac_posix_shm.c | 137 accmode_t accmode) in mac_posixshm_check_open() argument 142 shmfd->shm_label, accmode); in mac_posixshm_check_open() 143 MAC_CHECK_PROBE3(posixshm_check_open, error, cred, shmfd, accmode); in mac_posixshm_check_open()
|
H A D | mac_framework.h | 331 accmode_t accmode); 500 accmode_t accmode); 505 accmode_t accmode) in mac_vnode_check_access() argument 510 return (mac_vnode_check_access_impl(cred, dvp, accmode)); in mac_vnode_check_access() 571 accmode_t accmode); 580 accmode_t accmode) in mac_vnode_check_open() argument 585 return (mac_vnode_check_open_impl(cred, vp, accmode)); in mac_vnode_check_open()
|
H A D | mac_vfs.c | 373 mac_vnode_check_access_impl(struct ucred *cred, struct vnode *vp, accmode_t accmode) in mac_vnode_check_access_impl() argument 379 MAC_POLICY_CHECK(vnode_check_access, cred, vp, vp->v_label, accmode); in mac_vnode_check_access_impl() 380 MAC_CHECK_PROBE3(vnode_check_access, error, cred, vp, accmode); in mac_vnode_check_access_impl() 632 mac_vnode_check_open_impl(struct ucred *cred, struct vnode *vp, accmode_t accmode) in mac_vnode_check_open_impl() argument 638 MAC_POLICY_CHECK(vnode_check_open, cred, vp, vp->v_label, accmode); in mac_vnode_check_open_impl() 639 MAC_CHECK_PROBE3(vnode_check_open, error, cred, vp, accmode); in mac_vnode_check_open_impl()
|
/freebsd/sys/contrib/openzfs/module/os/freebsd/spl/ |
H A D | spl_policy.c | 127 secpolicy_vnode_access(cred_t *cr, vnode_t *vp, uid_t owner, accmode_t accmode) in secpolicy_vnode_access() argument 133 if ((accmode & VREAD) && priv_check_cred(cr, PRIV_VFS_READ) != 0) in secpolicy_vnode_access() 135 if ((accmode & VWRITE) && in secpolicy_vnode_access() 139 if (accmode & VEXEC) { in secpolicy_vnode_access()
|
/freebsd/lib/libutil/ |
H A D | quotafile.c | 52 int accmode; /* access mode */ member 149 qf->accmode = openflags & O_ACCMODE; in quota_open() 150 if ((qf->fd = open(qf->qfname, qf->accmode|O_CLOEXEC)) < 0 && in quota_open() 418 if ((qf->accmode & O_RDWR) != O_RDWR) { in quota_write_usage() 466 if ((qf->accmode & O_RDWR) != O_RDWR) { in quota_write_limits() 527 if ((qf->accmode & O_RDWR) != O_RDWR || qf->fd == -1) { in quota_convert()
|
/freebsd/sys/fs/unionfs/ |
H A D | union_vnops.c | 878 unionfs_check_corrected_access(accmode_t accmode, struct vattr *va, in unionfs_check_corrected_access() argument 893 if (accmode & VEXEC) in unionfs_check_corrected_access() 895 if (accmode & VREAD) in unionfs_check_corrected_access() 897 if (accmode & VWRITE) in unionfs_check_corrected_access() 904 if (accmode & VEXEC) in unionfs_check_corrected_access() 906 if (accmode & VREAD) in unionfs_check_corrected_access() 908 if (accmode & VWRITE) in unionfs_check_corrected_access() 914 if (accmode & VEXEC) in unionfs_check_corrected_access() 916 if (accmode & VREAD) in unionfs_check_corrected_access() 918 if (accmode & VWRITE) in unionfs_check_corrected_access() [all …]
|
/freebsd/sys/fs/tarfs/ |
H A D | tarfs_vnops.c | 91 accmode_t accmode; in tarfs_access() local 96 accmode = ap->a_accmode; in tarfs_access() 103 tnp, tnp->name, accmode); in tarfs_access() 109 if ((accmode & VWRITE) != 0) in tarfs_access() 120 if ((accmode & VWRITE) != 0) in tarfs_access() 124 tnp->gid, accmode, cred); in tarfs_access()
|
H A D | tarfs_io.c | 260 accmode_t accmode = ap->a_accmode; in tarfs_zaccess() local 263 if (accmode == VREAD) { in tarfs_zaccess() 266 error = VOP_ACCESS(tmp->vp, accmode, ap->a_cred, ap->a_td); in tarfs_zaccess() 270 TARFS_DPF(ZIO, "%s(%d) = %d\n", __func__, accmode, error); in tarfs_zaccess()
|
/freebsd/sys/security/mac_veriexec/ |
H A D | mac_veriexec.c | 519 mac_veriexec_check_vp(struct ucred *cred, struct vnode *vp, accmode_t accmode) in mac_veriexec_check_vp() argument 541 if (accmode & VWRITE) { in mac_veriexec_check_vp() 560 if (accmode & VVERIFY) { in mac_veriexec_check_vp() 599 struct label *label __unused, accmode_t accmode) in mac_veriexec_vnode_check_open() argument 610 error = mac_veriexec_check_vp(cred, vp, accmode); in mac_veriexec_vnode_check_open()
|
/freebsd/sys/fs/smbfs/ |
H A D | smbfs_vnops.c | 120 accmode_t accmode = ap->a_accmode; in smbfs_access() local 125 if ((accmode & VWRITE) && (vp->v_mount->mnt_flag & MNT_RDONLY)) { in smbfs_access() 147 int error, accmode; in smbfs_open() local 185 accmode = SMB_SM_DENYNONE|SMB_AM_OPENREAD; in smbfs_open() 187 accmode = SMB_SM_DENYNONE|SMB_AM_OPENRW; in smbfs_open() 190 error = smbfs_smb_open(np, accmode, scred); in smbfs_open() 195 accmode = SMB_SM_DENYNONE|SMB_AM_OPENREAD; in smbfs_open() 196 error = smbfs_smb_open(np, accmode, scred); in smbfs_open()
|
/freebsd/sys/nlm/ |
H A D | nlm_prot_impl.c | 1757 fhandle_t *fhp, struct vfs_state *vs, accmode_t accmode) in nlm_get_vfs_state() argument 1771 if (accmode != 0) { in nlm_get_vfs_state() 1790 if (accmode != 0) { in nlm_get_vfs_state() 1804 error = VOP_ACCESS(vs->vs_vp, accmode, cred, curthread); in nlm_get_vfs_state() 1810 if (error != 0 && accmode != VWRITE) in nlm_get_vfs_state() 1863 accmode_t accmode; in nlm_do_test() local 1889 accmode = argp->exclusive ? VWRITE : VREAD; in nlm_do_test() 1890 error = nlm_get_vfs_state(host, rqstp, &fh, &vs, accmode); in nlm_do_test() 1961 accmode_t accmode; in nlm_do_lock() local 1996 accmode = argp->exclusive ? VWRITE : VREAD; in nlm_do_lock() [all …]
|
/freebsd/sys/sys/ |
H A D | extattr.h | 69 struct ucred *cred, struct thread *td, accmode_t accmode);
|
/freebsd/sys/fs/nullfs/ |
H A D | null_vnops.c | 568 accmode_t accmode = ap->a_accmode; in null_access() local 575 if (accmode & VWRITE) { in null_access() 594 accmode_t accmode = ap->a_accmode; in null_accessx() local 601 if (accmode & VWRITE) { in null_accessx()
|
/freebsd/sys/cddl/compat/opensolaris/sys/ |
H A D | policy.h | 51 accmode_t accmode);
|
/freebsd/sys/contrib/openzfs/include/os/freebsd/spl/sys/ |
H A D | policy.h | 51 accmode_t accmode);
|
/freebsd/sys/fs/fuse/ |
H A D | fuse_vnops.c | 232 struct thread *td, accmode_t accmode) in fuse_extattr_check_cred() argument 256 return (fuse_internal_access(vp, accmode, td, cred)); in fuse_extattr_check_cred() 427 int accmode = ap->a_accmode; in fuse_vnop_access() local 453 err = fuse_internal_access(vp, accmode, ap->a_td, ap->a_cred); in fuse_vnop_access() 2253 accmode_t accmode = 0; in fuse_vnop_setattr() local 2281 accmode |= VADMIN; in fuse_vnop_setattr() 2302 accmode |= VADMIN; in fuse_vnop_setattr() 2331 accmode |= VWRITE; in fuse_vnop_setattr() 2333 accmode |= VADMIN; in fuse_vnop_setattr() 2360 accmode |= VADMIN; in fuse_vnop_setattr() [all …]
|
/freebsd/sys/ufs/ufs/ |
H A D | ufs_vnops.c | 374 accmode_t accmode = ap->a_accmode; in ufs_accessx() local 386 if (accmode & VMODIFY_PERMS) { in ufs_accessx() 417 if ((accmode & (VMODIFY_PERMS & ~VADMIN_PERMS)) && in ufs_accessx() 437 ip->i_gid, acl, accmode, ap->a_cred); in ufs_accessx() 439 error = vfs_unixify_accmode(&accmode); in ufs_accessx() 442 ip->i_gid, acl, accmode, ap->a_cred); in ufs_accessx() 455 error = vfs_unixify_accmode(&accmode); in ufs_accessx() 458 ip->i_uid, ip->i_gid, accmode, ap->a_cred); in ufs_accessx() 465 error = vfs_unixify_accmode(&accmode); in ufs_accessx() 468 accmode, a in ufs_accessx() [all...] |
/freebsd/sys/fs/cd9660/ |
H A D | cd9660_vfsops.c | 136 accmode_t accmode; in cd9660_mount() local 178 accmode = VREAD; in cd9660_mount() 179 error = VOP_ACCESS(devvp, accmode, td->td_ucred, td); in cd9660_mount()
|