gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnunet] 05/09: change default port to 53, use setcap to en


From: gnunet
Subject: [GNUnet-SVN] [gnunet] 05/09: change default port to 53, use setcap to enable binding to low port
Date: Thu, 23 Feb 2017 23:06:04 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository gnunet.

commit 2309bb75f368da8c44a90d741d78b5e7b8a04f42
Author: Christian Grothoff <address@hidden>
AuthorDate: Thu Feb 23 22:52:21 2017 +0100

    change default port to 53, use setcap to enable binding to low port
---
 src/gns/Makefile.am      | 10 +++++++++-
 src/gns/gnunet-dns2gns.c | 14 +++++++++-----
 2 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/src/gns/Makefile.am b/src/gns/Makefile.am
index 8c952be04..464bbbca1 100644
--- a/src/gns/Makefile.am
+++ b/src/gns/Makefile.am
@@ -69,8 +69,8 @@ endif
 
 libexec_PROGRAMS = \
   gnunet-service-gns \
-  $(DO_W32_HELPER) \
   gnunet-dns2gns \
+  $(DO_W32_HELPER) \
   $(DO_PROXY)
 
 bin_PROGRAMS = \
@@ -136,6 +136,14 @@ gnunet_dns2gns_LDADD = \
   $(top_builddir)/src/dns/libgnunetdnsstub.la \
   $(GN_LIBINTL)
 
+if LINUX
+HIJACKBIN = gnunet-dns2gns
+install-exec-hook:
+       $(SUDO_BINARY) setcap 'cap_net_bind_service=+ep' 
$(DESTDIR)$(libexecdir)/gnunet-dns2gns || true
+else
+install-exec-hook:
+endif
+
 gnunet_gns_proxy_SOURCES = \
  gnunet-gns-proxy.c
 gnunet_gns_proxy_CPPFLAGS = $(AM_CPPFLAGS) $(CPP_GNURL)
diff --git a/src/gns/gnunet-dns2gns.c b/src/gns/gnunet-dns2gns.c
index bb37a42a3..813ecdf8e 100644
--- a/src/gns/gnunet-dns2gns.c
+++ b/src/gns/gnunet-dns2gns.c
@@ -138,7 +138,7 @@ static char *dns_ip;
 /**
  * UDP Port we listen on for inbound DNS requests.
  */
-static unsigned int listen_port = 2853;
+static unsigned int listen_port = 53;
 
 /**
  * Which GNS zone do we translate incoming DNS requests to?
@@ -796,13 +796,17 @@ main (int argc,
   };
   int ret;
 
-  if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv,
-                                                &argc, &argv))
+  if (GNUNET_OK !=
+      GNUNET_STRINGS_get_utf8_args (argc, argv,
+                                    &argc, &argv))
     return 2;
-  GNUNET_log_setup ("gnunet-dns2gns", "WARNING", NULL);
+  GNUNET_log_setup ("gnunet-dns2gns",
+                    "WARNING",
+                    NULL);
   ret =
       (GNUNET_OK ==
-       GNUNET_PROGRAM_run (argc, argv, "gnunet-dns2gns",
+       GNUNET_PROGRAM_run (argc, argv,
+                           "gnunet-dns2gns",
                            _("GNUnet DNS-to-GNS proxy (a DNS server)"),
                           options,
                            &run, NULL)) ? 0 : 1;

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]