Home
last modified time | relevance | path

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

123

/freebsd/sys/kern/
H A Dsubr_acl_posix1e.c67 KASSERT((accmode & VAPPEND) == 0 || (accmode & VWRITE), in vaccess_acl_posix1e()
105 if (((accmode & VWRITE) || (accmode & VAPPEND)) && in vaccess_acl_posix1e()
132 if ((accmode & dac_granted) == accmode) in vaccess_acl_posix1e()
139 accmode) { in vaccess_acl_posix1e()
207 if ((accmode & dac_granted) == accmode) in vaccess_acl_posix1e()
213 accmode) in vaccess_acl_posix1e()
242 if ((accmode & dac_granted) == accmode) in vaccess_acl_posix1e()
260 if ((accmode & dac_granted) == accmode) in vaccess_acl_posix1e()
294 != accmode) in vaccess_acl_posix1e()
343 if ((accmode & dac_granted) == accmode) in vaccess_acl_posix1e()
[all …]
H A Dsubr_acl_nfs4.c67 accmode_t accmode; member
86 _access_mask_from_accmode(accmode_t accmode) in _access_mask_from_accmode() argument
91 if (accmode & accmode2mask[i].accmode) in _access_mask_from_accmode()
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()
250 accmode &= ~VEXPLICIT_DENY; in vaccess_acl_nfs4()
264 if ((accmode & VEXEC) && (file_mode & in vaccess_acl_nfs4()
277 if ((accmode & VADMIN_PERMS) && in vaccess_acl_nfs4()
281 if ((accmode & VSTAT_PERMS) && in vaccess_acl_nfs4()
[all …]
H A Dvfs_subr.c5511 KASSERT((accmode & VAPPEND) == 0 || (accmode & VWRITE), in vaccess()
5531 if ((accmode & dac_granted) == accmode) in vaccess()
5546 if ((accmode & dac_granted) == accmode) in vaccess()
5559 if ((accmode & dac_granted) == accmode) in vaccess()
5603 if ((accmode & (priv_granted | dac_granted)) == accmode) { in vaccess()
6682 vfs_unixify_accmode(accmode_t *accmode) in vfs_unixify_accmode() argument
6688 if (*accmode & VEXPLICIT_DENY) { in vfs_unixify_accmode()
6689 *accmode = 0; in vfs_unixify_accmode()
6702 if (*accmode & VADMIN_PERMS) { in vfs_unixify_accmode()
6703 *accmode &= ~VADMIN_PERMS; in vfs_unixify_accmode()
[all …]
H A Dvfs_vnops.c395 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()
432 accmode &= ~(VCREAT | VVERIFY); in vn_open_vnode()
434 if ((fmode & O_CREAT) == 0 && accmode != 0) { in vn_open_vnode()
[all …]
/freebsd/sys/security/mac_bsdextended/
H A Dmac_bsdextended.c467 ugidfw_accmode2mbi(accmode_t accmode) in ugidfw_accmode2mbi() argument
472 if (accmode & VEXEC) in ugidfw_accmode2mbi()
474 if (accmode & VWRITE) in ugidfw_accmode2mbi()
476 if (accmode & VREAD) in ugidfw_accmode2mbi()
478 if (accmode & VADMIN_PERMS) in ugidfw_accmode2mbi()
480 if (accmode & VSTAT_PERMS) in ugidfw_accmode2mbi()
482 if (accmode & VAPPEND) in ugidfw_accmode2mbi()
H A Dugidfw_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()
H A Dugidfw_internal.h35 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 Dmac_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()
H A Dmac_framework.h327 accmode_t accmode);
496 accmode_t accmode);
501 accmode_t accmode) in mac_vnode_check_access() argument
506 return (mac_vnode_check_access_impl(cred, dvp, accmode)); in mac_vnode_check_access()
567 accmode_t accmode);
576 accmode_t accmode) in mac_vnode_check_open() argument
581 return (mac_vnode_check_open_impl(cred, vp, accmode)); in mac_vnode_check_open()
H A Dmac_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/sys/contrib/openzfs/module/os/freebsd/spl/
H A Dspl_policy.c127 secpolicy_vnode_access(cred_t *cr, vnode_t *vp, uid_t owner, accmode_t accmode) in secpolicy_vnode_access() argument
133 if ((accmode & VREAD) && spl_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 Dquotafile.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/sys/fs/unionfs/
H A Dunion_vnops.c690 if (accmode & VEXEC) in unionfs_check_corrected_access()
692 if (accmode & VREAD) in unionfs_check_corrected_access()
694 if (accmode & VWRITE) in unionfs_check_corrected_access()
701 if (accmode & VEXEC) in unionfs_check_corrected_access()
703 if (accmode & VREAD) in unionfs_check_corrected_access()
705 if (accmode & VWRITE) in unionfs_check_corrected_access()
711 if (accmode & VEXEC) in unionfs_check_corrected_access()
713 if (accmode & VREAD) in unionfs_check_corrected_access()
715 if (accmode & VWRITE) in unionfs_check_corrected_access()
730 accmode_t accmode; in unionfs_access() local
[all …]
/freebsd/sys/fs/tarfs/
H A Dtarfs_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()
H A Dtarfs_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/sys/security/mac_veriexec/
H A Dmac_veriexec.c520 mac_veriexec_check_vp(struct ucred *cred, struct vnode *vp, accmode_t accmode) in mac_veriexec_check_vp() argument
542 if (accmode & VWRITE) { in mac_veriexec_check_vp()
561 if (accmode & VVERIFY) { in mac_veriexec_check_vp()
600 struct label *label __unused, accmode_t accmode) in mac_veriexec_vnode_check_open() argument
611 error = mac_veriexec_check_vp(cred, vp, accmode); in mac_veriexec_vnode_check_open()
/freebsd/sys/fs/smbfs/
H A Dsmbfs_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/sys/fs/fuse/
H A Dfuse_vnops.c424 int accmode = ap->a_accmode; in fuse_vnop_access() local
2226 accmode_t accmode = 0; in fuse_vnop_setattr() local
2252 accmode |= VADMIN; in fuse_vnop_setattr()
2255 accmode |= VADMIN; in fuse_vnop_setattr()
2257 accmode |= VADMIN; in fuse_vnop_setattr()
2277 accmode |= VADMIN; in fuse_vnop_setattr()
2279 accmode |= VADMIN; in fuse_vnop_setattr()
2281 accmode |= VADMIN; in fuse_vnop_setattr()
2310 accmode |= VWRITE; in fuse_vnop_setattr()
2312 accmode |= VADMIN; in fuse_vnop_setattr()
[all …]
/freebsd/sys/nlm/
H A Dnlm_prot_impl.c1752 fhandle_t *fhp, struct vfs_state *vs, accmode_t accmode) in nlm_get_vfs_state() argument
1766 if (accmode != 0) { in nlm_get_vfs_state()
1785 if (accmode != 0) { in nlm_get_vfs_state()
1799 error = VOP_ACCESS(vs->vs_vp, accmode, cred, curthread); in nlm_get_vfs_state()
1805 if (error != 0 && accmode != VWRITE) in nlm_get_vfs_state()
1858 accmode_t accmode; in nlm_do_test() local
1884 accmode = argp->exclusive ? VWRITE : VREAD; in nlm_do_test()
1885 error = nlm_get_vfs_state(host, rqstp, &fh, &vs, accmode); in nlm_do_test()
1956 accmode_t accmode; in nlm_do_lock() local
1991 accmode = argp->exclusive ? VWRITE : VREAD; in nlm_do_lock()
[all …]
/freebsd/sys/sys/
H A Dextattr.h69 struct ucred *cred, struct thread *td, accmode_t accmode);
/freebsd/sys/fs/nullfs/
H A Dnull_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/sys/cddl/compat/opensolaris/sys/
H A Dpolicy.h51 accmode_t accmode);
/freebsd/sys/contrib/openzfs/include/os/freebsd/spl/sys/
H A Dpolicy.h51 accmode_t accmode);
/freebsd/sys/ufs/ufs/
H A Dufs_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/sys/fs/cd9660/
H A Dcd9660_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