/freebsd-9.3-release/sys/kern/ |
H A D | vfs_lookup.c | 125 namei_cleanup_cnp(struct componentname *cnp) argument 127 uma_zfree(namei_zone, cnp->cn_pnbuf); 129 cnp->cn_pnbuf = NULL; 130 cnp->cn_nameptr = NULL; 143 struct componentname *cnp = &ndp->ni_cnd; local 144 struct thread *td = cnp->cn_thread; 148 KASSERT((cnp->cn_flags & MPSAFE) != 0 || mtx_owned(&Giant) != 0, 151 KASSERT(cnp->cn_cred && p, ("namei: bad cred/proc")); 152 KASSERT((cnp->cn_nameiop & (~OPMASK)) == 0, 154 KASSERT((cnp 487 struct componentname *cnp = &ndp->ni_cnd; local 959 relookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp) argument [all...] |
H A D | vfs_cache.c | 458 * cnp pointing to the name of the entry being sought. If the lookup 472 cache_lookup_times(dvp, vpp, cnp, tsp, ticksp) 475 struct componentname *cnp; 484 cnp->cn_flags &= ~MAKEENTRY; 494 if (cnp->cn_nameptr[0] == '.') { 495 if (cnp->cn_namelen == 1) { 498 dvp, cnp->cn_nameptr); 508 if (cnp->cn_namelen == 2 && cnp->cn_nameptr[1] == '.') { 515 if ((cnp 1020 struct componentname *cnp = ap->a_cnp; local 1449 cache_enter(struct vnode *dvp, struct vnode *vp, struct componentname *cnp) argument 1456 cache_lookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp) argument [all...] |
/freebsd-9.3-release/sys/fs/nwfs/ |
H A D | nwfs_vnops.c | 393 * the pathname buffer pointed at by cnp->cn_pnbuf, always on error, or 408 struct componentname *cnp = ap->a_cnp; local 422 if ((error = VOP_GETATTR(dvp, &vattr, cnp->cn_cred))) 428 error = ncp_open_create_file_or_subdir(nmp, dvp, cnp->cn_namelen, cnp->cn_nameptr, 430 0, fmode, &no, cnp->cn_thread, cnp->cn_cred); 432 error = ncp_close_file(NWFSTOCONN(nmp), &no.fh, cnp->cn_thread, cnp->cn_cred); 441 if (cnp 462 struct componentname *cnp = ap->a_cnp; local 619 struct componentname *cnp = ap->a_cnp; local 665 struct componentname *cnp = ap->a_cnp; local 814 struct componentname *cnp = ap->a_cnp; local [all...] |
/freebsd-9.3-release/sys/fs/unionfs/ |
H A D | union.h | 109 int unionfs_nodeget(struct mount *mp, struct vnode *uppervp, struct vnode *lowervp, struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, struct thread *td); 118 int unionfs_mkshadowdir(struct unionfs_mount *ump, struct vnode *duvp, struct unionfs_node *unp, struct componentname *cnp, struct thread *td); 119 int unionfs_mkwhiteout(struct vnode *dvp, struct componentname *cnp, struct thread *td, char *path); 120 int unionfs_relookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, struct componentname *cn, struct thread *td, char *path, int pathlen, u_long nameiop); 121 int unionfs_relookup_for_create(struct vnode *dvp, struct componentname *cnp, struct thread *td); 122 int unionfs_relookup_for_delete(struct vnode *dvp, struct componentname *cnp, struct thread *td); 123 int unionfs_relookup_for_rename(struct vnode *dvp, struct componentname *cnp, struct thread *td);
|
H A D | union_subr.c | 209 struct vnode **vpp, struct componentname *cnp, 221 lkflags = (cnp ? cnp->cn_lkflags : 0); 222 path = (cnp ? cnp->cn_nameptr : NULL); 231 if (cnp && !(cnp->cn_flags & ISLASTCN)) 291 malloc(cnp->cn_namelen +1, M_UNIONFSPATH, M_WAITOK|M_ZERO); 292 bcopy(cnp->cn_nameptr, unp->un_path, cnp 207 unionfs_nodeget(struct mount *mp, struct vnode *uppervp, struct vnode *lowervp, struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, struct thread *td) argument 530 unionfs_relookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, struct componentname *cn, struct thread *td, char *path, int pathlen, u_long nameiop) argument 578 unionfs_relookup_for_create(struct vnode *dvp, struct componentname *cnp, struct thread *td) argument 622 unionfs_relookup_for_delete(struct vnode *dvp, struct componentname *cnp, struct thread *td) argument 666 unionfs_relookup_for_rename(struct vnode *dvp, struct componentname *cnp, struct thread *td) argument 756 unionfs_mkshadowdir(struct unionfs_mount *ump, struct vnode *udvp, struct unionfs_node *unp, struct componentname *cnp, struct thread *td) argument 847 unionfs_mkwhiteout(struct vnode *dvp, struct componentname *cnp, struct thread *td, char *path) argument [all...] |
H A D | union_vnops.c | 89 struct componentname *cnp; local 95 cnp = ap->a_cnp; 96 nameiop = cnp->cn_nameiop; 97 cnflags = cnp->cn_flags; 106 UNIONFS_INTERNAL_DEBUG("unionfs_lookup: enter: nameiop=%ld, flags=%lx, path=%s\n", nameiop, cnflags, cnp->cn_nameptr); 134 error = VOP_LOOKUP(dtmpvp, &vp, cnp); 148 (cnp->cn_lkflags & LK_TYPE_MASK)) 158 else if (cnp->cn_lkflags & LK_TYPE_MASK) 159 vn_lock(dunp->un_dvp, cnp->cn_lkflags | 165 cache_enter(dvp, NULLVP, cnp); 352 struct componentname *cnp; local 391 struct componentname *cnp; local 426 struct componentname *cnp; local 972 struct componentname *cnp; local 1054 struct componentname *cnp; local 1334 struct componentname *cnp; local 1383 struct componentname *cnp; local 1441 struct componentname *cnp; local [all...] |
/freebsd-9.3-release/sys/fs/msdosfs/ |
H A D | msdosfs_lookup.c | 65 struct componentname *cnp, u_int64_t *inum); 93 struct componentname *cnp, u_int64_t *dd_inum) 114 int flags = cnp->cn_flags; 115 int nameiop = cnp->cn_nameiop; 124 printf("msdosfs_lookup(): looking for %s\n", cnp->cn_nameptr); 141 if ((vdp->v_vflag & VV_ROOT) && cnp->cn_nameptr[0] == '.' && 142 (cnp->cn_namelen == 1 || 143 (cnp->cn_namelen == 2 && cnp->cn_nameptr[1] == '.'))) { 154 switch (unix2dosfn((const u_char *)cnp 92 msdosfs_lookup_(struct vnode *vdp, struct vnode **vpp, struct componentname *cnp, u_int64_t *dd_inum) argument [all...] |
/freebsd-9.3-release/sys/fs/ext2fs/ |
H A D | ext2_lookup.c | 116 static int ext2_is_dot_entry(struct componentname *cnp); 118 struct componentname *cnp, ino_t *dd_ino); 121 ext2_is_dot_entry(struct componentname *cnp) argument 123 if (cnp->cn_namelen <= 2 && cnp->cn_nameptr[0] == '.' && 124 (cnp->cn_nameptr[1] == '.' || cnp->cn_nameptr[1] == '0')) 270 * The cnp->cn_nameiop argument is LOOKUP, CREATE, RENAME, or DELETE depending 302 ext2_lookup_ino(struct vnode *vdp, struct vnode **vpp, struct componentname *cnp, argument 320 struct ucred *cred = cnp 862 ext2_direnter(struct inode *ip, struct vnode *dvp, struct componentname *cnp) argument 1051 ext2_dirremove(struct vnode *dvp, struct componentname *cnp) argument 1099 ext2_dirrewrite(struct inode *dp, struct inode *ip, struct componentname *cnp) argument [all...] |
/freebsd-9.3-release/sys/fs/coda/ |
H A D | coda_vnops.c | 869 struct componentname *cnp = ap->a_cnp; local 870 struct ucred *cred = cnp->cn_cred; 871 struct thread *td = cnp->cn_thread; 874 const char *nm = cnp->cn_nameptr; 875 int len = cnp->cn_namelen; 922 if (!(vtype & CODA_NOCACHE) && (cnp->cn_flags & MAKEENTRY)) 923 cache_enter(dvp, *vpp, cnp); 935 if (((cnp->cn_nameiop == CREATE) || (cnp->cn_nameiop == RENAME)) 936 && (cnp 1005 struct componentname *cnp = ap->a_cnp; local 1095 struct componentname *cnp = ap->a_cnp; local 1141 struct componentname *cnp = ap->a_cnp; local 1272 struct componentname *cnp = ap->a_cnp; local 1344 struct componentname *cnp = ap->a_cnp; local 1389 struct componentname *cnp = ap->a_cnp; local [all...] |
/freebsd-9.3-release/sys/fs/cd9660/ |
H A D | cd9660_lookup.c | 119 struct componentname *cnp = ap->a_cnp; local 120 int flags = cnp->cn_flags; 121 int nameiop = cnp->cn_nameiop; 135 len = cnp->cn_namelen; 136 name = cnp->cn_nameptr; 268 if (namelen == cnp->cn_namelen 314 if (cnp->cn_flags & MAKEENTRY) 315 cache_enter(vdp, *vpp, cnp); 393 cnp->cn_lkflags, &tdp, 412 ltype = cnp [all...] |
/freebsd-9.3-release/sys/fs/hpfs/ |
H A D | hpfs_lookup.c | 114 struct componentname *cnp, 120 dhp->h_no, cnp->cn_nameptr, cnp->cn_namelen)); 202 struct componentname *cnp) 208 dhp->h_no, hp->h_no, cnp->cn_nameptr, cnp->cn_namelen)); 111 hpfs_makefnode( struct vnode * dvp, struct vnode ** vpp, struct componentname *cnp, struct vattr *vap) argument 199 hpfs_removefnode( struct vnode * dvp, struct vnode * vp, struct componentname *cnp) argument
|
/freebsd-9.3-release/sys/security/mac_bsdextended/ |
H A D | ugidfw_internal.h | 62 struct label *dvplabel, struct componentname *cnp, 78 struct componentname *cnp); 82 struct label *dvplabel, struct componentname *cnp); 91 struct componentname *cnp); 94 int samedir, struct componentname *cnp); 114 struct componentname *cnp);
|
H A D | ugidfw_vnode.c | 89 struct label *dvplabel, struct componentname *cnp, struct vattr *vap) 139 struct componentname *cnp) 162 struct label *dvplabel, struct componentname *cnp) 195 struct componentname *cnp) 208 int samedir, struct componentname *cnp) 287 struct componentname *cnp) 88 ugidfw_check_create_vnode(struct ucred *cred, struct vnode *dvp, struct label *dvplabel, struct componentname *cnp, struct vattr *vap) argument 137 ugidfw_vnode_check_link(struct ucred *cred, struct vnode *dvp, struct label *dvplabel, struct vnode *vp, struct label *label, struct componentname *cnp) argument 161 ugidfw_vnode_check_lookup(struct ucred *cred, struct vnode *dvp, struct label *dvplabel, struct componentname *cnp) argument 193 ugidfw_vnode_check_rename_from(struct ucred *cred, struct vnode *dvp, struct label *dvplabel, struct vnode *vp, struct label *vplabel, struct componentname *cnp) argument 206 ugidfw_vnode_check_rename_to(struct ucred *cred, struct vnode *dvp, struct label *dvplabel, struct vnode *vp, struct label *vplabel, int samedir, struct componentname *cnp) argument 285 ugidfw_vnode_check_unlink(struct ucred *cred, struct vnode *dvp, struct label *dvplabel, struct vnode *vp, struct label *vplabel, struct componentname *cnp) argument
|
/freebsd-9.3-release/sys/fs/nfsclient/ |
H A D | nfs_clvnops.c | 207 struct componentname *cnp, struct vattr *vap); 1033 struct componentname *cnp = ap->a_cnp; local 1037 int flags = cnp->cn_flags; 1042 struct thread *td = cnp->cn_thread; 1050 (cnp->cn_nameiop == DELETE || cnp->cn_nameiop == RENAME)) 1065 if ((error = VOP_ACCESS(dvp, VEXEC, cnp->cn_cred, td)) != 0) 1067 error = cache_lookup_times(dvp, vpp, cnp, &nctime, &ncticks); 1076 if (cnp->cn_namelen == 1 && cnp 1415 nfs_mknodrpc(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, struct vattr *vap) argument 1518 struct componentname *cnp = ap->a_cnp; local 1653 struct componentname *cnp = ap->a_cnp; local 1950 struct componentname *cnp = ap->a_cnp; local 2013 struct componentname *cnp = ap->a_cnp; local 2089 struct componentname *cnp = ap->a_cnp; local 2165 struct componentname *cnp = ap->a_cnp; local 2379 nfs_sillyrename(struct vnode *dvp, struct vnode *vp, struct componentname *cnp) argument [all...] |
/freebsd-9.3-release/sys/nfsserver/ |
H A D | nfs_srvsubs.c | 595 struct componentname *cnp = &ndp->ni_cnd; local 596 int lockleaf = (cnp->cn_flags & LOCKLEAF) != 0; 603 cnp->cn_flags |= NOMACCHECK; 604 cnp->cn_pnbuf = uma_zalloc(namei_zone, M_WAITOK); 611 tocp = cnp->cn_pnbuf; 659 cnp->cn_flags |= RDONLY; 679 fromcp = cnp->cn_pnbuf; 719 uma_zfree(namei_zone, cnp->cn_pnbuf); 720 cnp->cn_pnbuf = cp; 723 ndp->ni_pathlen = (tocp - cnp [all...] |
/freebsd-9.3-release/sys/fs/smbfs/ |
H A D | smbfs_vnops.c | 464 * the pathname buffer pointed at by cnp->cn_pnbuf, always on error, or 479 struct componentname *cnp = ap->a_cnp; local 485 char *name = cnp->cn_nameptr; 486 int nmlen = cnp->cn_namelen; 494 if ((error = VOP_GETATTR(dvp, &vattr, cnp->cn_cred))) 496 smb_makescred(&scred, cnp->cn_thread, cnp->cn_cred); 508 if (cnp->cn_flags & MAKEENTRY) 509 cache_enter(dvp, vp, cnp); 524 struct componentname *cnp local 684 struct componentname *cnp = ap->a_cnp; local 725 struct componentname *cnp = ap->a_cnp; local 1084 struct componentname *cnp = ap->a_cnp; local [all...] |
/freebsd-9.3-release/sys/ufs/ufs/ |
H A D | ufs_lookup.c | 166 * The cnp->cn_nameiop argument is LOOKUP, CREATE, RENAME, or DELETE depending 218 ufs_lookup_ino(struct vnode *vdp, struct vnode **vpp, struct componentname *cnp, argument 240 struct ucred *cred = cnp->cn_cred; 241 int flags = cnp->cn_flags; 242 int nameiop = cnp->cn_nameiop; 259 vnode_create_vobject(vdp, DIP(dp, i_size), cnp->cn_thread); 289 slotneeded = DIRECTSIZ(cnp->cn_namelen); 315 switch (ufsdirhash_lookup(dp, cnp->cn_nameptr, cnp->cn_namelen, 441 if (namlen == cnp [all...] |
H A D | ufs_vnops.c | 995 struct componentname *cnp = ap->a_cnp; local 1001 if ((cnp->cn_flags & HASBUF) == 0) 1036 ufs_makedirentry(ip, cnp, &newdir); 1037 error = ufs_direnter(tdvp, vp, &newdir, cnp, NULL, 0); 1064 struct componentname *cnp = ap->a_cnp; local 1078 if ((cnp->cn_flags & SAVENAME) == 0) 1085 newdir.d_namlen = cnp->cn_namelen; 1086 bcopy(cnp->cn_nameptr, newdir.d_name, (unsigned)cnp->cn_namelen + 1); 1088 error = ufs_direnter(dvp, NULL, &newdir, cnp, NUL 1810 struct componentname *cnp = ap->a_cnp; local 2049 struct componentname *cnp = ap->a_cnp; local [all...] |
/freebsd-9.3-release/sys/fs/tmpfs/ |
H A D | tmpfs_vnops.c | 79 struct componentname *cnp = v->a_cnp; local 89 error = VOP_ACCESS(dvp, VEXEC, cnp->cn_cred, cnp->cn_thread); 96 !(cnp->cn_flags & ISDOTDOT))); 103 if (cnp->cn_flags & ISDOTDOT) { 111 cnp->cn_lkflags, vpp); 115 } else if (cnp->cn_namelen == 1 && cnp->cn_nameptr[0] == '.') { 120 de = tmpfs_dir_lookup(dnode, NULL, cnp); 122 cnp 218 struct componentname *cnp = v->a_cnp; local 232 struct componentname *cnp = v->a_cnp; local 870 struct componentname *cnp = v->a_cnp; local 1345 struct componentname *cnp = v->a_cnp; local 1455 struct componentname *cnp = v->a_cnp; local 1732 struct componentname *cnp = ap->a_cnp; local [all...] |
H A D | tmpfs_subr.c | 553 * 'dvp'; this addition is done using the component name given in 'cnp'. 555 * credentials of the caller (through 'cnp'), the group is set based on 563 struct componentname *cnp, char *target) 573 MPASS(cnp->cn_flags & HASBUF); 597 error = tmpfs_alloc_node(tmp, vap->va_type, cnp->cn_cred->cr_uid, 603 error = tmpfs_alloc_dirent(tmp, node, cnp->cn_nameptr, cnp->cn_namelen, 621 if (cnp->cn_flags & ISWHITEOUT) 622 tmpfs_dir_whiteout_remove(dvp, cnp); 680 * 'cnp' describe 562 tmpfs_alloc_file(struct vnode *dvp, struct vnode **vpp, struct vattr *vap, struct componentname *cnp, char *target) argument 687 tmpfs_dir_lookup(struct tmpfs_node *node, struct tmpfs_node *f, struct componentname *cnp) argument 949 tmpfs_dir_whiteout_add(struct vnode *dvp, struct componentname *cnp) argument 963 tmpfs_dir_whiteout_remove(struct vnode *dvp, struct componentname *cnp) argument [all...] |
/freebsd-9.3-release/sys/nfsclient/ |
H A D | nfs_vnops.c | 200 struct componentname *cnp, struct vattr *vap); 927 struct componentname *cnp = ap->a_cnp; local 933 int flags = cnp->cn_flags; 943 struct thread *td = cnp->cn_thread; 947 (cnp->cn_nameiop == DELETE || cnp->cn_nameiop == RENAME)) 953 if ((error = VOP_ACCESS(dvp, VEXEC, cnp->cn_cred, td)) != 0) { 957 error = cache_lookup_times(dvp, vpp, cnp, &nctime, &ncticks); 966 if (cnp->cn_namelen == 1 && cnp 1482 nfs_mknodrpc(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, struct vattr *vap) argument 1584 struct componentname *cnp = ap->a_cnp; local 1718 struct componentname *cnp = ap->a_cnp; local 1969 struct componentname *cnp = ap->a_cnp; local 2024 struct componentname *cnp = ap->a_cnp; local 2112 struct componentname *cnp = ap->a_cnp; local 2184 struct componentname *cnp = ap->a_cnp; local 2479 struct componentname *cnp = &ndp->ni_cnd; local 2752 nfs_sillyrename(struct vnode *dvp, struct vnode *vp, struct componentname *cnp) argument [all...] |
/freebsd-9.3-release/sys/gnu/fs/reiserfs/ |
H A D | reiserfs_namei.c | 29 struct componentname *cnp = ap->a_cnp; local 31 int flags = cnp->cn_flags; 32 struct thread *td = cnp->cn_thread; 41 char c = cnp->cn_nameptr[cnp->cn_namelen]; 42 cnp->cn_nameptr[cnp->cn_namelen] = '\0'; 44 cnp->cn_nameptr, cnp->cn_namelen, cnp [all...] |
/freebsd-9.3-release/sys/fs/ntfs/ |
H A D | ntfs_vnops.c | 611 struct componentname *cnp = ap->a_cnp; local 612 struct ucred *cred = cnp->cn_cred; 615 (int)cnp->cn_namelen, cnp->cn_nameptr, cnp->cn_namelen, 618 error = VOP_ACCESS(dvp, VEXEC, cred, cnp->cn_thread); 622 if ((cnp->cn_flags & ISLASTCN) && 624 (cnp->cn_nameiop == DELETE || cnp->cn_nameiop == RENAME)) 627 if(cnp [all...] |
/freebsd-9.3-release/cddl/contrib/opensolaris/lib/libdtrace/common/ |
H A D | dt_pragma.c | 237 dt_pragma_depends(const char *prname, dt_node_t *cnp) argument 240 dt_node_t *nnp = cnp ? cnp->dn_list : NULL; 247 if (cnp == NULL || nnp == NULL || 248 cnp->dn_kind != DT_NODE_IDENT || nnp->dn_kind != DT_NODE_IDENT) { 253 if (strcmp(cnp->dn_string, "provider") == 0) { 277 } else if (strcmp(cnp->dn_string, "module") == 0) { 280 } else if (strcmp(cnp->dn_string, "library") == 0) { 327 "specified by #pragma %s\n", cnp->dn_string, prname); 332 cnp [all...] |
/freebsd-9.3-release/sys/security/mac/ |
H A D | mac_vfs.c | 280 struct vnode *dvp, struct vnode *vp, struct componentname *cnp) 298 dvp->v_label, vp, vp->v_label, cnp); 425 struct componentname *cnp, struct vattr *vap) 431 MAC_POLICY_CHECK(vnode_check_create, cred, dvp, dvp->v_label, cnp, 433 MAC_CHECK_PROBE4(vnode_check_create, error, cred, dvp, cnp, vap); 532 struct vnode *vp, struct componentname *cnp) 540 vp->v_label, cnp); 541 MAC_CHECK_PROBE4(vnode_check_link, error, cred, dvp, vp, cnp); 570 struct componentname *cnp) 576 MAC_POLICY_CHECK(vnode_check_lookup, cred, dvp, dvp->v_label, cnp); 279 mac_vnode_create_extattr(struct ucred *cred, struct mount *mp, struct vnode *dvp, struct vnode *vp, struct componentname *cnp) argument 424 mac_vnode_check_create(struct ucred *cred, struct vnode *dvp, struct componentname *cnp, struct vattr *vap) argument 531 mac_vnode_check_link(struct ucred *cred, struct vnode *dvp, struct vnode *vp, struct componentname *cnp) argument 569 mac_vnode_check_lookup(struct ucred *cred, struct vnode *dvp, struct componentname *cnp) argument 736 mac_vnode_check_rename_from(struct ucred *cred, struct vnode *dvp, struct vnode *vp, struct componentname *cnp) argument 755 mac_vnode_check_rename_to(struct ucred *cred, struct vnode *dvp, struct vnode *vp, int samedir, struct componentname *cnp) argument 912 mac_vnode_check_unlink(struct ucred *cred, struct vnode *dvp, struct vnode *vp, struct componentname *cnp) argument [all...] |