#ifdef HAVE_CONFIG_H
#include <config.h>
RCSID("$Id: k_getpwnam.c,v 1.1 1996/05/10 22:16:46 assar Exp $");
#endif /* HAVE_CONFIG_H */

#include "roken.h"
#ifdef HAVE_SHADOW_H
#include <shadow.h>
#endif

struct passwd *
k_getpwnam (char *user)
{
     struct passwd *p;

     p = getpwnam (user);
#ifdef HAVE_GETSPNAM
     if(p)
     {
	  struct spwd *spwd;

	  spwd = getspnam (user);
	  if (spwd)
	       p->pw_passwd = spwd->sp_pwdp;
     }
#endif
     return p;
}
