patch-modules_pam_group_pam_group_c 692 B

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