Lines Matching refs:nd
555 nfs_rephead(int siz, struct nfsrv_descript *nd, struct nfssvc_sock *slp, int err, int cache, u_quad_t *frev, struct mbuf **mrq, struct mbuf **mbp, char **bposp)
577 *tl++ = txdr_unsigned(nd->nd_retxid);
598 if (nd->nd_flag & ND_KERBFULL) {
605 NUIDHASH(slp, kauth_cred_geteuid(nd->nd_cr)),
608 kauth_cred_geteuid(nd->nd_cr) &&
609 (!nd->nd_nam2 || netaddr_match(
611 nd->nd_nam2)))
667 *tl = txdr_unsigned(nfsrv_errmap(nd, err));
1005 nfs_getreq(struct nfsrv_descript *nd, struct nfsd *nfsd, int has_header)
1022 KASSERT(nd->nd_cr == NULL);
1023 mrep = nd->nd_mrep;
1024 md = nd->nd_md;
1025 dpos = nd->nd_dpos;
1028 nd->nd_retxid = fxdr_unsigned(u_int32_t, *tl++);
1035 nd->nd_repstat = 0;
1036 nd->nd_flag = 0;
1038 nd->nd_repstat = ERPCMISMATCH;
1039 nd->nd_procnum = NFSPROC_NOOP;
1043 nd->nd_repstat = EPROGUNAVAIL;
1044 nd->nd_procnum = NFSPROC_NOOP;
1050 nd->nd_repstat = EPROGMISMATCH;
1051 nd->nd_procnum = NFSPROC_NOOP;
1055 nd->nd_flag = ND_NFSV3;
1056 nd->nd_procnum = fxdr_unsigned(u_int32_t, *tl++);
1057 if (nd->nd_procnum == NFSPROC_NULL)
1059 if (nd->nd_procnum > NFSPROC_COMMIT ||
1060 (!nd->nd_flag && nd->nd_procnum > NFSV2PROC_STATFS)) {
1061 nd->nd_repstat = EPROCUNAVAIL;
1062 nd->nd_procnum = NFSPROC_NOOP;
1065 if ((nd->nd_flag & ND_NFSV3) == 0)
1066 nd->nd_procnum = nfsv3_procid[nd->nd_procnum];
1074 nd->nd_flag &= ~ND_KERBAUTH;
1082 nd->nd_cr = kauth_cred_alloc();
1094 kauth_cred_setuid(nd->nd_cr, uid);
1095 kauth_cred_seteuid(nd->nd_cr, uid);
1096 kauth_cred_setsvuid(nd->nd_cr, uid);
1097 kauth_cred_setgid(nd->nd_cr, gid);
1098 kauth_cred_setegid(nd->nd_cr, gid);
1099 kauth_cred_setsvgid(nd->nd_cr, gid);
1119 kauth_cred_setgroups(nd->nd_cr, grbuf,
1155 nd->nd_repstat = (NFSERR_AUTHERR|AUTH_BADVERF);
1156 nd->nd_procnum = NFSPROC_NOOP;
1163 nd->nd_repstat = (NFSERR_AUTHERR|AUTH_BADVERF);
1164 nd->nd_procnum = NFSPROC_NOOP;
1170 nd->nd_flag |= ND_KERBFULL;
1176 nd->nd_repstat = (NFSERR_AUTHERR|AUTH_BADCRED);
1177 nd->nd_procnum = NFSPROC_NOOP;
1185 nd->nd_repstat = (NFSERR_AUTHERR|AUTH_BADVERF);
1186 nd->nd_procnum = NFSPROC_NOOP;
1196 (!nd->nd_nam2 ||
1198 &nuidp->nu_haddr, nd->nd_nam2)))
1202 nd->nd_repstat =
1204 nd->nd_procnum = NFSPROC_NOOP;
1225 nd->nd_repstat =
1227 nd->nd_procnum = NFSPROC_NOOP;
1231 nd->nd_cr = nuidp->nu_cr;
1232 nd->nd_flag |= ND_KERBNICK;
1235 nd->nd_repstat = (NFSERR_AUTHERR | AUTH_REJECTCRED);
1236 nd->nd_procnum = NFSPROC_NOOP;
1240 nd->nd_md = md;
1241 nd->nd_dpos = dpos;
1242 KASSERT((nd->nd_cr == NULL) ==
1248 if (nd->nd_cr != NULL) {
1249 kauth_cred_free(nd->nd_cr);
1250 nd->nd_cr = NULL;
1291 struct nfsrv_descript *nd;
1293 nd = pool_get(&nfs_srvdesc_pool, PR_WAITOK);
1294 nd->nd_cr = NULL;
1295 return nd;
1299 nfsdreq_free(struct nfsrv_descript *nd)
1303 cr = nd->nd_cr;
1307 pool_put(&nfs_srvdesc_pool, nd);