aboutsummaryrefslogtreecommitdiff
path: root/src/vpn/gnunet-service-vpn.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vpn/gnunet-service-vpn.c')
-rw-r--r--src/vpn/gnunet-service-vpn.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/vpn/gnunet-service-vpn.c b/src/vpn/gnunet-service-vpn.c
index 8f4d11bc9..7f7dcbf1d 100644
--- a/src/vpn/gnunet-service-vpn.c
+++ b/src/vpn/gnunet-service-vpn.c
@@ -285,6 +285,11 @@ struct TunnelState
285 285
286 286
287/** 287/**
288 * Return value from 'main'.
289 */
290static int global_ret;
291
292/**
288 * Configuration we use. 293 * Configuration we use.
289 */ 294 */
290static const struct GNUNET_CONFIGURATION_Handle *cfg; 295static const struct GNUNET_CONFIGURATION_Handle *cfg;
@@ -3002,6 +3007,15 @@ run (void *cls,
3002 struct in_addr v4; 3007 struct in_addr v4;
3003 struct in6_addr v6; 3008 struct in6_addr v6;
3004 3009
3010 if (GNUNET_YES !=
3011 GNUNET_OS_check_helper_binary ("gnunet-helper-vpn"))
3012 {
3013 fprintf (stderr,
3014 "`%s' is not SUID, refusing to run.\n",
3015 "gnunet-helper-vpn");
3016 global_ret = 1;
3017 return;
3018 }
3005 cfg = cfg_; 3019 cfg = cfg_;
3006 stats = GNUNET_STATISTICS_create ("vpn", cfg); 3020 stats = GNUNET_STATISTICS_create ("vpn", cfg);
3007 if (GNUNET_OK != 3021 if (GNUNET_OK !=
@@ -3112,7 +3126,7 @@ main (int argc, char *const *argv)
3112 return (GNUNET_OK == 3126 return (GNUNET_OK ==
3113 GNUNET_SERVICE_run (argc, argv, "vpn", 3127 GNUNET_SERVICE_run (argc, argv, "vpn",
3114 GNUNET_SERVICE_OPTION_NONE, 3128 GNUNET_SERVICE_OPTION_NONE,
3115 &run, NULL)) ? 0 : 1; 3129 &run, NULL)) ? global_ret : 1;
3116} 3130}
3117 3131
3118/* end of gnunet-service-vpn.c */ 3132/* end of gnunet-service-vpn.c */