summaryrefslogtreecommitdiff
path: root/modules/pam_timestamp/pam_timestamp.c
diff options
context:
space:
mode:
authorSteve Langasek <steve.langasek@ubuntu.com>2019-01-03 19:37:21 -0800
committerSteve Langasek <steve.langasek@ubuntu.com>2019-01-03 19:39:33 -0800
commitb70316c593cbc8e5c9155e5c6597497090c6eb88 (patch)
tree389accb2f8d3f4830933235f54059df6d8f51132 /modules/pam_timestamp/pam_timestamp.c
parentaa0448336a79d85579464f023ac87675be60abfc (diff)
parent08e55be772e8dabf62dc21010751a80ed905f750 (diff)
New upstream version 1.1.2
Diffstat (limited to 'modules/pam_timestamp/pam_timestamp.c')
-rw-r--r--modules/pam_timestamp/pam_timestamp.c8
1 files changed, 7 insertions, 1 deletions
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;
}