From: Christian Grothoff Date: Thu, 26 Jan 2012 22:54:59 +0000 (+0000) Subject: -warn if permissions are insufficient to run test X-Git-Tag: initial-import-from-subversion-38251~15046 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=d24c48a02579b812cd01f2fa32b687160dc61036;p=oweals%2Fgnunet.git -warn if permissions are insufficient to run test --- 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;