aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dns/gnunet-service-dns.c17
-rw-r--r--src/exit/gnunet-daemon-exit.c6
2 files changed, 19 insertions, 4 deletions
diff --git a/src/dns/gnunet-service-dns.c b/src/dns/gnunet-service-dns.c
index 37d2fbca8..fbb27e4bc 100644
--- a/src/dns/gnunet-service-dns.c
+++ b/src/dns/gnunet-service-dns.c
@@ -290,6 +290,11 @@ struct TunnelState
290 290
291 291
292/** 292/**
293 * Global return value from 'main'.
294 */
295static int global_ret;
296
297/**
293 * The configuration to use 298 * The configuration to use
294 */ 299 */
295static const struct GNUNET_CONFIGURATION_Handle *cfg; 300static const struct GNUNET_CONFIGURATION_Handle *cfg;
@@ -1552,6 +1557,16 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
1552 struct in6_addr dns_exit6; 1557 struct in6_addr dns_exit6;
1553 1558
1554 cfg = cfg_; 1559 cfg = cfg_;
1560 if (GNUNET_YES !=
1561 GNUNET_OS_check_helper_binary ("gnunet-helper-dns"))
1562 {
1563 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
1564 _("`%s' must be installed SUID, refusing to run\n"),
1565 "gnunet-helper-dns");
1566 global_ret = 1;
1567 return;
1568 }
1569
1555 stats = GNUNET_STATISTICS_create ("dns", cfg); 1570 stats = GNUNET_STATISTICS_create ("dns", cfg);
1556 nc = GNUNET_SERVER_notification_context_create (server, 1); 1571 nc = GNUNET_SERVER_notification_context_create (server, 1);
1557 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &cleanup_task, 1572 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &cleanup_task,
@@ -1662,7 +1677,7 @@ main (int argc, char *const *argv)
1662{ 1677{
1663 return (GNUNET_OK == 1678 return (GNUNET_OK ==
1664 GNUNET_SERVICE_run (argc, argv, "dns", GNUNET_SERVICE_OPTION_NONE, 1679 GNUNET_SERVICE_run (argc, argv, "dns", GNUNET_SERVICE_OPTION_NONE,
1665 &run, NULL)) ? 0 : 1; 1680 &run, NULL)) ? global_ret : 1;
1666} 1681}
1667 1682
1668 1683
diff --git a/src/exit/gnunet-daemon-exit.c b/src/exit/gnunet-daemon-exit.c
index 3bf26d7b8..07804c592 100644
--- a/src/exit/gnunet-daemon-exit.c
+++ b/src/exit/gnunet-daemon-exit.c
@@ -3027,9 +3027,9 @@ run (void *cls, char *const *args GNUNET_UNUSED,
3027 if (GNUNET_YES != 3027 if (GNUNET_YES !=
3028 GNUNET_OS_check_helper_binary ("gnunet-helper-exit")) 3028 GNUNET_OS_check_helper_binary ("gnunet-helper-exit"))
3029 { 3029 {
3030 fprintf (stderr, 3030 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
3031 "`%s' is not SUID, refusing to run.\n", 3031 _("`%s' must be installed SUID, refusing to run\n"),
3032 "gnunet-helper-exit"); 3032 "gnunet-helper-exit");
3033 global_ret = 1; 3033 global_ret = 1;
3034 return; 3034 return;
3035 } 3035 }