From 835d64947996b7cc96fe187f9b3103db36dddf77 Mon Sep 17 00:00:00 2001 From: Thorsten Kukuk Date: Mon, 4 Apr 2016 11:39:45 +0200 Subject: innetgr may not be there so make sure that when innetgr is not present then we inform about it and not use it. [ticket#46] * modules/pam_group/pam_group.c: ditto * modules/pam_succeed_if/pam_succeed_if.c: ditto * modules/pam_time/pam_time.c: ditto Signed-off-by: Khem Raj Signed-off-by: Yousong Zhou --- modules/pam_time/pam_time.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'modules/pam_time') diff --git a/modules/pam_time/pam_time.c b/modules/pam_time/pam_time.c index 75d08645..b67a4c24 100644 --- a/modules/pam_time/pam_time.c +++ b/modules/pam_time/pam_time.c @@ -555,7 +555,11 @@ check_account(pam_handle_t *pamh, const char *service, } /* If buffer starts with @, we are using netgroups */ if (buffer[0] == '@') +#ifdef HAVE_INNETGR good &= innetgr (&buffer[1], NULL, user, NULL); +#else + pam_syslog (pamh, LOG_ERR, "pam_time does not have netgroup support"); +#endif else good &= logic_field(pamh, user, buffer, count, is_same); D(("with user: %s", good ? "passes":"fails" )); -- cgit v1.2.3