getpwent.c revision 9525b14bcdeb5b5f6f95ab27c2f48f18bd2ec829
/*
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1996,1999 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 ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC 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.
*/
#if !defined(LINT) && !defined(CODECENTER)
static const char rcsid[] = "$Id: getpwent.c,v 1.3 2005/04/27 04:56:26 sra Exp $";
#endif
/* Imports */
#include "port_before.h"
#if !defined(WANT_IRS_PW) || defined(__BIND_NOSTATIC)
static int __bind_irs_pw_unneeded;
#else
#include <errno.h>
#include <pwd.h>
#include <resolv.h>
#include <stdio.h>
#include <string.h>
#include <irs.h>
#include "port_after.h"
#include "irs_data.h"
/* Forward */
/* Public */
struct passwd *
getpwent(void) {
return (getpwent_p(net_data));
}
struct passwd *
}
struct passwd *
}
int
setpassent(int stayopen) {
}
#ifdef SETPWENT_VOID
void
setpwent() {
}
#else
int
setpwent() {
return (setpwent_p(net_data));
}
#endif
void
endpwent() {
}
/* Shared private. */
struct passwd *
return (NULL);
}
struct passwd *
return (NULL);
if (!net_data->pw_stayopen)
endpwent();
}
struct passwd *
return (NULL);
if (!net_data->pw_stayopen)
endpwent();
}
int
return (0);
if (stayopen == 0)
return (1);
}
#ifdef SETPWENT_VOID
void
(void) setpassent_p(0, net_data);
}
#else
int
return (setpassent_p(0, net_data));
}
#endif
void
}
/* Private */
static struct net_data *
init() {
goto error;
return (NULL);
}
}
return (net_data);
}
#endif /* WANT_IRS_PW */
/*! \file */