diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-01-26 22:54:59 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-01-26 22:54:59 +0000 |
commit | d24c48a02579b812cd01f2fa32b687160dc61036 (patch) | |
tree | edbf15f8e8a9ce8dc22ab6fcae6cac27f82c5fe5 /src/vpn | |
parent | bfc70f045a8e34de985f7e8bcbcc2fca52e404e9 (diff) | |
download | gnunet-d24c48a02579b812cd01f2fa32b687160dc61036.tar.gz gnunet-d24c48a02579b812cd01f2fa32b687160dc61036.zip |
-warn if permissions are insufficient to run test
Diffstat (limited to 'src/vpn')
-rw-r--r-- | src/vpn/test_gnunet_vpn.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/vpn/test_gnunet_vpn.c b/src/vpn/test_gnunet_vpn.c index ea96ce59b..2ef5f96e9 100644 --- a/src/vpn/test_gnunet_vpn.c +++ b/src/vpn/test_gnunet_vpn.c | |||
@@ -475,6 +475,18 @@ main (int argc, char *const *argv) | |||
475 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 475 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
476 | GNUNET_GETOPT_OPTION_END | 476 | GNUNET_GETOPT_OPTION_END |
477 | }; | 477 | }; |
478 | |||
479 | if ( (GNUNET_YES != | ||
480 | GNUNET_OS_check_helper_binary ("gnunet-helper-vpn")) || | ||
481 | (GNUNET_YES != | ||
482 | GNUNET_OS_check_helper_binary ("gnunet-helper-exit")) ) | ||
483 | { | ||
484 | fprintf (stderr, | ||
485 | "WARNING: gnunet-helper-{exit,vpn} binaries in $PATH are not SUID, refusing to run test (as it would have to fail).\n"); | ||
486 | fprintf (stderr, | ||
487 | "Change $PATH ('.' in $PATH before $GNUNET_PREFIX/bin is problematic) or permissions (run 'make install' as root) to fix this!\n"); | ||
488 | return 0; | ||
489 | } | ||
478 | bin = argv[0]; | 490 | bin = argv[0]; |
479 | if (NULL != strstr (bin, "lt-")) | 491 | if (NULL != strstr (bin, "lt-")) |
480 | bin = strstr (bin, "lt-") + 4; | 492 | bin = strstr (bin, "lt-") + 4; |