patch-plugins_sudoers_match_c 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. --- sudo-1.8.10.orig/plugins/sudoers/match.c 2014-03-07 22:51:19.000000000 +0100
  2. +++ sudo-1.8.10/plugins/sudoers/match.c 2014-03-24 16:16:24.000000000 +0100
  3. @@ -122,10 +122,12 @@ userlist_matches(const struct passwd *pw
  4. case ALL:
  5. matched = !m->negated;
  6. break;
  7. +#if 0
  8. case NETGROUP:
  9. if (netgr_matches(m->name, NULL, NULL, pw->pw_name))
  10. matched = !m->negated;
  11. break;
  12. +#endif
  13. case USERGROUP:
  14. if (usergr_matches(m->name, pw->pw_name, pw))
  15. matched = !m->negated;
  16. @@ -178,10 +180,12 @@ runaslist_matches(const struct member_li
  17. case ALL:
  18. user_matched = !m->negated;
  19. break;
  20. +#if 0
  21. case NETGROUP:
  22. if (netgr_matches(m->name, NULL, NULL, runas_pw->pw_name))
  23. user_matched = !m->negated;
  24. break;
  25. +#endif
  26. case USERGROUP:
  27. if (usergr_matches(m->name, runas_pw->pw_name, runas_pw))
  28. user_matched = !m->negated;
  29. @@ -278,10 +282,12 @@ hostlist_matches(const struct member_lis
  30. case ALL:
  31. matched = !m->negated;
  32. break;
  33. +#if 0
  34. case NETGROUP:
  35. if (netgr_matches(m->name, user_runhost, user_srunhost, NULL))
  36. matched = !m->negated;
  37. break;
  38. +#endif
  39. case NTWKADDR:
  40. if (addr_matches(m->name))
  41. matched = !m->negated;
  42. @@ -930,6 +936,7 @@ sudo_getdomainname(void)
  43. * else return false. Either of "lhost", "shost" or "user" may be NULL
  44. * in which case that argument is not checked...
  45. */
  46. +#if 0
  47. bool
  48. netgr_matches(const char *netgr, const char *lhost, const char *shost, const char *user)
  49. {
  50. @@ -972,3 +979,4 @@ netgr_matches(const char *netgr, const c
  51. debug_return_bool(rc);
  52. }
  53. +#endif