Home | History | Annotate | Download | only in gen

Lines Matching defs:ng

147 	struct netgroup *ng;
152 ng = malloc(sizeof(struct netgroup));
153 if (ng == NULL)
157 if (!getstring(pp, ',', &ng->ng_host))
160 if (!getstring(pp, ',', &ng->ng_user))
163 if (!getstring(pp, ')', &ng->ng_domain))
169 _ng_print(buf, sizeof(buf), ng);
173 return ng;
176 if (ng->ng_user)
177 free(ng->ng_user);
179 if (ng->ng_host)
180 free(ng->ng_host);
182 free(ng);
351 * returned in ng _NG_NAME: line had a netgroup name, returned in name
356 _ng_parse(char **p, char **name, struct netgroup **ng)
362 _DIAGASSERT(ng != NULL);
374 if ((*ng = getnetgroup(p)) == NULL)
408 struct netgroup *ng;
439 switch (_ng_parse(&p, &name, &ng)) {
448 ng->ng_next = _nglist;
449 _nglist = ng;
473 struct netgroup *ng)
479 _DIAGASSERT(ng != NULL);
481 if ((host != NULL) && (ng->ng_host != NULL)
482 && strcmp(ng->ng_host, host) != 0)
485 if ((user != NULL) && (ng->ng_user != NULL)
486 && strcmp(ng->ng_user, user) != 0)
489 if ((domain != NULL) && (ng->ng_domain != NULL)
490 && strcmp(ng->ng_domain, domain) != 0)
508 struct netgroup *ng;
542 switch (_ng_parse(&p, &name, &ng)) {
550 i = in_check(host, user, domain, ng);
551 if (ng->ng_host != NULL)
552 free(ng->ng_host);
553 if (ng->ng_user != NULL)
554 free(ng->ng_user);
555 if (ng->ng_domain != NULL)
556 free(ng->ng_domain);
557 free(ng);
602 _ng_print(char *buf, size_t len, const struct netgroup *ng)
605 _DIAGASSERT(ng != NULL);
607 (void)snprintf(buf, len, "(%s,%s,%s)", _NG_EMPTY(ng->ng_host),
608 _NG_EMPTY(ng->ng_user), _NG_EMPTY(ng->ng_domain));
709 const char *ng = va_arg(ap, const char *);
713 _DIAGASSERT(ng != NULL);
726 ng_copy = strdup(ng);
889 setnetgrent(const char *ng)
898 __nsdefaultnis, ng);
913 setnetgrent(const char *ng)
915 (void) _local_setnetgrentv(NULL, NULL,ng);