* NEWS, src/login.c: Log in utmp / utmpx / wtmp also when PAM is
enabled. This is not done by pam_lastlog. This was broken on 2011-07-23. * NEWS, libmisc/utmp.c: Do not log in wtmp when PAM is enabled. This is done by pam_lastlog.
This commit is contained in:
@@ -129,6 +129,7 @@ static bool is_my_tty (const char *tty)
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifndef USE_PAM
|
||||
/*
|
||||
* Some systems already have updwtmp() and possibly updwtmpx(). Others
|
||||
* don't, so we re-implement these functions if necessary.
|
||||
@@ -160,6 +161,7 @@ static void updwtmpx (const char *filename, const struct utmpx *utx)
|
||||
}
|
||||
#endif /* ! HAVE_UPDWTMPX */
|
||||
#endif /* ! USE_UTMPX */
|
||||
#endif /* ! USE_PAM */
|
||||
|
||||
|
||||
/*
|
||||
@@ -313,7 +315,10 @@ int setutmp (struct utmp *ut)
|
||||
}
|
||||
endutent ();
|
||||
|
||||
#ifndef USE_PAM
|
||||
/* This is done by pam_lastlog */
|
||||
updwtmp (_WTMP_FILE, ut);
|
||||
#endif /* ! USE_PAM */
|
||||
|
||||
return err;
|
||||
}
|
||||
@@ -446,7 +451,10 @@ int setutmpx (struct utmpx *utx)
|
||||
}
|
||||
endutxent ();
|
||||
|
||||
#ifndef USE_PAM
|
||||
/* This is done by pam_lastlog */
|
||||
updwtmpx (_WTMP_FILE "x", utx);
|
||||
#endif /* ! USE_PAM */
|
||||
|
||||
return err;
|
||||
}
|
||||
|
Reference in New Issue
Block a user