diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-04-05 23:39:41 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-04-05 23:39:49 +0200 |
commit | c0d08bbdeed4523cf89bf55b64ce2c16476c3e26 (patch) | |
tree | 185c69641c5ec3aaa022a9ecfb43495c8467687f /src/exit/gnunet-helper-exit.c | |
parent | 53969c9d9a95234ee845fa0542a330f788ad2a2c (diff) | |
download | gnunet-c0d08bbdeed4523cf89bf55b64ce2c16476c3e26.tar.gz gnunet-c0d08bbdeed4523cf89bf55b64ce2c16476c3e26.zip |
fix #5352
Diffstat (limited to 'src/exit/gnunet-helper-exit.c')
-rw-r--r-- | src/exit/gnunet-helper-exit.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/exit/gnunet-helper-exit.c b/src/exit/gnunet-helper-exit.c index de9ea39be..cda38710f 100644 --- a/src/exit/gnunet-helper-exit.c +++ b/src/exit/gnunet-helper-exit.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 | ||
@@ -670,6 +670,11 @@ main (int argc, char **argv) | |||
670 | } | 670 | } |
671 | if (0 != strcmp (argv[2], "-")) | 671 | if (0 != strcmp (argv[2], "-")) |
672 | { | 672 | { |
673 | #ifdef IPTABLES | ||
674 | if (0 == access (IPTABLES, X_OK)) | ||
675 | sbin_iptables = IPTABLES; | ||
676 | else | ||
677 | #endif | ||
673 | if (0 == access ("/sbin/iptables", X_OK)) | 678 | if (0 == access ("/sbin/iptables", X_OK)) |
674 | sbin_iptables = "/sbin/iptables"; | 679 | sbin_iptables = "/sbin/iptables"; |
675 | else if (0 == access ("/usr/sbin/iptables", X_OK)) | 680 | else if (0 == access ("/usr/sbin/iptables", X_OK)) |
@@ -681,6 +686,11 @@ main (int argc, char **argv) | |||
681 | strerror (errno)); | 686 | strerror (errno)); |
682 | return 1; | 687 | return 1; |
683 | } | 688 | } |
689 | #ifdef SYSCTL | ||
690 | if (0 == access (SYSCTL, X_OK)) | ||
691 | sbin_sysctl = SYSCTL; | ||
692 | else | ||
693 | #endif | ||
684 | if (0 == access ("/sbin/sysctl", X_OK)) | 694 | if (0 == access ("/sbin/sysctl", X_OK)) |
685 | sbin_sysctl = "/sbin/sysctl"; | 695 | sbin_sysctl = "/sbin/sysctl"; |
686 | else if (0 == access ("/usr/sbin/sysctl", X_OK)) | 696 | else if (0 == access ("/usr/sbin/sysctl", X_OK)) |