patch-plugins_sudoers_match_c 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. --- sudo-1.8.11p2.orig/plugins/sudoers/match.c 2014-09-23 18:56:04.000000000 +0200
  2. +++ sudo-1.8.11p2/plugins/sudoers/match.c 2014-12-15 10:26:02.230233008 +0100
  3. @@ -126,10 +126,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. @@ -182,10 +184,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. @@ -282,10 +286,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. @@ -939,6 +945,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. @@ -981,3 +988,4 @@ netgr_matches(const char *netgr, const c
  51. debug_return_bool(rc);
  52. }
  53. +#endif