summaryrefslogtreecommitdiff
path: root/package/pam/patches/patch-modules_pam_group_pam_group_c
blob: bbf25bcfda83a2c3e310ddd52c3d779424aa397d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--- Linux-PAM-1.1.8.orig/modules/pam_group/pam_group.c	2013-06-18 16:11:21.000000000 +0200
+++ Linux-PAM-1.1.8/modules/pam_group/pam_group.c	2013-12-21 18:30:19.000000000 +0100
@@ -655,10 +655,13 @@ static int check_account(pam_handle_t *p
 	    continue;
 	}
 	/* If buffer starts with @, we are using netgroups */
+#ifdef HAVE_INNETGR
 	if (buffer[0] == '@')
 	  good &= innetgr (&buffer[1], NULL, user, NULL);
 	/* otherwise, if the buffer starts with %, it's a UNIX group */
-	else if (buffer[0] == '%')
+	else
+#endif
+	if (buffer[0] == '%')
           good &= pam_modutil_user_in_group_nam_nam(pamh, user, &buffer[1]);
 	else
 	  good &= logic_field(pamh,user, buffer, count, is_same);