Browse code

Catch /usr-prefixed paths too.

Xavier G authored on 07/08/2019 21:29:49
Showing 1 changed files

... ...
@@ -62,7 +62,8 @@ int execve(const char *filename, char *const *argv, char *const *envp) {
62 62
 	}
63 63
 
64 64
 	/* Determine whether libvirtd is trying to call iptables: */
65
-	if (!strncmp(filename, "/sbin/iptables", 15) || !strncmp(filename, "/sbin/ip6tables", 16)) {
65
+	if (!strncmp(filename, "/sbin/iptables", 15) || !strncmp(filename, "/sbin/ip6tables", 16) ||
66
+	    !strncmp(filename, "/usr/sbin/iptables", 19) || !strncmp(filename, "/usr/sbin/ip6tables", 20)) {
66 67
 #ifdef NOIPTABLES_DEBUG
67 68
 		dprintf(2, "OMG it's calling %s!\n", filename);
68 69
 #endif