From f92940aef28c98145ecddeff05b4aa4be7a6c5e5 Mon Sep 17 00:00:00 2001 From: Thorsten Kukuk Date: Wed, 14 Apr 2010 10:22:10 +0000 Subject: Relevant BUGIDs: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Purpose of commit: bugfix Commit summary: --------------- 2010-04-13 Thorsten Kukuk * modules/pam_pwhistory/opasswd.c: Fix compilation if cyprt_r() is not available. * configure.in: check for getutent_r. * modules/pam_timestamp/pam_timestamp.c: Use getutent() if getutent_r() does not exist. Patch from Diego Elio "Flameeyes" Pettenò. --- modules/pam_timestamp/pam_timestamp.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'modules/pam_timestamp/pam_timestamp.c') diff --git a/modules/pam_timestamp/pam_timestamp.c b/modules/pam_timestamp/pam_timestamp.c index 7e6c4b0b..26876769 100644 --- a/modules/pam_timestamp/pam_timestamp.c +++ b/modules/pam_timestamp/pam_timestamp.c @@ -200,7 +200,13 @@ check_login_time(const char *ruser, time_t timestamp) time_t oldest_login = 0; setutent(); - while(!getutent_r(&utbuf, &ut)) { + while( +#ifdef HAVE_GETUTENT_R + !getutent_r(&utbuf, &ut) +#else + (ut = getutent()) != NULL +#endif + ) { if (ut->ut_type != USER_PROCESS) { continue; } -- cgit v1.2.3