irp_ng.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* Copyright 1999-2002 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Copyright (c) 1996, 1998 by Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#if !defined(LINT) && !defined(CODECENTER)
#endif
/* Imports */
#include "port_before.h"
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <syslog.h>
#include <irs.h>
#include <irp.h>
#include <isc/memcluster.h>
#include <isc/irpmarshall.h>
#include "irs_p.h"
#include "irp_p.h"
#include "port_after.h"
/* Definitions */
struct pvt {
int warned;
};
/* Forward */
const char **);
const char *, const char *,
const char *);
static void ng_minimize(struct irs_ng *);
/* Public */
/*
* struct irs_ng * irs_irp_ng(struct irs_acc *this)
*
* Notes:
*
* Intialize the irp netgroup module.
*
*/
struct irs_ng *
return (NULL);
}
return (NULL);
}
return (ng);
}
/* Methods */
/*
* void ng_close(struct irs_ng *this)
*
*/
static void
}
/*
* void ng_rewind(struct irs_ng *this, const char *group)
*
*
*/
static void
char text[256];
int code;
return;
}
"setnetgrent %s", group) != 0) {
return;
}
if (code != IRPD_GETNETGR_SETOK) {
if (irp_log_errors) {
}
}
return;
}
/*
* int ng_next(struct irs_ng *this, const char **host, const char **user,
* const char **domain)
*
* Notes:
*
* Get the next netgroup item from the cache.
*
*/
static int
const char **domain)
{
int code;
int rval = 0;
char text[256];
return (0);
}
return (0);
return (0);
}
if (code == IRPD_GETNETGR_OK) {
rval = 1;
}
}
}
return (rval);
}
/*
* int ng_test(struct irs_ng *this, const char *name, const char *host,
* const char *user, const char *domain)
*
* Notes:
*
* Search for a match in a netgroup.
*
*/
static int
{
int code;
char text[256];
int rval = 0;
return (0);
}
return (0);
}
if (code == IRPD_GETNETGR_MATCHES) {
rval = 1;
}
}
return (rval);
}
/*
* void ng_minimize(struct irs_ng *this)
*
*/
static void
}
/* Private */