nis_pw.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.
*/
#endif /* LIBC_SCCS and not lint */
/* Imports */
#include "port_before.h"
#if !defined(WANT_IRS_PW) || !defined(WANT_IRS_NIS)
static int __bind_irs_pw_unneeded;
#else
#include <resolv.h>
#include <isc/memcluster.h>
#include <errno.h>
#include <fcntl.h>
#include <pwd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <isc/memcluster.h>
#include <irs.h>
#include "port_after.h"
#include "irs_p.h"
#include "nis_p.h"
/* Definitions */
struct pvt {
int needrewind;
char * nis_domain;
char * curkey_data;
int curkey_len;
char * curval_data;
int curval_len;
char * pwbuf;
};
/* Forward */
static void pw_minimize(struct irs_pw *);
/* Public */
struct irs_pw *
return (NULL);
}
return (NULL);
}
return (pw);
}
/* Methods */
static void
}
static struct passwd *
int r;
do {
if (pvt->needrewind) {
pvt->needrewind = 0;
} else {
char *newkey_data;
int newkey_len;
}
if (r != 0) {
return (NULL);
}
return (rval);
}
static struct passwd *
int r;
char *tmp;
if (r != 0) {
return (NULL);
}
return (makepasswdent(this));
}
static struct passwd *
char tmp[sizeof "4294967295"];
int r;
if (r != 0) {
return (NULL);
}
return (makepasswdent(this));
}
static void
}
static void
/* NOOP */
}
/* Private */
static struct passwd *
char *cp;
goto cleanup;
#ifdef HAS_PW_CLASS
#endif
*cp++ = '\0';
goto cleanup;
*cp++ = '\0';
goto cleanup;
*cp++ = '\0';
goto cleanup;
*cp++ = '\0';
goto cleanup;
*cp++ = '\0';
goto cleanup;
*cp++ = '\0';
*cp = '\0';
return (NULL);
}
static void
}
}
}
#endif /* WANT_IRS_PW && WANT_IRS_NIS */
/*! \file */