/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <string.h>
#include <thread.h>
#include <unistd.h>
#include <stdlib.h>
#include <crypt.h>
#include <pwd.h>
#include <shadow.h>
#include <deflt.h>
#include "passwdutil.h"
NULL,
NULL,
NULL,
NULL,
NULL,
};
void
{
}
void
{
}
int
{
if (s == NULL) {
*d = NULL;
return (PWU_NOT_FOUND);
}
return (PWU_NOMEM);
if (s->pw_name) {
goto no_mem;
}
if (s->pw_passwd) {
goto no_mem;
}
if (s->pw_gecos) {
goto no_mem;
}
if (s->pw_dir) {
goto no_mem;
}
if (s->pw_shell) {
goto no_mem;
}
return (PWU_SUCCESS);
free_pwd(*d);
*d = NULL;
return (PWU_NOMEM);
}
int
{
if (s == NULL) {
*d = NULL;
return (PWU_NOT_FOUND);
}
return (PWU_NOMEM);
**d = *s;
if (s->sp_namp)
goto no_mem;
if (s->sp_pwdp)
goto no_mem;
return (PWU_SUCCESS);
free_spwd(*d);
return (PWU_NOMEM);
}
/*
* read a value from the defaults file, and return it if it is
* a positive integer. If the value is not defined, or negative,
* return the supplied default value
*/
int
{
char *p;
}
void
{
int minweeks;
int maxweeks;
int warnweeks;
void *defp;
} else {
}
/*
* in a specific way. Special cases are
* MINWEEKS==0 (results in sp_min = -1)
* MAXWEEKS==0 (results in sp_max = default)
*/
}
/*
* open and read a value from the defaults file,
* return value found or default value if not found.
*/
int
{
int val;
void *defp;
} else {
}
return (val);
}