diff options
author | Christian Fuchs <christian.fuchs@cfuchs.net> | 2013-04-05 14:08:52 +0000 |
---|---|---|
committer | Christian Fuchs <christian.fuchs@cfuchs.net> | 2013-04-05 14:08:52 +0000 |
commit | 203c31d7b090fbfec893aa7bc865ebd7ab2631bd (patch) | |
tree | 5dfb6219f1ec1f8f48f6a08b9a7f41f710569e44 /src/pt | |
parent | 0eb4c43a7edec834ecff96dc3e7b43e2935e4b08 (diff) | |
download | gnunet-203c31d7b090fbfec893aa7bc865ebd7ab2631bd.tar.gz gnunet-203c31d7b090fbfec893aa7bc865ebd7ab2631bd.zip |
started making test_gnunet_vpn a bit less linux-only. does not work on
windows yet, though due to permissions checking, see other commits!
Diffstat (limited to 'src/pt')
-rw-r--r-- | src/pt/test_gnunet_vpn.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/pt/test_gnunet_vpn.c b/src/pt/test_gnunet_vpn.c index c41ccb278..c50837459 100644 --- a/src/pt/test_gnunet_vpn.c +++ b/src/pt/test_gnunet_vpn.c | |||
@@ -399,6 +399,7 @@ main (int argc, char *const *argv) | |||
399 | const char *bin; | 399 | const char *bin; |
400 | char *vpn_binary; | 400 | char *vpn_binary; |
401 | char *exit_binary; | 401 | char *exit_binary; |
402 | int ret=0; | ||
402 | 403 | ||
403 | #ifndef MINGW | 404 | #ifndef MINGW |
404 | if (0 != ACCESS ("/dev/net/tun", R_OK)) | 405 | if (0 != ACCESS ("/dev/net/tun", R_OK)) |
@@ -409,15 +410,17 @@ main (int argc, char *const *argv) | |||
409 | return 0; | 410 | return 0; |
410 | } | 411 | } |
411 | #endif | 412 | #endif |
412 | vpn_binary = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-vpn"); | 413 | vpn_binary = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-vpn.exe"); |
413 | exit_binary = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-exit"); | 414 | exit_binary = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-exit.exe"); |
414 | if ((GNUNET_YES != GNUNET_OS_check_helper_binary (vpn_binary)) || | 415 | fprintf (stderr,"%s\n", vpn_binary); |
415 | (GNUNET_YES != GNUNET_OS_check_helper_binary (exit_binary))) | 416 | fprintf (stderr,"%s\n", exit_binary); |
417 | if ((GNUNET_YES != (ret = GNUNET_OS_check_helper_binary (vpn_binary))) || | ||
418 | (GNUNET_YES != (ret = GNUNET_OS_check_helper_binary (exit_binary)))) | ||
416 | { | 419 | { |
417 | GNUNET_free (vpn_binary); | 420 | GNUNET_free (vpn_binary); |
418 | GNUNET_free (exit_binary); | 421 | GNUNET_free (exit_binary); |
419 | fprintf (stderr, | 422 | fprintf (stderr, |
420 | "WARNING: gnunet-helper-{exit,vpn} binaries are not SUID, refusing to run test (as it would have to fail).\n"); | 423 | "WARNING: gnunet-helper-{exit,vpn} binaries are not SUID, refusing to run test (as it would have to fail). %d\n", ret); |
421 | return 0; | 424 | return 0; |
422 | } | 425 | } |
423 | 426 | ||