diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-05-28 13:39:12 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-05-28 13:39:12 +0000 |
commit | 8677cba802a0616f73fd16efe7ecd89752fb442e (patch) | |
tree | 3d1dddf9088ed8cf41552faa1d02aba827197cc5 /src/dns | |
parent | 5b42c8e805cf5a60fc509c4016c212c3fe9ba806 (diff) | |
download | gnunet-8677cba802a0616f73fd16efe7ecd89752fb442e.tar.gz gnunet-8677cba802a0616f73fd16efe7ecd89752fb442e.zip |
also set permissions correctly if user 'gnunet' does not exist
Diffstat (limited to 'src/dns')
-rw-r--r-- | src/dns/Makefile.am | 253 | ||||
-rwxr-xr-x | src/dns/install-dns-helper.sh | 4 |
2 files changed, 129 insertions, 128 deletions
diff --git a/src/dns/Makefile.am b/src/dns/Makefile.am index f0143f90e..e2f9a0783 100644 --- a/src/dns/Makefile.am +++ b/src/dns/Makefile.am | |||
@@ -1,127 +1,126 @@ | |||
1 | # This Makefile.am is in the public domain | 1 | # This Makefile.am is in the public domain |
2 | AM_CPPFLAGS = -I$(top_srcdir)/src/include | 2 | AM_CPPFLAGS = -I$(top_srcdir)/src/include |
3 | 3 | ||
4 | if MINGW | 4 | if MINGW |
5 | WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols | 5 | WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols |
6 | endif | 6 | endif |
7 | 7 | ||
8 | if USE_COVERAGE | 8 | if USE_COVERAGE |
9 | AM_CFLAGS = --coverage -O0 | 9 | AM_CFLAGS = --coverage -O0 |
10 | endif | 10 | endif |
11 | 11 | ||
12 | pkgcfgdir= $(pkgdatadir)/config.d/ | 12 | pkgcfgdir= $(pkgdatadir)/config.d/ |
13 | 13 | ||
14 | libexecdir= $(pkglibdir)/libexec/ | 14 | libexecdir= $(pkglibdir)/libexec/ |
15 | 15 | ||
16 | plugindir = $(libdir)/gnunet | 16 | plugindir = $(libdir)/gnunet |
17 | 17 | ||
18 | pkgcfg_DATA = \ | 18 | pkgcfg_DATA = \ |
19 | dns.conf | 19 | dns.conf |
20 | 20 | ||
21 | if LINUX | 21 | if LINUX |
22 | HIJACKBIN = gnunet-helper-dns | 22 | HIJACKBIN = gnunet-helper-dns |
23 | install-exec-hook: | 23 | install-exec-hook: |
24 | $(top_srcdir)/src/dns/install-dns-helper.sh $(libexecdir) $(GNUNETDNS_GROUP) $(SUDO_BINARY) || true | 24 | $(top_srcdir)/src/dns/install-dns-helper.sh $(libexecdir) $(GNUNETDNS_GROUP) $(SUDO_BINARY) || true |
25 | else | 25 | else |
26 | install-exec-hook: | 26 | install-exec-hook: |
27 | endif | 27 | endif |
28 | 28 | ||
29 | lib_LTLIBRARIES = \ | 29 | lib_LTLIBRARIES = \ |
30 | libgnunetdnsparser.la \ | 30 | libgnunetdnsparser.la \ |
31 | libgnunetdnsstub.la \ | 31 | libgnunetdnsstub.la \ |
32 | libgnunetdns.la | 32 | libgnunetdns.la |
33 | 33 | ||
34 | libexec_PROGRAMS = \ | 34 | libexec_PROGRAMS = \ |
35 | gnunet-service-dns $(HIJACKBIN) | 35 | gnunet-service-dns $(HIJACKBIN) |
36 | 36 | ||
37 | noinst_PROGRAMS = \ | 37 | noinst_PROGRAMS = \ |
38 | gnunet-dns-monitor gnunet-dns-redirector | 38 | gnunet-dns-monitor gnunet-dns-redirector |
39 | 39 | ||
40 | plugin_LTLIBRARIES = \ | 40 | plugin_LTLIBRARIES = \ |
41 | libgnunet_plugin_block_dns.la | 41 | libgnunet_plugin_block_dns.la |
42 | 42 | ||
43 | if LINUX | 43 | if LINUX |
44 | check_SCRIPTS = \ | 44 | check_SCRIPTS = \ |
45 | test_gnunet_dns.sh | 45 | test_gnunet_dns.sh |
46 | endif | 46 | endif |
47 | 47 | ||
48 | check_PROGRAMS = \ | 48 | check_PROGRAMS = \ |
49 | test_hexcoder | 49 | test_hexcoder |
50 | 50 | ||
51 | gnunet_helper_dns_SOURCES = \ | 51 | gnunet_helper_dns_SOURCES = \ |
52 | gnunet-helper-dns.c | 52 | gnunet-helper-dns.c |
53 | 53 | ||
54 | 54 | ||
55 | gnunet_dns_monitor_SOURCES = \ | 55 | gnunet_dns_monitor_SOURCES = \ |
56 | gnunet-dns-monitor.c | 56 | gnunet-dns-monitor.c |
57 | gnunet_dns_monitor_LDADD = \ | 57 | gnunet_dns_monitor_LDADD = \ |
58 | libgnunetdnsparser.la \ | 58 | libgnunetdnsparser.la \ |
59 | libgnunetdns.la \ | 59 | libgnunetdns.la \ |
60 | $(top_builddir)/src/util/libgnunetutil.la \ | 60 | $(top_builddir)/src/util/libgnunetutil.la \ |
61 | $(GN_LIBINTL) | 61 | $(GN_LIBINTL) |
62 | 62 | ||
63 | gnunet_dns_redirector_SOURCES = \ | 63 | gnunet_dns_redirector_SOURCES = \ |
64 | gnunet-dns-redirector.c | 64 | gnunet-dns-redirector.c |
65 | gnunet_dns_redirector_LDADD = \ | 65 | gnunet_dns_redirector_LDADD = \ |
66 | libgnunetdnsparser.la \ | 66 | libgnunetdnsparser.la \ |
67 | libgnunetdns.la \ | 67 | libgnunetdns.la \ |
68 | $(top_builddir)/src/util/libgnunetutil.la \ | 68 | $(top_builddir)/src/util/libgnunetutil.la \ |
69 | $(GN_LIBINTL) | 69 | $(GN_LIBINTL) |
70 | 70 | ||
71 | gnunet_service_dns_SOURCES = \ | 71 | gnunet_service_dns_SOURCES = \ |
72 | gnunet-service-dns.c | 72 | gnunet-service-dns.c |
73 | gnunet_service_dns_LDADD = \ | 73 | gnunet_service_dns_LDADD = \ |
74 | libgnunetdnsstub.la \ | 74 | libgnunetdnsstub.la \ |
75 | $(top_builddir)/src/tun/libgnunettun.la \ | 75 | $(top_builddir)/src/tun/libgnunettun.la \ |
76 | $(top_builddir)/src/statistics/libgnunetstatistics.la \ | 76 | $(top_builddir)/src/statistics/libgnunetstatistics.la \ |
77 | $(top_builddir)/src/util/libgnunetutil.la \ | 77 | $(top_builddir)/src/util/libgnunetutil.la \ |
78 | $(GN_LIBINTL) | 78 | $(GN_LIBINTL) |
79 | 79 | ||
80 | libgnunetdnsparser_la_SOURCES = \ | 80 | libgnunetdnsparser_la_SOURCES = \ |
81 | dnsparser.c | 81 | dnsparser.c |
82 | libgnunetdnsparser_la_LIBADD = \ | 82 | libgnunetdnsparser_la_LIBADD = \ |
83 | $(top_builddir)/src/util/libgnunetutil.la $(XLIB) \ | 83 | $(top_builddir)/src/util/libgnunetutil.la $(XLIB) \ |
84 | -lidn | 84 | -lidn |
85 | libgnunetdnsparser_la_LDFLAGS = \ | 85 | libgnunetdnsparser_la_LDFLAGS = \ |
86 | $(GN_LIB_LDFLAGS) \ | 86 | $(GN_LIB_LDFLAGS) \ |
87 | -version-info 1:0:1 | 87 | -version-info 1:0:1 |
88 | 88 | ||
89 | libgnunetdnsstub_la_SOURCES = \ | 89 | libgnunetdnsstub_la_SOURCES = \ |
90 | dnsstub.c | 90 | dnsstub.c |
91 | libgnunetdnsstub_la_LIBADD = \ | 91 | libgnunetdnsstub_la_LIBADD = \ |
92 | $(top_builddir)/src/util/libgnunetutil.la $(XLIB) | 92 | $(top_builddir)/src/util/libgnunetutil.la $(XLIB) |
93 | libgnunetdnsstub_la_LDFLAGS = \ | 93 | libgnunetdnsstub_la_LDFLAGS = \ |
94 | $(GN_LIB_LDFLAGS) \ | 94 | $(GN_LIB_LDFLAGS) \ |
95 | -version-info 0:0:0 | 95 | -version-info 0:0:0 |
96 | 96 | ||
97 | libgnunetdns_la_SOURCES = \ | 97 | libgnunetdns_la_SOURCES = \ |
98 | dns_api.c dns.h | 98 | dns_api.c dns.h |
99 | libgnunetdns_la_LIBADD = \ | 99 | libgnunetdns_la_LIBADD = \ |
100 | $(top_builddir)/src/util/libgnunetutil.la $(XLIB) | 100 | $(top_builddir)/src/util/libgnunetutil.la $(XLIB) |
101 | libgnunetdns_la_LDFLAGS = \ | 101 | libgnunetdns_la_LDFLAGS = \ |
102 | $(GN_LIB_LDFLAGS) \ | 102 | $(GN_LIB_LDFLAGS) \ |
103 | -version-info 0:0:0 | 103 | -version-info 0:0:0 |
104 | 104 | ||
105 | libgnunet_plugin_block_dns_la_SOURCES = \ | 105 | libgnunet_plugin_block_dns_la_SOURCES = \ |
106 | plugin_block_dns.c | 106 | plugin_block_dns.c |
107 | libgnunet_plugin_block_dns_la_LIBADD = \ | 107 | libgnunet_plugin_block_dns_la_LIBADD = \ |
108 | $(top_builddir)/src/util/libgnunetutil.la | 108 | $(top_builddir)/src/util/libgnunetutil.la |
109 | libgnunet_plugin_block_dns_la_LDFLAGS = \ | 109 | libgnunet_plugin_block_dns_la_LDFLAGS = \ |
110 | $(top_builddir)/src/block/$(GN_PLUGIN_LDFLAGS) | 110 | $(top_builddir)/src/block/$(GN_PLUGIN_LDFLAGS) |
111 | 111 | ||
112 | 112 | ||
113 | if ENABLE_TEST_RUN | 113 | if ENABLE_TEST_RUN |
114 | AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH; | 114 | AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH; |
115 | TESTS = $(check_PROGRAMS) $(check_SCRIPTS) | 115 | TESTS = $(check_PROGRAMS) $(check_SCRIPTS) |
116 | endif | 116 | endif |
117 | 117 | ||
118 | EXTRA_DIST = \ | 118 | EXTRA_DIST = \ |
119 | $(check_SCRIPTS) | 119 | $(check_SCRIPTS) |
120 | 120 | ||
121 | 121 | ||
122 | test_hexcoder_SOURCES = \ | 122 | test_hexcoder_SOURCES = \ |
123 | test_hexcoder.c | 123 | test_hexcoder.c |
124 | test_hexcoder_LDADD = \ | 124 | test_hexcoder_LDADD = \ |
125 | libgnunetdnsparser.la \ | 125 | libgnunetdnsparser.la \ |
126 | $(top_builddir)/src/util/libgnunetutil.la | 126 | $(top_builddir)/src/util/libgnunetutil.la |
127 | |||
diff --git a/src/dns/install-dns-helper.sh b/src/dns/install-dns-helper.sh index 0e7b86b36..14d5caa70 100755 --- a/src/dns/install-dns-helper.sh +++ b/src/dns/install-dns-helper.sh | |||
@@ -5,6 +5,8 @@ | |||
5 | $3 chown root $1/gnunet-helper-dns | 5 | $3 chown root $1/gnunet-helper-dns |
6 | $3 chgrp $2 $1/gnunet-helper-dns | 6 | $3 chgrp $2 $1/gnunet-helper-dns |
7 | $3 chmod 4750 $1/gnunet-helper-dns | 7 | $3 chmod 4750 $1/gnunet-helper-dns |
8 | # In case user 'gnunet' does not exist, at least set the group | ||
9 | $3 chgrp $2 $1/gnunet-service-dns | ||
10 | # Usually we want both... | ||
8 | $3 chown gnunet:$2 $1/gnunet-service-dns | 11 | $3 chown gnunet:$2 $1/gnunet-service-dns |
9 | $3 chmod 2750 $1/gnunet-service-dns | 12 | $3 chmod 2750 $1/gnunet-service-dns |
10 | |||