(do_login): conditionalize shadow stuff on getspnam

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7320 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1999-11-05 08:14:56 +00:00
parent 18533fbb68
commit 7a36ab6daf

View File

@@ -431,7 +431,7 @@ checknologin(void)
static void
do_login(const struct passwd *pwd, char *tty, char *ttyn)
{
#ifdef HAVE_SHADOW_H
#ifdef HAVE_GETSPNAM
struct spwd *sp;
#endif
int rootlogin = (pwd->pw_uid == 0);
@@ -442,7 +442,7 @@ do_login(const struct passwd *pwd, char *tty, char *ttyn)
if(!rootlogin)
checknologin();
#ifdef HAVE_SHADOW_H
#ifdef HAVE_GETSPNAM
sp = getspnam(pwd->pw_name);
#endif
@@ -493,7 +493,7 @@ do_login(const struct passwd *pwd, char *tty, char *ttyn)
}
/* all kinds of different magic */
#ifdef HAVE_SHADOW_H
#ifdef HAVE_GETSPNAM
check_shadow(pwd, sp);
#endif