1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
--- Linux-PAM-1.1.8.orig/modules/pam_succeed_if/pam_succeed_if.c 2013-06-18 16:11:21.000000000 +0200
+++ Linux-PAM-1.1.8/modules/pam_succeed_if/pam_succeed_if.c 2014-05-24 10:49:28.000000000 +0200
@@ -233,16 +233,20 @@ evaluate_notingroup(pam_handle_t *pamh,
static int
evaluate_innetgr(const char *host, const char *user, const char *group)
{
+#ifdef HAVE_INNETGR
if (innetgr(group, host, user, NULL) == 1)
return PAM_SUCCESS;
+#endif
return PAM_AUTH_ERR;
}
/* Return PAM_SUCCESS if the (host,user) is NOT in the netgroup. */
static int
evaluate_notinnetgr(const char *host, const char *user, const char *group)
{
+#ifdef HAVE_INNETGR
if (innetgr(group, host, user, NULL) == 0)
return PAM_SUCCESS;
+#endif
return PAM_AUTH_ERR;
}
|