db0dddc6e9
and "pwauth.h" only when compiled without PAM support. * src/chfn.c, src/chsh.c: Do not include <shadow.h> * lib/commonio.c: Do not include <shadow.h>. Do not include <pwd.h>. Include "nscd.h" instead of <nscd.h>. * configure.in: Do not check if shadow.h exist, but make sure it exists. * libmisc/pwdcheck.c, src/chfn.c, src/chsh.c, lib/defines.h, lib/shadowmem.c, lib/shadowio.c, lib/commonio.c: HAVE_SHADOW_H is no more needed (shadow.h should always exist).
26 lines
434 B
C
26 lines
434 B
C
|
|
#include <config.h>
|
|
|
|
#ident "$Id$"
|
|
|
|
#include "prototypes.h"
|
|
#include "defines.h"
|
|
#include <shadow.h>
|
|
#include <stdio.h>
|
|
#include "shadowio.h"
|
|
|
|
struct spwd *__spw_dup (const struct spwd *spent)
|
|
{
|
|
struct spwd *sp;
|
|
|
|
if (!(sp = (struct spwd *) malloc (sizeof *sp)))
|
|
return NULL;
|
|
*sp = *spent;
|
|
if (!(sp->sp_namp = strdup (spent->sp_namp)))
|
|
return NULL;
|
|
if (!(sp->sp_pwdp = strdup (spent->sp_pwdp)))
|
|
return NULL;
|
|
return sp;
|
|
}
|
|
|