[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r20829 - in gnunet/src: dns exit
From: |
gnunet |
Subject: |
[GNUnet-SVN] r20829 - in gnunet/src: dns exit |
Date: |
Sun, 1 Apr 2012 11:58:46 +0200 |
Author: grothoff
Date: 2012-04-01 11:58:45 +0200 (Sun, 01 Apr 2012)
New Revision: 20829
Modified:
gnunet/src/dns/gnunet-service-dns.c
gnunet/src/exit/gnunet-daemon-exit.c
Log:
-fixing #2243
Modified: gnunet/src/dns/gnunet-service-dns.c
===================================================================
--- gnunet/src/dns/gnunet-service-dns.c 2012-04-01 09:22:59 UTC (rev 20828)
+++ gnunet/src/dns/gnunet-service-dns.c 2012-04-01 09:58:45 UTC (rev 20829)
@@ -290,6 +290,11 @@
/**
+ * Global return value from 'main'.
+ */
+static int global_ret;
+
+/**
* The configuration to use
*/
static const struct GNUNET_CONFIGURATION_Handle *cfg;
@@ -1552,6 +1557,16 @@
struct in6_addr dns_exit6;
cfg = cfg_;
+ if (GNUNET_YES !=
+ GNUNET_OS_check_helper_binary ("gnunet-helper-dns"))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ _("`%s' must be installed SUID, refusing to run\n"),
+ "gnunet-helper-dns");
+ global_ret = 1;
+ return;
+ }
+
stats = GNUNET_STATISTICS_create ("dns", cfg);
nc = GNUNET_SERVER_notification_context_create (server, 1);
GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &cleanup_task,
@@ -1662,7 +1677,7 @@
{
return (GNUNET_OK ==
GNUNET_SERVICE_run (argc, argv, "dns", GNUNET_SERVICE_OPTION_NONE,
- &run, NULL)) ? 0 : 1;
+ &run, NULL)) ? global_ret : 1;
}
Modified: gnunet/src/exit/gnunet-daemon-exit.c
===================================================================
--- gnunet/src/exit/gnunet-daemon-exit.c 2012-04-01 09:22:59 UTC (rev
20828)
+++ gnunet/src/exit/gnunet-daemon-exit.c 2012-04-01 09:58:45 UTC (rev
20829)
@@ -3027,9 +3027,9 @@
if (GNUNET_YES !=
GNUNET_OS_check_helper_binary ("gnunet-helper-exit"))
{
- fprintf (stderr,
- "`%s' is not SUID, refusing to run.\n",
- "gnunet-helper-exit");
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ _("`%s' must be installed SUID, refusing to run\n"),
+ "gnunet-helper-exit");
global_ret = 1;
return;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r20829 - in gnunet/src: dns exit,
gnunet <=