* 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:
nekral-guest
2012-05-18 17:57:52 +00:00
parent f741583f1a
commit f243d4077d
4 changed files with 19 additions and 7 deletions

View File

@@ -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;
}