The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / linux-pam / 0005-succeed.patch
1 Conditionally compile per innetgr availability
2
3 innetgr is not available/functional in uclibc, provide conditions for compilation.
4
5 Signed-off-by: Dmitry Golubovsky <golubovsky@gmail.com>
6
7 Index: linux-pam-1.1.4/modules/pam_succeed_if/pam_succeed_if.c
8 ============================================================================
9 --- linux-pam-1.1.4/modules/pam_succeed_if/pam_succeed_if.c     2011-06-21 05:04:56.000000000 -0400
10 +++ linux-pam-1.1.4/modules/pam_succeed_if/pam_succeed_if.c     2012-08-09 21:05:02.000000000 -0400
11 @@ -233,16 +233,20 @@
12  static int
13  evaluate_innetgr(const char *host, const char *user, const char *group)
14  {
15 +#ifdef HAVE_INNETGR
16         if (innetgr(group, host, user, NULL) == 1)
17                 return PAM_SUCCESS;
18 +#endif /* HAVE_INNETGR */
19         return PAM_AUTH_ERR;
20  }
21  /* Return PAM_SUCCESS if the (host,user) is NOT in the netgroup. */
22  static int
23  evaluate_notinnetgr(const char *host, const char *user, const char *group)
24  {
25 +#ifdef HAVE_INNETGR
26         if (innetgr(group, host, user, NULL) == 0)
27                 return PAM_SUCCESS;
28 +#endif /* HAVE_INNETGR */
29         return PAM_AUTH_ERR;
30  }
31