summaryrefslogtreecommitdiff
path: root/package/sudo/patches/patch-plugins_sudoers_match_c
blob: b2ebabb64a793bd7485b69074103512d37c22bda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
--- sudo-1.8.12.orig/plugins/sudoers/match.c	2015-02-09 12:53:54.000000000 -0600
+++ sudo-1.8.12/plugins/sudoers/match.c	2015-02-17 14:16:18.961371274 -0600
@@ -129,10 +129,12 @@ userlist_matches(const struct passwd *pw
 	    case ALL:
 		matched = !m->negated;
 		break;
+#if 0
 	    case NETGROUP:
 		if (netgr_matches(m->name, NULL, NULL, pw->pw_name))
 		    matched = !m->negated;
 		break;
+#endif
 	    case USERGROUP:
 		if (usergr_matches(m->name, pw->pw_name, pw))
 		    matched = !m->negated;
@@ -185,10 +187,12 @@ runaslist_matches(const struct member_li
 		    case ALL:
 			user_matched = !m->negated;
 			break;
+#if 0
 		    case NETGROUP:
 			if (netgr_matches(m->name, NULL, NULL, runas_pw->pw_name))
 			    user_matched = !m->negated;
 			break;
+#endif
 		    case USERGROUP:
 			if (usergr_matches(m->name, runas_pw->pw_name, runas_pw))
 			    user_matched = !m->negated;
@@ -285,10 +289,12 @@ hostlist_matches(const struct member_lis
 	    case ALL:
 		matched = !m->negated;
 		break;
+#if 0
 	    case NETGROUP:
 		if (netgr_matches(m->name, user_runhost, user_srunhost, NULL))
 		    matched = !m->negated;
 		break;
+#endif
 	    case NTWKADDR:
 		if (addr_matches(m->name))
 		    matched = !m->negated;
@@ -951,6 +957,7 @@ sudo_getdomainname(void)
  * else return false.  Either of "lhost", "shost" or "user" may be NULL
  * in which case that argument is not checked...
  */
+#if 0
 bool
 netgr_matches(const char *netgr, const char *lhost, const char *shost, const char *user)
 {
@@ -989,3 +996,4 @@ netgr_matches(const char *netgr, const c
 
     debug_return_bool(rc);
 }
+#endif