aboutsummaryrefslogtreecommitdiff
path: root/src/dns/gnunet-helper-dns.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dns/gnunet-helper-dns.c')
-rw-r--r--src/dns/gnunet-helper-dns.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/dns/gnunet-helper-dns.c b/src/dns/gnunet-helper-dns.c
index fb970224a..554727094 100644
--- a/src/dns/gnunet-helper-dns.c
+++ b/src/dns/gnunet-helper-dns.c
@@ -11,7 +11,7 @@
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU Affero General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 17
@@ -768,6 +768,11 @@ main (int argc, char *const*argv)
768 if (0 == nortsetup) 768 if (0 == nortsetup)
769 { 769 {
770 /* verify that the binaries we care about are executable */ 770 /* verify that the binaries we care about are executable */
771#ifdef IPTABLES
772 if (0 == access (IPTABLES, X_OK))
773 sbin_iptables = IPTABLES;
774 else
775#endif
771 if (0 == access ("/sbin/iptables", X_OK)) 776 if (0 == access ("/sbin/iptables", X_OK))
772 sbin_iptables = "/sbin/iptables"; 777 sbin_iptables = "/sbin/iptables";
773 else if (0 == access ("/usr/sbin/iptables", X_OK)) 778 else if (0 == access ("/usr/sbin/iptables", X_OK))
@@ -779,6 +784,11 @@ main (int argc, char *const*argv)
779 strerror (errno)); 784 strerror (errno));
780 return 3; 785 return 3;
781 } 786 }
787#ifdef IP6TABLES
788 if (0 == access (IP6TABLES, X_OK))
789 sbin_ip6tables = IP6TABLES;
790 else
791#endif
782 if (0 == access ("/sbin/ip6tables", X_OK)) 792 if (0 == access ("/sbin/ip6tables", X_OK))
783 sbin_ip6tables = "/sbin/ip6tables"; 793 sbin_ip6tables = "/sbin/ip6tables";
784 else if (0 == access ("/usr/sbin/ip6tables", X_OK)) 794 else if (0 == access ("/usr/sbin/ip6tables", X_OK))
@@ -790,6 +800,11 @@ main (int argc, char *const*argv)
790 strerror (errno)); 800 strerror (errno));
791 return 3; 801 return 3;
792 } 802 }
803#ifdef PATH_TO_IP
804 if (0 == access (PATH_TO_IP, X_OK))
805 sbin_ip = PATH_TO_IP;
806 else
807#endif
793 if (0 == access ("/sbin/ip", X_OK)) 808 if (0 == access ("/sbin/ip", X_OK))
794 sbin_ip = "/sbin/ip"; 809 sbin_ip = "/sbin/ip";
795 else if (0 == access ("/usr/sbin/ip", X_OK)) 810 else if (0 == access ("/usr/sbin/ip", X_OK))
@@ -803,6 +818,11 @@ main (int argc, char *const*argv)
803 strerror (errno)); 818 strerror (errno));
804 return 4; 819 return 4;
805 } 820 }
821#ifdef SYSCTL
822 if (0 == access (SYSCTL, X_OK))
823 sbin_sysctl = SYSCTL;
824 else
825#endif
806 if (0 == access ("/sbin/sysctl", X_OK)) 826 if (0 == access ("/sbin/sysctl", X_OK))
807 sbin_sysctl = "/sbin/sysctl"; 827 sbin_sysctl = "/sbin/sysctl";
808 else if (0 == access ("/usr/sbin/sysctl", X_OK)) 828 else if (0 == access ("/usr/sbin/sysctl", X_OK))