diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-02-23 22:52:21 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-02-23 22:55:30 +0100 |
commit | 2309bb75f368da8c44a90d741d78b5e7b8a04f42 (patch) | |
tree | 054133d75d0893d4d95ebad42990131e38386c3e /src/gns | |
parent | 0945dcf2c250dea65d520ef26f9917e9be3ac4ac (diff) | |
download | gnunet-2309bb75f368da8c44a90d741d78b5e7b8a04f42.tar.gz gnunet-2309bb75f368da8c44a90d741d78b5e7b8a04f42.zip |
change default port to 53, use setcap to enable binding to low port
Diffstat (limited to 'src/gns')
-rw-r--r-- | src/gns/Makefile.am | 10 | ||||
-rw-r--r-- | 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 | |||
69 | 69 | ||
70 | libexec_PROGRAMS = \ | 70 | libexec_PROGRAMS = \ |
71 | gnunet-service-gns \ | 71 | gnunet-service-gns \ |
72 | $(DO_W32_HELPER) \ | ||
73 | gnunet-dns2gns \ | 72 | gnunet-dns2gns \ |
73 | $(DO_W32_HELPER) \ | ||
74 | $(DO_PROXY) | 74 | $(DO_PROXY) |
75 | 75 | ||
76 | bin_PROGRAMS = \ | 76 | bin_PROGRAMS = \ |
@@ -136,6 +136,14 @@ gnunet_dns2gns_LDADD = \ | |||
136 | $(top_builddir)/src/dns/libgnunetdnsstub.la \ | 136 | $(top_builddir)/src/dns/libgnunetdnsstub.la \ |
137 | $(GN_LIBINTL) | 137 | $(GN_LIBINTL) |
138 | 138 | ||
139 | if LINUX | ||
140 | HIJACKBIN = gnunet-dns2gns | ||
141 | install-exec-hook: | ||
142 | $(SUDO_BINARY) setcap 'cap_net_bind_service=+ep' $(DESTDIR)$(libexecdir)/gnunet-dns2gns || true | ||
143 | else | ||
144 | install-exec-hook: | ||
145 | endif | ||
146 | |||
139 | gnunet_gns_proxy_SOURCES = \ | 147 | gnunet_gns_proxy_SOURCES = \ |
140 | gnunet-gns-proxy.c | 148 | gnunet-gns-proxy.c |
141 | gnunet_gns_proxy_CPPFLAGS = $(AM_CPPFLAGS) $(CPP_GNURL) | 149 | 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; | |||
138 | /** | 138 | /** |
139 | * UDP Port we listen on for inbound DNS requests. | 139 | * UDP Port we listen on for inbound DNS requests. |
140 | */ | 140 | */ |
141 | static unsigned int listen_port = 2853; | 141 | static unsigned int listen_port = 53; |
142 | 142 | ||
143 | /** | 143 | /** |
144 | * Which GNS zone do we translate incoming DNS requests to? | 144 | * Which GNS zone do we translate incoming DNS requests to? |
@@ -796,13 +796,17 @@ main (int argc, | |||
796 | }; | 796 | }; |
797 | int ret; | 797 | int ret; |
798 | 798 | ||
799 | if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, | 799 | if (GNUNET_OK != |
800 | &argc, &argv)) | 800 | GNUNET_STRINGS_get_utf8_args (argc, argv, |
801 | &argc, &argv)) | ||
801 | return 2; | 802 | return 2; |
802 | GNUNET_log_setup ("gnunet-dns2gns", "WARNING", NULL); | 803 | GNUNET_log_setup ("gnunet-dns2gns", |
804 | "WARNING", | ||
805 | NULL); | ||
803 | ret = | 806 | ret = |
804 | (GNUNET_OK == | 807 | (GNUNET_OK == |
805 | GNUNET_PROGRAM_run (argc, argv, "gnunet-dns2gns", | 808 | GNUNET_PROGRAM_run (argc, argv, |
809 | "gnunet-dns2gns", | ||
806 | _("GNUnet DNS-to-GNS proxy (a DNS server)"), | 810 | _("GNUnet DNS-to-GNS proxy (a DNS server)"), |
807 | options, | 811 | options, |
808 | &run, NULL)) ? 0 : 1; | 812 | &run, NULL)) ? 0 : 1; |