From d24c48a02579b812cd01f2fa32b687160dc61036 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 26 Jan 2012 22:54:59 +0000 Subject: [PATCH] -warn if permissions are insufficient to run test --- src/vpn/test_gnunet_vpn.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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) struct GNUNET_GETOPT_CommandLineOption options[] = { GNUNET_GETOPT_OPTION_END }; + + if ( (GNUNET_YES != + GNUNET_OS_check_helper_binary ("gnunet-helper-vpn")) || + (GNUNET_YES != + GNUNET_OS_check_helper_binary ("gnunet-helper-exit")) ) + { + fprintf (stderr, + "WARNING: gnunet-helper-{exit,vpn} binaries in $PATH are not SUID, refusing to run test (as it would have to fail).\n"); + fprintf (stderr, + "Change $PATH ('.' in $PATH before $GNUNET_PREFIX/bin is problematic) or permissions (run 'make install' as root) to fix this!\n"); + return 0; + } bin = argv[0]; if (NULL != strstr (bin, "lt-")) bin = strstr (bin, "lt-") + 4; -- 2.25.1