Home
last modified time | relevance | path

Searched refs:accmode (Results 1 – 25 of 53) sorted by relevance

123

/freebsd-head/sys/kern/
HDsubr_acl_posix1e.c57 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 …]
HDsubr_acl_nfs4.c67 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 …]
HDvfs_subr.c5590 accmode_t accmode, struct ucred *cred) in vaccess() argument
5595 KASSERT((accmode & ~(VEXEC | VWRITE | VREAD | VADMIN | VAPPEND)) == 0, in vaccess()
5597 KASSERT((accmode & VAPPEND) == 0 || (accmode & VWRITE), in vaccess()
5617 if ((accmode & dac_granted) == accmode) in vaccess()
5632 if ((accmode & dac_granted) == accmode) in vaccess()
5645 if ((accmode & dac_granted) == accmode) in vaccess()
5662 if ((accmode & VEXEC) && ((dac_granted & VEXEC) == 0) && in vaccess()
5671 if ((accmode & VEXEC) && ((dac_granted & VEXEC) == 0) && in vaccess()
5677 if ((accmode & VREAD) && ((dac_granted & VREAD) == 0) && in vaccess()
5681 if ((accmode & VWRITE) && ((dac_granted & VWRITE) == 0) && in vaccess()
[all …]
HDvfs_vnops.c433 accmode_t accmode; in vn_open_vnode() local
446 accmode = 0; in vn_open_vnode()
453 accmode |= VWRITE; in vn_open_vnode()
456 accmode |= VREAD; in vn_open_vnode()
458 accmode |= VAPPEND; in vn_open_vnode()
461 accmode |= VCREAT; in vn_open_vnode()
465 accmode |= VEXEC; in vn_open_vnode()
468 accmode |= VVERIFY; in vn_open_vnode()
469 error = mac_vnode_check_open(cred, vp, accmode); in vn_open_vnode()
473 accmode &= ~(VCREAT | VVERIFY); in vn_open_vnode()
[all …]
/freebsd-head/sys/security/mac_bsdextended/
HDmac_bsdextended.c465 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()
HDugidfw_vnode.c63 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()
HDugidfw_internal.h35 int ugidfw_accmode2mbi(accmode_t accmode);
54 struct label *vplabel, accmode_t accmode);
82 struct label *vplabel, accmode_t accmode);
/freebsd-head/sys/security/mac/
HDmac_posix_shm.c137 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()
HDmac_framework.h331 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()
HDmac_vfs.c373 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-head/sys/contrib/openzfs/module/os/freebsd/spl/
HDspl_policy.c121 secpolicy_vnode_access(cred_t *cr, vnode_t *vp, uid_t owner, accmode_t accmode) in secpolicy_vnode_access() argument
127 if ((accmode & VREAD) && priv_check_cred(cr, PRIV_VFS_READ) != 0) in secpolicy_vnode_access()
129 if ((accmode & VWRITE) && in secpolicy_vnode_access()
133 if (accmode & VEXEC) { in secpolicy_vnode_access()
/freebsd-head/lib/libutil/
HDquotafile.c52 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-head/sys/fs/unionfs/
HDunion_vnops.c878 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-head/sys/fs/tarfs/
HDtarfs_vnops.c91 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()
HDtarfs_io.c260 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-head/sys/security/mac_veriexec/
HDmac_veriexec.c519 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-head/sys/fs/smbfs/
HDsmbfs_vnops.c120 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-head/sys/nlm/
HDnlm_prot_impl.c1757 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-head/sys/sys/
HDextattr.h69 struct ucred *cred, struct thread *td, accmode_t accmode);
/freebsd-head/sys/fs/nullfs/
HDnull_vnops.c568 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-head/sys/cddl/compat/opensolaris/sys/
HDpolicy.h51 accmode_t accmode);
/freebsd-head/sys/contrib/openzfs/include/os/freebsd/spl/sys/
HDpolicy.h51 accmode_t accmode);
/freebsd-head/sys/fs/fuse/
HDfuse_vnops.c232 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-head/sys/ufs/ufs/
HDufs_vnops.c374 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, ap->a_cred); in ufs_accessx()
/freebsd-head/sys/fs/cd9660/
HDcd9660_vfsops.c136 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()

123