* NEWS, src/login.c: Do not log in utmp / utmpx / wtmp when PAM is

enabled. This is already done by pam_lastlog.
This commit is contained in:
nekral-guest
2011-07-23 11:03:50 +00:00
parent 7e8aa5429a
commit 2aefca0f2e
3 changed files with 13 additions and 0 deletions

View File

@@ -126,10 +126,12 @@ static void usage (void);
static void setup_tty (void);
static void process_flags (int argc, char *const *argv);
static /*@observer@*/const char *get_failent_user (/*@returned@*/const char *user);
#ifndef USE_PAM
static void update_utmp (const char *user,
const char *tty,
const char *host,
/*@null@*/const struct utmp *utent);
#endif /* ! USE_PAM */
#ifndef USE_PAM
static struct faillog faillog;
@@ -471,6 +473,7 @@ static /*@observer@*/const char *get_failent_user (/*@returned@*/const char *use
return failent_user;
}
#ifndef USE_PAM
/*
* update_utmp - Update or create an utmp entry in utmp, wtmp, utmpw, and
* wtmpx
@@ -496,6 +499,7 @@ static void update_utmp (const char *user,
free (utx);
#endif /* USE_UTMPX */
}
#endif /* ! USE_PAM */
/*
* login - create a new login session for a user
@@ -1208,11 +1212,13 @@ int main (int argc, char **argv)
}
}
#ifndef USE_PAM
/*
* The utmp entry needs to be updated to indicate the new status
* of the session, the new PID and SID.
*/
update_utmp (username, tty, hostname, utent);
#endif /* ! USE_PAM */
/* The pwd and spwd entries for the user have been copied.
*