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