2 * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
3 * Copyright (c) 1996,1999 by Internet Software Consortium.
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
9 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
15 * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18 #if defined(LIBC_SCCS) && !defined(lint)
19 static const char rcsid[] = "$Id: nul_ng.c,v 1.1.206.1 2004/03/09 08:33:39 marka Exp $";
23 * nul_ng.c - the netgroup accessor null map
26 #include "port_before.h"
28 #include <sys/types.h>
29 #include <netinet/in.h>
30 #include <arpa/nameser.h>
41 #include <isc/memcluster.h>
43 #include "port_after.h"
51 static void ng_close(struct irs_ng *);
52 static int ng_next(struct irs_ng *, const char **,
53 const char **, const char **);
54 static int ng_test(struct irs_ng *,
55 const char *, const char *,
56 const char *, const char *);
57 static void ng_rewind(struct irs_ng *, const char *);
58 static void ng_minimize(struct irs_ng *);
63 irs_nul_ng(struct irs_acc *this) {
68 if (!(ng = memget(sizeof *ng))) {
72 memset(ng, 0x5e, sizeof *ng);
77 ng->rewind = ng_rewind;
78 ng->minimize = ng_minimize;
85 ng_close(struct irs_ng *this) {
86 memput(this, sizeof *this);
91 ng_next(struct irs_ng *this, const char **host, const char **user,
103 ng_test(struct irs_ng *this, const char *name,
104 const char *user, const char *host, const char *domain)
116 ng_rewind(struct irs_ng *this, const char *netgroup) {
123 ng_minimize(struct irs_ng *this) {