| /NextBSD/sys/fs/nfsserver/ |
| HD | nfs_nfsdserv.c | 75 static void nfsrvd_symlinksub(struct nfsrv_descript *nd, struct nameidata *ndp, 81 static void nfsrvd_mkdirsub(struct nfsrv_descript *nd, struct nameidata *ndp, 91 nfsrvd_access(struct nfsrv_descript *nd, __unused int isdgram, in nfsrvd_access() argument 100 if (nd->nd_repstat) { in nfsrvd_access() 101 nfsrv_postopattr(nd, 1, &nva); in nfsrvd_access() 106 if ((nd->nd_flag & ND_NFSV4) && in nfsrvd_access() 110 nd->nd_repstat = NFSERR_INVAL; in nfsrvd_access() 116 if (nfsvno_accchk(vp, VREAD, nd->nd_cred, exp, p, in nfsrvd_access() 122 if (nfsvno_accchk(vp, VWRITE, nd->nd_cred, exp, p, in nfsrvd_access() 128 if (nfsvno_accchk(vp, VWRITE | VAPPEND, nd->nd_cred, exp, p, in nfsrvd_access() [all …]
|
| HD | nfs_nfsdkrpc.c | 114 struct nfsrv_descript nd; in nfssvc_program() local 118 memset(&nd, 0, sizeof(nd)); in nfssvc_program() 126 nd.nd_procnum = newnfs_nfsv3_procid[rqst->rq_proc]; in nfssvc_program() 127 nd.nd_flag = ND_NFSV2; in nfssvc_program() 134 nd.nd_procnum = rqst->rq_proc; in nfssvc_program() 135 nd.nd_flag = ND_NFSV3; in nfssvc_program() 143 nd.nd_procnum = rqst->rq_proc; in nfssvc_program() 144 nd.nd_flag = ND_NFSV4; in nfssvc_program() 152 nd.nd_mrep = rqst->rq_args; in nfssvc_program() 154 newnfs_realign(&nd.nd_mrep, M_WAITOK); in nfssvc_program() [all …]
|
| HD | nfs_nfsdsocket.c | 365 static void nfsrvd_compound(struct nfsrv_descript *nd, int isdgram, 411 nfsrvd_dorpc(struct nfsrv_descript *nd, int isdgram, u_char *tag, int taglen, in nfsrvd_dorpc() argument 423 if (!(nd->nd_flag & ND_NFSV4)) { in nfsrvd_dorpc() 424 KASSERT(nd->nd_repstat == 0, ("nfsrvd_dorpc")); in nfsrvd_dorpc() 429 if ((nd->nd_flag & ND_NFSV3) && nfsrv_mallocmget_limit()) { in nfsrvd_dorpc() 430 nd->nd_repstat = NFSERR_DELAY; in nfsrvd_dorpc() 433 error = nfsrv_mtofh(nd, &fh); in nfsrvd_dorpc() 437 nd->nd_repstat = NFSERR_GARBAGE; in nfsrvd_dorpc() 440 if (nd->nd_procnum == NFSPROC_READ || in nfsrvd_dorpc() 441 nd->nd_procnum == NFSPROC_WRITE || in nfsrvd_dorpc() [all …]
|
| HD | nfs_nfsdport.c | 338 nfsvno_namei(struct nfsrv_descript *nd, struct nameidata *ndp, in nfsvno_namei() argument 374 if (nd->nd_flag & ND_PUBLOOKUP) { in nfsvno_namei() 393 (nd->nd_flag & ND_NFSV4) == 0) { in nfsvno_namei() 445 if (!(nd->nd_flag & ND_PUBLOOKUP)) { in nfsvno_namei() 530 NFSEXITCODE2(error, nd); in nfsvno_namei() 774 nfsvno_createsub(struct nfsrv_descript *nd, struct nameidata *ndp, in nfsvno_createsub() argument 781 error = nd->nd_repstat; in nfsvno_createsub() 796 &nvap->na_vattr, nd->nd_cred); in nfsvno_createsub() 808 (error = priv_check_cred(nd->nd_cred, in nfsvno_createsub() 847 nd->nd_cred, exp, p, NFSACCCHK_NOOVERRIDE, in nfsvno_createsub() [all …]
|
| HD | nfs_nfsdsubs.c | 1331 nfsrv_wcc(struct nfsrv_descript *nd, int before_ret, in nfsrv_wcc() argument 1348 nfsrv_postopattr(nd, after_ret, after_nvap); in nfsrv_wcc() 1352 nfsrv_postopattr(struct nfsrv_descript *nd, int after_ret, in nfsrv_postopattr() argument 1362 nfsrv_fillattr(nd, after_nvap); in nfsrv_postopattr() 1371 nfsrv_fillattr(struct nfsrv_descript *nd, struct nfsvattr *nvap) in nfsrv_fillattr() argument 1379 if (nd->nd_flag & ND_NFSV3) in nfsrv_fillattr() 1391 if (nd->nd_flag & ND_NFSV3) { in nfsrv_fillattr() 1431 nfsrv_mtofh(struct nfsrv_descript *nd, struct nfsrvfh *fhp) in nfsrv_mtofh() argument 1436 if (nd->nd_flag & (ND_NFSV3 | ND_NFSV4)) { in nfsrv_mtofh() 1439 if (len == 0 && nfs_pubfhset && (nd->nd_flag & ND_NFSV3) && in nfsrv_mtofh() [all …]
|
| HD | nfs_nfsdcache.c | 280 static int nfsrc_getudp(struct nfsrv_descript *nd, struct nfsrvcache *newrp); 281 static int nfsrc_gettcp(struct nfsrv_descript *nd, struct nfsrvcache *newrp); 330 nfsrvd_getcache(struct nfsrv_descript *nd) in nfsrvd_getcache() argument 335 if (nd->nd_procnum == NFSPROC_NULL) in nfsrvd_getcache() 340 if (nd->nd_flag & ND_NFSV4) in nfsrvd_getcache() 342 else if (nd->nd_flag & ND_NFSV3) in nfsrvd_getcache() 346 newrp->rc_xid = nd->nd_retxid; in nfsrvd_getcache() 347 newrp->rc_proc = nd->nd_procnum; in nfsrvd_getcache() 348 newrp->rc_sockref = nd->nd_sockref; in nfsrvd_getcache() 349 newrp->rc_cachetime = nd->nd_tcpconntime; in nfsrvd_getcache() [all …]
|
| HD | nfs_fha_new.c | 133 struct nfsrv_descript lnd, *nd; in fhanew_get_fh() local 141 nd = &lnd; in fhanew_get_fh() 143 nd->nd_md = *md; in fhanew_get_fh() 144 nd->nd_dpos = *dpos; in fhanew_get_fh() 165 *md = nd->nd_md; in fhanew_get_fh() 166 *dpos = nd->nd_dpos; in fhanew_get_fh() 193 struct nfsrv_descript lnd, *nd; in fhanew_get_offset() local 199 nd = &lnd; in fhanew_get_offset() 200 nd->nd_md = *md; in fhanew_get_offset() 201 nd->nd_dpos = *dpos; in fhanew_get_offset() [all …]
|
| HD | nfs_nfsdstate.c | 117 static int nfsrv_checkgrace(struct nfsrv_descript *nd, struct nfsclient *clp, 122 static int nfsrv_cbcallargs(struct nfsrv_descript *nd, struct nfsclient *clp, 134 static int nfsrv_notsamecredname(struct nfsrv_descript *nd, 138 static int nfsrv_checkseqid(struct nfsrv_descript *nd, u_int32_t seqid, 156 static int nfsv4_setcbsequence(struct nfsrv_descript *nd, struct nfsclient *clp, 167 nfsrv_setclient(struct nfsrv_descript *nd, struct nfsclient **new_clpp, in nfsrv_setclient() argument 186 ((nd->nd_flag & ND_GSS) != 0 && nfsrv_nogsscallback != 0)) in nfsrv_setclient() 228 if ((nd->nd_flag & ND_NFSV41) != 0 && confirmp->lval[1] != 0) { in nfsrv_setclient() 254 if ((nd->nd_flag & ND_NFSV41) != 0) in nfsrv_setclient() 291 if (nfsrv_notsamecredname(nd, clp)) { in nfsrv_setclient() [all …]
|
| /NextBSD/sys/fs/nfsclient/ |
| HD | nfs_clkrpc.c | 66 struct nfsrv_descript nd; in nfscb_program() local 69 memset(&nd, 0, sizeof(nd)); in nfscb_program() 76 nd.nd_procnum = rqst->rq_proc; in nfscb_program() 77 nd.nd_flag = (ND_NFSCB | ND_NFSV4); in nfscb_program() 84 nd.nd_mrep = rqst->rq_args; in nfscb_program() 86 newnfs_realign(&nd.nd_mrep, M_WAITOK); in nfscb_program() 87 nd.nd_md = nd.nd_mrep; in nfscb_program() 88 nd.nd_dpos = mtod(nd.nd_md, caddr_t); in nfscb_program() 89 nd.nd_nam = svc_getrpccaller(rqst); in nfscb_program() 90 nd.nd_nam2 = rqst->rq_addr; in nfscb_program() [all …]
|
| HD | nfs_clrpcops.c | 138 struct nfsrv_descript nfsd, *nd = &nfsd; in nfsrpc_null() local 140 NFSCL_REQSTART(nd, NFSPROC_NULL, vp); in nfsrpc_null() 141 error = nfscl_request(nd, vp, p, cred, NULL); in nfsrpc_null() 142 if (nd->nd_repstat && !error) in nfsrpc_null() 143 error = nd->nd_repstat; in nfsrpc_null() 144 mbuf_freem(nd->nd_mrep); in nfsrpc_null() 204 struct nfsrv_descript nfsd, *nd = &nfsd; in nfsrpc_accessrpc() local 209 NFSCL_REQSTART(nd, NFSPROC_ACCESS, vp); in nfsrpc_accessrpc() 212 if (nd->nd_flag & ND_NFSV4) { in nfsrpc_accessrpc() 219 (void) nfsrv_putattrbit(nd, &attrbits); in nfsrpc_accessrpc() [all …]
|
| HD | nfs_clcomsubs.c | 131 nfscl_reqstart(struct nfsrv_descript *nd, int procnum, struct nfsmount *nmp, in nfscl_reqstart() argument 142 nd->nd_slotseq = NULL; in nfscl_reqstart() 144 nd->nd_flag = ND_NFSV4 | ND_NFSCL; in nfscl_reqstart() 146 nd->nd_flag |= ND_NFSV41; in nfscl_reqstart() 148 nd->nd_flag = ND_NFSV3 | ND_NFSCL; in nfscl_reqstart() 150 nd->nd_flag = ND_NFSV2 | ND_NFSCL; in nfscl_reqstart() 151 nd->nd_procnum = procnum; in nfscl_reqstart() 152 nd->nd_repstat = 0; in nfscl_reqstart() 162 nd->nd_mreq = nd->nd_mb = mb; in nfscl_reqstart() 163 nd->nd_bpos = NFSMTOD(mb, caddr_t); in nfscl_reqstart() [all …]
|
| /NextBSD/sys/fs/nfs/ |
| HD | nfsm_subs.h | 60 nfsm_build(struct nfsrv_descript *nd, int siz) in nfsm_build() argument 65 if (siz > M_TRAILINGSPACE(nd->nd_mb)) { in nfsm_build() 70 nd->nd_bpos = NFSMTOD(mb2, caddr_t); in nfsm_build() 71 nd->nd_mb->m_next = mb2; in nfsm_build() 72 nd->nd_mb = mb2; in nfsm_build() 74 retp = (void *)(nd->nd_bpos); in nfsm_build() 75 nd->nd_mb->m_len += siz; in nfsm_build() 76 nd->nd_bpos += siz; in nfsm_build() 80 #define NFSM_BUILD(a, c, s) ((a) = (c)nfsm_build(nd, (s))) 83 nfsm_dissect(struct nfsrv_descript *nd, int siz) in nfsm_dissect() argument [all …]
|
| HD | nfs_commonkrpc.c | 473 newnfs_request(struct nfsrv_descript *nd, struct nfsmount *nmp, in newnfs_request() argument 499 m_freem(nd->nd_mreq); in newnfs_request() 533 if (nd->nd_procnum != NFSPROC_NULL) { in newnfs_request() 542 nd->nd_procnum != NFSPROC_NULL) { in newnfs_request() 544 nd->nd_flag |= ND_USEGSSNAME; in newnfs_request() 545 if ((nd->nd_flag & ND_USEGSSNAME) != 0) { in newnfs_request() 584 nd->nd_procnum != NFSPROC_NULL && in newnfs_request() 585 (nd->nd_flag & ND_USEGSSNAME) != 0) { in newnfs_request() 607 if (nd->nd_procnum == NFSPROC_NULL) in newnfs_request() 626 m_freem(nd->nd_mreq); in newnfs_request() [all …]
|
| HD | nfs_commonsubs.c | 181 static int nfsrv_skipace(struct nfsrv_descript *nd, int *acesizep); 197 nfsm_mbufuio(struct nfsrv_descript *nd, struct uio *uiop, int siz) in nfsm_mbufuio() argument 205 mp = nd->nd_md; in nfsm_mbufuio() 206 mbufcp = nd->nd_dpos; in nfsm_mbufuio() 260 nd->nd_dpos = mbufcp; in nfsm_mbufuio() 261 nd->nd_md = mp; in nfsm_mbufuio() 264 error = nfsm_advance(nd, rem, len); in nfsm_mbufuio() 266 nd->nd_dpos += rem; in nfsm_mbufuio() 270 NFSEXITCODE2(error, nd); in nfsm_mbufuio() 282 nfsm_dissct(struct nfsrv_descript *nd, int siz, int how) in nfsm_dissct() argument [all …]
|
| /NextBSD/contrib/ipfilter/ |
| HD | mln_ipl.c | 176 struct nameidata nd; in ipf_remove() local 183 NDINIT(&nd, DELETE, LOCKPARENT|LOCKLEAF, UIO_SYSSPACE, in ipf_remove() 186 NDINIT(&nd, DELETE, LOCKPARENT|LOCKLEAF, UIO_SYSSPACE, in ipf_remove() 190 NDINIT(&nd, DELETE, LOCKPARENT|LOCKLEAF, UIO_SYSSPACE, in ipf_remove() 194 NDINIT(&nd, DELETE, LOCKPARENT, UIO_SYSSPACE, name, curproc); in ipf_remove() 196 if ((error = namei(&nd))) in ipf_remove() 201 VOP_LEASE(nd.ni_dvp, curlwp, curlwp->l_cred, LEASE_WRITE); in ipf_remove() 204 VOP_LEASE(nd.ni_dvp, curlwp, curlwp->l_proc->p_ucred, LEASE_WRITE); in ipf_remove() 207 VOP_LEASE(nd.ni_dvp, curproc, curproc->p_ucred, LEASE_WRITE); in ipf_remove() 210 vn_lock(nd.ni_vp, LK_EXCLUSIVE | LK_RETRY); in ipf_remove() [all …]
|
| HD | mlo_ipl.c | 141 struct nameidata nd; in ipf_remove() local 147 NDINIT(&nd, DELETE, LOCKPARENT | LOCKLEAF, UIO_SYSSPACE, in ipf_remove() 150 NDINIT(&nd, DELETE, LOCKPARENT, UIO_SYSSPACE, name, curproc); in ipf_remove() 152 if ((error = namei(&nd))) in ipf_remove() 154 VOP_LEASE(nd.ni_vp, curproc, curproc->p_ucred, LEASE_WRITE); in ipf_remove() 156 VOP_LOCK(nd.ni_vp, LK_EXCLUSIVE | LK_RETRY, curproc); in ipf_remove() 157 VOP_LEASE(nd.ni_dvp, curproc, curproc->p_ucred, LEASE_WRITE); in ipf_remove() 159 (void)uvm_vnp_uncache(nd.ni_vp); in ipf_remove() 161 VOP_LEASE(nd.ni_dvp, curproc, curproc->p_ucred, LEASE_WRITE); in ipf_remove() 162 VOP_LEASE(nd.ni_vp, curproc, curproc->p_ucred, LEASE_WRITE); in ipf_remove() [all …]
|
| HD | mlf_ipl.c | 265 struct nameidata nd; in if_ipf_remove() local 269 NDINIT(&nd, DELETE, LOCKPARENT, UIO_SYSSPACE, name, curproc); in if_ipf_remove() 270 if ((error = namei(&nd))) in if_ipf_remove() 272 VOP_LEASE(nd.ni_vp, curproc, curproc->p_ucred, LEASE_WRITE); in if_ipf_remove() 274 VOP_LOCK(nd.ni_vp, LK_RETRY | LK_EXCLUSIVE, curproc); in if_ipf_remove() 275 VOP_LEASE(nd.ni_dvp, curproc, curproc->p_ucred, LEASE_WRITE); in if_ipf_remove() 276 (void) VOP_REMOVE(nd.ni_dvp, nd.ni_vp, &nd.ni_cnd); in if_ipf_remove() 278 if (nd.ni_dvp == nd.ni_vp) in if_ipf_remove() 279 vrele(nd.ni_dvp); in if_ipf_remove() 281 vput(nd.ni_dvp); in if_ipf_remove() [all …]
|
| /NextBSD/sys/kern/ |
| HD | vfs_extattr.c | 69 struct nameidata nd; local 91 NDINIT(&nd, LOOKUP, FOLLOW | AUDITVNODE2, 93 error = namei(&nd); 96 filename_vp = nd.ni_vp; 97 NDFREE(&nd, NDF_NO_VP_RELE); 101 NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF | AUDITVNODE1, 103 error = namei(&nd); 106 mp = nd.ni_vp->v_mount; 109 NDFREE(&nd, 0); 113 VOP_UNLOCK(nd.ni_vp, 0); [all …]
|
| HD | vfs_syscalls.c | 177 struct nameidata nd; local 184 NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF | AUDITVNODE1, UIO_USERSPACE, 186 if ((error = namei(&nd)) != 0) 188 NDFREE(&nd, NDF_ONLY_PNBUF); 189 mp = nd.ni_vp->v_mount; 191 vput(nd.ni_vp); 287 struct nameidata nd; in kern_statfs() local 290 NDINIT(&nd, LOOKUP, FOLLOW | LOCKSHARED | LOCKLEAF | AUDITVNODE1, in kern_statfs() 292 error = namei(&nd); in kern_statfs() 295 mp = nd.ni_vp->v_mount; in kern_statfs() [all …]
|
| HD | vfs_acl.c | 333 struct nameidata nd; in sys___acl_get_file() local 336 NDINIT(&nd, LOOKUP, FOLLOW, UIO_USERSPACE, uap->path, td); in sys___acl_get_file() 337 error = namei(&nd); in sys___acl_get_file() 339 error = vacl_get_acl(td, nd.ni_vp, uap->type, uap->aclp); in sys___acl_get_file() 340 NDFREE(&nd, 0); in sys___acl_get_file() 351 struct nameidata nd; in sys___acl_get_link() local 354 NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_USERSPACE, uap->path, td); in sys___acl_get_link() 355 error = namei(&nd); in sys___acl_get_link() 357 error = vacl_get_acl(td, nd.ni_vp, uap->type, uap->aclp); in sys___acl_get_link() 358 NDFREE(&nd, 0); in sys___acl_get_link() [all …]
|
| /NextBSD/sys/nfs/ |
| HD | nfs_diskless.c | 99 nfs_parse_options(const char *envopts, struct nfs_args *nd) in nfs_parse_options() argument 110 nd->flags |= NFSMNT_SOFT; in nfs_parse_options() 112 nd->flags |= NFSMNT_INT; in nfs_parse_options() 114 nd->flags |= NFSMNT_NOCONN; in nfs_parse_options() 116 nd->flags |= NFSMNT_NOLOCKD; in nfs_parse_options() 118 nd->flags |= NFSMNT_NOCTO; in nfs_parse_options() 120 nd->flags &= ~(NFSMNT_NFSV3 | NFSMNT_NFSV4); in nfs_parse_options() 122 nd->flags &= ~NFSMNT_NFSV4; in nfs_parse_options() 123 nd->flags |= NFSMNT_NFSV3; in nfs_parse_options() 125 nd->sotype = SOCK_STREAM; in nfs_parse_options() [all …]
|
| /NextBSD/sbin/ifconfig/ |
| HD | af_nd6.c | 73 struct in6_ndireq nd; in setnd6flags() local 76 memset(&nd, 0, sizeof(nd)); in setnd6flags() 77 strncpy(nd.ifname, ifr.ifr_name, sizeof(nd.ifname)); in setnd6flags() 78 error = ioctl(s, SIOCGIFINFO_IN6, &nd); in setnd6flags() 84 nd.ndi.flags &= ~(-d); in setnd6flags() 86 nd.ndi.flags |= d; in setnd6flags() 87 error = ioctl(s, SIOCSIFINFO_IN6, (caddr_t)&nd); in setnd6flags() 143 struct in6_ndireq nd; in nd6_status() local 148 memset(&nd, 0, sizeof(nd)); in nd6_status() 149 strncpy(nd.ifname, ifr.ifr_name, sizeof(nd.ifname)); in nd6_status() [all …]
|
| /NextBSD/lib/libcalendar/ |
| HD | calendar.c | 199 int nd; /* Number of days--return value */ in ndaysgi() local 218 if ((nd = ndaysji(idt)) == -1) in ndaysgi() 221 nd = (nd - 10 - (idt->y - 1600) / 100 + (idt->y - 1600) / 400); in ndaysgi() 222 else if (nd > nswitch) in ndaysgi() 223 nd -= 10; in ndaysgi() 224 return (nd); in ndaysgi() 236 week(int nd, int *y) in week() argument 241 gdate(nd, &dt); in week() 242 for (*y = dt.y + 1; nd < (fw = firstweek(*y)); (*y)--) in week() 244 return ((nd - fw) / 7 + 1); in week() [all …]
|
| /NextBSD/bin/ed/ |
| HD | re.c | 84 char *nd; in extract_pattern() local 87 for (nd = ibufp; *nd != delimiter && *nd != '\n'; nd++) in extract_pattern() 88 switch (*nd) { in extract_pattern() 92 if ((nd = parse_char_class(nd + 1)) == NULL) { in extract_pattern() 98 if (*++nd == '\n') { in extract_pattern() 104 len = nd - ibufp; in extract_pattern() 108 ibufp = nd; in extract_pattern()
|
| /NextBSD/contrib/netbsd-tests/lib/libppath/ |
| HD | t_ppath.c | 433 prop_object_t nd = NULL, ond; in ATF_TC_BODY() local 482 rc = ppath_copyset_bool(d, &nd, p, false); in ATF_TC_BODY() 485 rc = ppath_get_object(nd, p3, &r); in ATF_TC_BODY() 488 ond = nd; in ATF_TC_BODY() 490 rc = ppath_copyset_string(d, &nd, p2, "Martha Doe"); in ATF_TC_BODY() 493 ATF_CHECK_EQ(nd, ond); in ATF_TC_BODY() 495 rc = ppath_get_object(nd, p3, &or); in ATF_TC_BODY() 501 rc = ppath_get_bool(nd, p, &v); in ATF_TC_BODY() 506 rc = ppath_get_string(nd, p2, &s); in ATF_TC_BODY() 519 if (dictionary_equals(od, nd)) { in ATF_TC_BODY() [all …]
|