summaryrefslogtreecommitdiff
path: root/package/pam/patches/patch-modules_pam_succeed_if_pam_succeed_if_c
blob: 93a79ebda5a30e8458020185f663f9313c8a7ad4 (plain)
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	2013-12-21 18:30:19.000000000 +0100
@@ -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;
 }