4 * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
5 * Copyright (c) 1996,1999 by Internet Software Consortium.
7 * Permission to use, copy, modify, and distribute this software for any
8 * purpose with or without fee is hereby granted, provided that the above
9 * copyright notice and this permission notice appear in all copies.
11 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
12 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
14 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
17 * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20 #if defined(LIBC_SCCS) && !defined(lint)
21 static const char rcsid
[] = "Id: nul_ng.c,v 1.3 2005/04/27 04:56:34 sra Exp";
26 * nul_ng.c - the netgroup accessor null map
29 #include "port_before.h"
31 #include <sys/types.h>
32 #include <netinet/in.h>
33 #include <arpa/nameser.h>
44 #include <isc/memcluster.h>
46 #include "port_after.h"
54 static void ng_close(struct irs_ng
*);
55 static int ng_next(struct irs_ng
*, const char **,
56 const char **, const char **);
57 static int ng_test(struct irs_ng
*,
58 const char *, const char *,
59 const char *, const char *);
60 static void ng_rewind(struct irs_ng
*, const char *);
61 static void ng_minimize(struct irs_ng
*);
66 irs_nul_ng(struct irs_acc
*this) {
71 if (!(ng
= memget(sizeof *ng
))) {
75 memset(ng
, 0x5e, sizeof *ng
);
80 ng
->rewind
= ng_rewind
;
81 ng
->minimize
= ng_minimize
;
88 ng_close(struct irs_ng
*this) {
89 memput(this, sizeof *this);
94 ng_next(struct irs_ng
*this, const char **host
, const char **user
,
106 ng_test(struct irs_ng
*this, const char *name
,
107 const char *user
, const char *host
, const char *domain
)
119 ng_rewind(struct irs_ng
*this, const char *netgroup
) {
126 ng_minimize(struct irs_ng
*this) {