diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-12-21 14:42:18 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-12-21 14:42:18 +0000 |
commit | 159da73869b11137dd8c12c14266f1a2e18f223b (patch) | |
tree | 7349bf65dfd2ca93ec9268f41f5186ac269f7028 /src/pt | |
parent | 8a3f6ada0a51722084e8ff7b8d9463f51e5d2cbe (diff) | |
download | gnunet-159da73869b11137dd8c12c14266f1a2e18f223b.tar.gz gnunet-159da73869b11137dd8c12c14266f1a2e18f223b.zip |
-check for helpers in libexec
Diffstat (limited to 'src/pt')
-rw-r--r-- | src/pt/test_gns_vpn.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/pt/test_gns_vpn.c b/src/pt/test_gns_vpn.c index 32283bad4..dd21f9dcd 100644 --- a/src/pt/test_gns_vpn.c +++ b/src/pt/test_gns_vpn.c | |||
@@ -501,6 +501,9 @@ int | |||
501 | main (int argc, char *const *argv) | 501 | main (int argc, char *const *argv) |
502 | { | 502 | { |
503 | char *sbin_iptables; | 503 | char *sbin_iptables; |
504 | char *bin_vpn; | ||
505 | char *bin_exit; | ||
506 | char *bin_dns; | ||
504 | char *const iptables_args[] = | 507 | char *const iptables_args[] = |
505 | { | 508 | { |
506 | "iptables", "-t", "mangle", "-L", "-v", NULL | 509 | "iptables", "-t", "mangle", "-L", "-v", NULL |
@@ -535,20 +538,29 @@ main (int argc, char *const *argv) | |||
535 | return 0; | 538 | return 0; |
536 | } | 539 | } |
537 | 540 | ||
541 | bin_vpn = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-vpn"); | ||
542 | bin_exit = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-exit"); | ||
543 | bin_dns = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-dns"); | ||
538 | if ( (0 != geteuid ()) && | 544 | if ( (0 != geteuid ()) && |
539 | ( (GNUNET_YES != | 545 | ( (GNUNET_YES != |
540 | GNUNET_OS_check_helper_binary ("gnunet-helper-vpn")) || | 546 | GNUNET_OS_check_helper_binary (bin_vpn)) || |
541 | (GNUNET_YES != | 547 | (GNUNET_YES != |
542 | GNUNET_OS_check_helper_binary ("gnunet-helper-exit")) || | 548 | GNUNET_OS_check_helper_binary (bin_exit)) || |
543 | (GNUNET_YES != | 549 | (GNUNET_YES != |
544 | GNUNET_OS_check_helper_binary ("gnunet-helper-dns"))) ) | 550 | GNUNET_OS_check_helper_binary (bin_dns))) ) |
545 | { | 551 | { |
546 | fprintf (stderr, | 552 | fprintf (stderr, |
547 | "WARNING: gnunet-helper-{exit,vpn,dns} binaries in $PATH are not SUID, refusing to run test (as it would have to fail).\n"); | 553 | "WARNING: gnunet-helper-{exit,vpn,dns} binaries in $PATH are not SUID, refusing to run test (as it would have to fail).\n"); |
548 | fprintf (stderr, | 554 | fprintf (stderr, |
549 | "Change $PATH ('.' in $PATH before $GNUNET_PREFIX/bin is problematic) or permissions (run 'make install' as root) to fix this!\n"); | 555 | "Change $PATH ('.' in $PATH before $GNUNET_PREFIX/bin is problematic) or permissions (run 'make install' as root) to fix this!\n"); |
556 | GNUNET_free (bin_vpn); | ||
557 | GNUNET_free (bin_exit); | ||
558 | GNUNET_free (bin_dns); | ||
550 | return 0; | 559 | return 0; |
551 | } | 560 | } |
561 | GNUNET_free (bin_vpn); | ||
562 | GNUNET_free (bin_exit); | ||
563 | GNUNET_free (bin_dns); | ||
552 | GNUNET_CRYPTO_rsa_setup_hostkey ("test_gns_vpn.conf"); | 564 | GNUNET_CRYPTO_rsa_setup_hostkey ("test_gns_vpn.conf"); |
553 | 565 | ||
554 | dest_ip = "169.254.86.1"; | 566 | dest_ip = "169.254.86.1"; |