aboutsummaryrefslogtreecommitdiff
path: root/src/pt
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-11-01 22:18:42 +0000
committerChristian Grothoff <christian@grothoff.org>2012-11-01 22:18:42 +0000
commit0c4dec07cadc333a3a1eaca9e8dbac827185e4e7 (patch)
tree2c40d7555130a1d19be85931ac6c75ffdf6f08b8 /src/pt
parente5b30eb25d2994dc45f7944c5b0f1ce129cd41c5 (diff)
downloadgnunet-0c4dec07cadc333a3a1eaca9e8dbac827185e4e7.tar.gz
gnunet-0c4dec07cadc333a3a1eaca9e8dbac827185e4e7.zip
-more libexec fixes
Diffstat (limited to 'src/pt')
-rw-r--r--src/pt/test_gnunet_vpn.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/pt/test_gnunet_vpn.c b/src/pt/test_gnunet_vpn.c
index 8b9bb2b20..6f6723d72 100644
--- a/src/pt/test_gnunet_vpn.c
+++ b/src/pt/test_gnunet_vpn.c
@@ -395,6 +395,8 @@ main (int argc, char *const *argv)
395{ 395{
396 const char *type; 396 const char *type;
397 const char *bin; 397 const char *bin;
398 char *vpn_binary;
399 char *exit_binary;
398 400
399 if (0 != ACCESS ("/dev/net/tun", R_OK)) 401 if (0 != ACCESS ("/dev/net/tun", R_OK))
400 { 402 {
@@ -403,15 +405,19 @@ main (int argc, char *const *argv)
403 fprintf (stderr, "WARNING: System unable to run test, skipping.\n"); 405 fprintf (stderr, "WARNING: System unable to run test, skipping.\n");
404 return 0; 406 return 0;
405 } 407 }
406 if ((GNUNET_YES != GNUNET_OS_check_helper_binary ("gnunet-helper-vpn")) || 408 vpn_binary = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-vpn");
407 (GNUNET_YES != GNUNET_OS_check_helper_binary ("gnunet-helper-exit"))) 409 exit_binary = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-exit");
410 if ((GNUNET_YES != GNUNET_OS_check_helper_binary (vpn_binary)) ||
411 (GNUNET_YES != GNUNET_OS_check_helper_binary (exit_binary)))
408 { 412 {
413 GNUNET_free (vpn_binary);
414 GNUNET_free (exit_binary);
409 fprintf (stderr, 415 fprintf (stderr,
410 "WARNING: gnunet-helper-{exit,vpn} binaries in $PATH are not SUID, refusing to run test (as it would have to fail).\n"); 416 "WARNING: gnunet-helper-{exit,vpn} binaries are not SUID, refusing to run test (as it would have to fail).\n");
411 fprintf (stderr,
412 "Change $PATH ('.' in $PATH before $GNUNET_PREFIX/bin is problematic) or permissions (run 'make install' as root) to fix this!\n");
413 return 0; 417 return 0;
414 } 418 }
419 GNUNET_free (vpn_binary);
420 GNUNET_free (exit_binary);
415 GNUNET_CRYPTO_rsa_setup_hostkey ("test_gnunet_vpn.conf"); 421 GNUNET_CRYPTO_rsa_setup_hostkey ("test_gnunet_vpn.conf");
416 bin = argv[0]; 422 bin = argv[0];
417 if (NULL != strstr (bin, "lt-")) 423 if (NULL != strstr (bin, "lt-"))