Lines Matching refs:grp
79 #include <grp.h>
862 struct grouplist *grp;
885 grp = hp->ht_grp;
886 if (grp->gr_type == GT_HOST) {
890 grp->gr_ptr.gt_addrinfo->ai_canonname;
894 } else if (grp->gr_type == GT_NET) {
897 strp = grp->gr_ptr.gt_net.nt_name;
919 struct grouplist *tgrp, char *cp, int *has_host, struct grouplist **grp)
933 (*grp)->gr_next = get_grp();
934 *grp = (*grp)->gr_next;
943 if (get_host(line, lineno, hst, *grp))
945 } else if (get_host(line, lineno, cp, *grp))
1019 struct grouplist *grp, *tgrp;
1058 tgrp = grp = get_grp();
1082 if (do_opt(line, lineno, &cp, &endcp, ep, grp,
1114 tgrp, cp, &has_host, &grp))
1131 grp->gr_type = GT_HOST;
1135 /* add a default group and make the grp list NULL */
1146 grp->gr_ptr.gt_addrinfo = ai;
1161 * grp points to the last entry in the list.
1163 grp = tgrp;
1165 if (do_nfssvc(line, lineno, ep, grp, exflags, &anon,
1168 } while (grp->gr_next && (grp = grp->gr_next));
1175 grp->gr_next = grphead;
1201 free_exp_grp(ep, grp);
1231 struct grouplist *grp, *tgrp;
1248 grp = grphead;
1249 while (grp) {
1250 tgrp = grp;
1251 grp = grp->gr_next;
1345 free_exp_grp(struct exportlist *ep, struct grouplist *grp)
1351 while (grp) {
1352 tgrp = grp;
1353 grp = grp->gr_next;
1403 hang_dirp(struct dirlist *dp, struct grouplist *grp, struct exportlist *ep,
1414 if (grp == NULL) {
1421 while (grp) {
1427 hp->ht_grp = grp;
1430 grp = grp->gr_next;
1439 add_dlist(&ep->ex_dirl, dp, grp, flags);
1450 add_dlist(struct dirlist **dpp, struct dirlist *newdp, struct grouplist *grp,
1461 add_dlist(&dp->dp_left, newdp, grp, flags);
1464 add_dlist(&dp->dp_right, newdp, grp, flags);
1473 if (grp) {
1484 hp->ht_grp = grp;
1487 grp = grp->gr_next;
1488 } while (grp);
1665 struct grouplist *grp;
1673 grp = hp->ht_grp;
1674 switch (grp->gr_type) {
1676 ai = grp->gr_ptr.gt_addrinfo;
1688 &grp->gr_ptr.gt_net.nt_net,
1689 grp->gr_ptr.gt_net.nt_len)) {
1742 struct exportlist *ep, struct grouplist *grp, int *has_hostp,
1795 if (get_net(cpoptarg, &grp->gr_ptr.gt_net, 1)) {
1810 if (grp->gr_type != GT_NULL) {
1815 } else if (get_net(cpoptarg, &grp->gr_ptr.gt_net, 0)) {
1821 grp->gr_type = GT_NET;
1868 struct grouplist *grp)
1874 if (grp->gr_type != GT_NULL) {
1890 grp->gr_type = GT_HOST;
1891 grp->gr_ptr.gt_addrinfo = ai;
2000 struct grouplist *grp, int exflags, struct uucred *anoncrp,
2008 if (grp->gr_type == GT_HOST) {
2009 for (ai = grp->gr_ptr.gt_addrinfo; ai; ai = ai->ai_next) {
2016 } else if (grp->gr_type == GT_NET) {
2017 addrp = (struct sockaddr *)&grp->gr_ptr.gt_net.nt_net;
2022 if (allones(&ss, grp->gr_ptr.gt_net.nt_len) != 0) {
2295 free_grp(struct grouplist *grp)
2298 if (grp->gr_type == GT_HOST) {
2299 if (grp->gr_ptr.gt_addrinfo != NULL)
2300 freeaddrinfo(grp->gr_ptr.gt_addrinfo);
2301 } else if (grp->gr_type == GT_NET) {
2302 if (grp->gr_ptr.gt_net.nt_name)
2303 free(grp->gr_ptr.gt_net.nt_name);
2305 free(grp);