aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/ci/docker/Dockerfile2
-rw-r--r--doc/documentation/chapters/developer.texi8
-rw-r--r--doc/documentation/chapters/user.texi8
-rw-r--r--doc/man/gnunet.conf.56
-rw-r--r--src/arm/arm.conf.in6
-rw-r--r--src/arm/gnunet-service-arm.c40
-rw-r--r--src/credential/credential.conf.in4
-rw-r--r--src/gns/gns.conf.in4
-rw-r--r--src/identity-provider/identity-provider.conf2
-rw-r--r--src/identity/identity.conf.in2
-rw-r--r--src/include/gnunet_gnsrecord_lib.h4
-rw-r--r--src/namecache/namecache.conf.in2
-rw-r--r--src/namestore/namestore.conf.in2
-rw-r--r--src/pt/test_gns_vpn.conf4
-rw-r--r--src/social/social.conf.in2
-rw-r--r--src/util/resolver_api.c5
-rw-r--r--src/util/util.conf2
17 files changed, 56 insertions, 47 deletions
diff --git a/contrib/ci/docker/Dockerfile b/contrib/ci/docker/Dockerfile
index 42c64eaf3..b9f019c43 100644
--- a/contrib/ci/docker/Dockerfile
+++ b/contrib/ci/docker/Dockerfile
@@ -22,7 +22,7 @@ RUN cd /usr/src/gnunet && ./bootstrap && ./configure --enable-experimental --pre
22 22
23RUN addgroup gnunetdns && addgroup gnunet && adduser --system --home /var/lib/gnunet gnunet 23RUN addgroup gnunetdns && addgroup gnunet && adduser --system --home /var/lib/gnunet gnunet
24RUN chown gnunet:gnunet /var/lib/gnunet 24RUN chown gnunet:gnunet /var/lib/gnunet
25RUN echo '[arm]\nSYSTEM_ONLY = YES\nUSER_ONLY = NO\n' > /etc/gnunet.conf 25RUN echo '[arm]\nSTART_SYSTEM_SERVICES = YES\nSTART_USER_SERVICES = NO\n' > /etc/gnunet.conf
26 26
27ADD docker-entrypoint.sh . 27ADD docker-entrypoint.sh .
28 28
diff --git a/doc/documentation/chapters/developer.texi b/doc/documentation/chapters/developer.texi
index 10319e7a6..6d85c813f 100644
--- a/doc/documentation/chapters/developer.texi
+++ b/doc/documentation/chapters/developer.texi
@@ -1362,8 +1362,8 @@ Next, edit the file @file{/etc/gnunet.conf} to contain the following:
1362 1362
1363@example 1363@example
1364[arm] 1364[arm]
1365SYSTEM_ONLY = YES 1365START_SYSTEM_SERVICES = YES
1366USER_ONLY = NO 1366START_USER_SERVICES = NO
1367@end example 1367@end example
1368 1368
1369@noindent 1369@noindent
@@ -1409,8 +1409,8 @@ with the lines:
1409 1409
1410@example 1410@example
1411[arm] 1411[arm]
1412SYSTEM_ONLY = NO 1412START_SYSTEM_SERVICES = NO
1413USER_ONLY = YES 1413START_USER_SERVICES = YES
1414DEFAULTSERVICES = gns 1414DEFAULTSERVICES = gns
1415@end example 1415@end example
1416 1416
diff --git a/doc/documentation/chapters/user.texi b/doc/documentation/chapters/user.texi
index 07dd781b0..fa742b229 100644
--- a/doc/documentation/chapters/user.texi
+++ b/doc/documentation/chapters/user.texi
@@ -3742,8 +3742,8 @@ contain the lines:@
3742 3742
3743@example 3743@example
3744[arm] 3744[arm]
3745SYSTEM_ONLY = YES 3745START_SYSTEM_SERVICES = YES
3746USER_ONLY = NO 3746START_USER_SERVICES = NO
3747@end example 3747@end example
3748 3748
3749@noindent 3749@noindent
@@ -3771,8 +3771,8 @@ $USER with the lines:
3771 3771
3772@example 3772@example
3773[arm] 3773[arm]
3774SYSTEM_ONLY = NO 3774START_SYSTEM_SERVICES = NO
3775USER_ONLY = YES 3775START_USER_SERVICES = YES
3776@end example 3776@end example
3777 3777
3778@noindent 3778@noindent
diff --git a/doc/man/gnunet.conf.5 b/doc/man/gnunet.conf.5
index 707964579..1a94a0a66 100644
--- a/doc/man/gnunet.conf.5
+++ b/doc/man/gnunet.conf.5
@@ -88,7 +88,7 @@ The following options are generic and shared by all services:
88.IP UNIX_MATCH_GID 88.IP UNIX_MATCH_GID
89 If UNIX domain sockets are used, set this to YES if only users with the same 89 If UNIX domain sockets are used, set this to YES if only users with the same
90 GID are allowed to access the service. 90 GID are allowed to access the service.
91.IP USER_SERVICE 91.IP RUN_PER_USER
92 Set to YES if this service should be run per-user, NO if this is a system 92 Set to YES if this service should be run per-user, NO if this is a system
93 service. End-users should never have to change the defaults GNUnet provides 93 service. End-users should never have to change the defaults GNUnet provides
94 for this option. 94 for this option.
@@ -137,8 +137,8 @@ to the actual external address for your usage.
137 EXTERNAL_ADDRESS = 157.166.249.10 137 EXTERNAL_ADDRESS = 157.166.249.10
138 138
139 [arm] 139 [arm]
140 SYSTEM_ONLY = YES 140 START_SYSTEM_SERVICES = YES
141 USER_ONLY = NO 141 START_USER_SERVICES = NO
142 142
143.SH FILES 143.SH FILES
144.TP 144.TP
diff --git a/src/arm/arm.conf.in b/src/arm/arm.conf.in
index 38cf4599c..64ae35786 100644
--- a/src/arm/arm.conf.in
+++ b/src/arm/arm.conf.in
@@ -22,9 +22,9 @@ GLOBAL_PREFIX = @MONKEYPREFIX@
22# system-level services (and we'll expect a second ARM to be 22# system-level services (and we'll expect a second ARM to be
23# run per-user to run user-level services). Note that in this 23# run per-user to run user-level services). Note that in this
24# case you must have manually created a different configuration 24# case you must have manually created a different configuration
25# file with the user where at least this and the USER_ONLY 25# file with the user where at least this and the START_USER_SERVICES
26# options differ. 26# options differ.
27# SYSTEM_ONLY = YES 27# START_SYSTEM_SERVICES = YES
28 28
29# If set to YES, ARM will only start services that are marked as 29# If set to YES, ARM will only start services that are marked as
30# per-user services (and we'll expect a system user to run ARM to 30# per-user services (and we'll expect a system user to run ARM to
@@ -39,7 +39,7 @@ GLOBAL_PREFIX = @MONKEYPREFIX@
39# USER ARM instances to some free port (counting down from 2085 should 39# USER ARM instances to some free port (counting down from 2085 should
40# be sane). 40# be sane).
41# 41#
42# USER_ONLY = YES 42# START_USER_SERVICES = YES
43 43
44# File where we should log per-service resource consumption on exit. 44# File where we should log per-service resource consumption on exit.
45# RESOURCE_DIAGNOSTICS = resource.log 45# RESOURCE_DIAGNOSTICS = resource.log
diff --git a/src/arm/gnunet-service-arm.c b/src/arm/gnunet-service-arm.c
index b56c9c0a8..f7a59c5fb 100644
--- a/src/arm/gnunet-service-arm.c
+++ b/src/arm/gnunet-service-arm.c
@@ -235,6 +235,11 @@ static struct GNUNET_DISK_PipeHandle *sigpipe;
235static int in_shutdown; 235static int in_shutdown;
236 236
237/** 237/**
238 * Return value from main
239 */
240static int global_ret;
241
242/**
238 * Are we starting user services? 243 * Are we starting user services?
239 */ 244 */
240static int start_user = GNUNET_YES; 245static int start_user = GNUNET_YES;
@@ -1985,11 +1990,11 @@ setup_service (void *cls,
1985 if ((GNUNET_YES == 1990 if ((GNUNET_YES ==
1986 GNUNET_CONFIGURATION_have_value (cfg, 1991 GNUNET_CONFIGURATION_have_value (cfg,
1987 section, 1992 section,
1988 "USER_SERVICE")) && 1993 "RUN_PER_USER")) &&
1989 (GNUNET_YES == 1994 (GNUNET_YES ==
1990 GNUNET_CONFIGURATION_get_value_yesno (cfg, 1995 GNUNET_CONFIGURATION_get_value_yesno (cfg,
1991 section, 1996 section,
1992 "USER_SERVICE"))) 1997 "RUN_PER_USER")))
1993 { 1998 {
1994 if (GNUNET_NO == start_user) 1999 if (GNUNET_NO == start_user)
1995 { 2000 {
@@ -2219,21 +2224,20 @@ run (void *cls,
2219 else 2224 else
2220 final_option = GNUNET_CONFIGURATION_expand_dollar (cfg, 2225 final_option = GNUNET_CONFIGURATION_expand_dollar (cfg,
2221 final_option); 2226 final_option);
2222 if (GNUNET_YES == 2227 start_user = GNUNET_CONFIGURATION_get_value_yesno (cfg,
2223 GNUNET_CONFIGURATION_get_value_yesno (cfg,
2224 "ARM", 2228 "ARM",
2225 "USER_ONLY")) 2229 "START_USER_SERVICES");
2226 { 2230 start_system = GNUNET_CONFIGURATION_get_value_yesno (cfg,
2227 GNUNET_break (GNUNET_YES == start_user);
2228 start_system = GNUNET_NO;
2229 }
2230 if (GNUNET_YES ==
2231 GNUNET_CONFIGURATION_get_value_yesno (cfg,
2232 "ARM", 2231 "ARM",
2233 "SYSTEM_ONLY")) 2232 "START_SYSTEM_SERVICES");
2233 if ( (GNUNET_NO == start_user) &&
2234 (GNUNET_NO == start_system) )
2234 { 2235 {
2235 GNUNET_break (GNUNET_YES == start_system); 2236 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
2236 start_user = GNUNET_NO; 2237 "Please configure either START_USER_SERVICES or START_SYSTEM_SERVICES or both.\n");
2238 GNUNET_SCHEDULER_shutdown ();
2239 global_ret = 1;
2240 return;
2237 } 2241 }
2238 GNUNET_CONFIGURATION_iterate_sections (cfg, 2242 GNUNET_CONFIGURATION_iterate_sections (cfg,
2239 &setup_service, 2243 &setup_service,
@@ -2260,7 +2264,6 @@ int
2260main (int argc, 2264main (int argc,
2261 char *const *argv) 2265 char *const *argv)
2262{ 2266{
2263 int ret;
2264 struct GNUNET_SIGNAL_Context *shc_chld; 2267 struct GNUNET_SIGNAL_Context *shc_chld;
2265 struct GNUNET_MQ_MessageHandler handlers[] = { 2268 struct GNUNET_MQ_MessageHandler handlers[] = {
2266 GNUNET_MQ_hd_var_size (start, 2269 GNUNET_MQ_hd_var_size (start,
@@ -2294,7 +2297,7 @@ main (int argc,
2294 shc_chld = 2297 shc_chld =
2295 GNUNET_SIGNAL_handler_install (GNUNET_SIGCHLD, 2298 GNUNET_SIGNAL_handler_install (GNUNET_SIGCHLD,
2296 &sighandler_child_death); 2299 &sighandler_child_death);
2297 ret = GNUNET_SERVICE_run_ (argc, 2300 if ( GNUNET_OK != GNUNET_SERVICE_run_ (argc,
2298 argv, 2301 argv,
2299 "arm", 2302 "arm",
2300 GNUNET_SERVICE_OPTION_MANUAL_SHUTDOWN, 2303 GNUNET_SERVICE_OPTION_MANUAL_SHUTDOWN,
@@ -2302,7 +2305,8 @@ main (int argc,
2302 &client_connect_cb, 2305 &client_connect_cb,
2303 &client_disconnect_cb, 2306 &client_disconnect_cb,
2304 NULL, 2307 NULL,
2305 handlers); 2308 handlers))
2309 global_ret = 2;
2306#if HAVE_WAIT4 2310#if HAVE_WAIT4
2307 if (NULL != wait_file) 2311 if (NULL != wait_file)
2308 { 2312 {
@@ -2319,7 +2323,7 @@ main (int argc,
2319 shc_chld = NULL; 2323 shc_chld = NULL;
2320 GNUNET_DISK_pipe_close (sigpipe); 2324 GNUNET_DISK_pipe_close (sigpipe);
2321 sigpipe = NULL; 2325 sigpipe = NULL;
2322 return ret; 2326 return global_ret;
2323} 2327}
2324 2328
2325 2329
diff --git a/src/credential/credential.conf.in b/src/credential/credential.conf.in
index 71f3066ca..d5a0b1c88 100644
--- a/src/credential/credential.conf.in
+++ b/src/credential/credential.conf.in
@@ -1,5 +1,5 @@
1[credential] 1[credential]
2BINARY = gnunet-service-credential 2BINARY = gnunet-service-credential
3UNIXPATH = $GNUNET_USER_RUNTIME_DIR/gnunet-service-credential.sock 3UNIXPATH = $GNUNET_USER_RUNTIME_DIR/gnunet-service-credential.sock
4USER_SERVICE = YES 4RUN_PER_USER = YES
5OPTIONS = -L DEBUG \ No newline at end of file 5OPTIONS = -L DEBUG
diff --git a/src/gns/gns.conf.in b/src/gns/gns.conf.in
index de50d1047..323129a1e 100644
--- a/src/gns/gns.conf.in
+++ b/src/gns/gns.conf.in
@@ -31,7 +31,7 @@ INTERCEPT_DNS = NO
31[gns-proxy] 31[gns-proxy]
32BINARY = gnunet-gns-proxy 32BINARY = gnunet-gns-proxy
33AUTOSTART = NO 33AUTOSTART = NO
34USER_SERVICE = YES 34RUN_PER_USER = YES
35 35
36# Where is the certificate for the GNS proxy stored? 36# Where is the certificate for the GNS proxy stored?
37PROXY_CACERT = $GNUNET_DATA_HOME/gns/gns_ca_cert.pem 37PROXY_CACERT = $GNUNET_DATA_HOME/gns/gns_ca_cert.pem
@@ -41,7 +41,7 @@ PROXY_UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-gns-proxy.sock
41[dns2gns] 41[dns2gns]
42BINARY = gnunet-dns2gns 42BINARY = gnunet-dns2gns
43AUTOSTART = NO 43AUTOSTART = NO
44USER_SERVICE = YES 44RUN_PER_USER = YES
45 45
46# -d: DNS resolver to use, -s: suffix to use, -f: fcfs suffix to use 46# -d: DNS resolver to use, -s: suffix to use, -f: fcfs suffix to use
47OPTIONS = -d 8.8.8.8 47OPTIONS = -d 8.8.8.8
diff --git a/src/identity-provider/identity-provider.conf b/src/identity-provider/identity-provider.conf
index f2c24c32d..3d4e340a6 100644
--- a/src/identity-provider/identity-provider.conf
+++ b/src/identity-provider/identity-provider.conf
@@ -1,6 +1,6 @@
1[identity-provider] 1[identity-provider]
2AUTOSTART = NO 2AUTOSTART = NO
3USER_SERVICE = YES 3RUN_PER_USER = YES
4#PORT = 2108 4#PORT = 2108
5HOSTNAME = localhost 5HOSTNAME = localhost
6BINARY = gnunet-service-identity-provider 6BINARY = gnunet-service-identity-provider
diff --git a/src/identity/identity.conf.in b/src/identity/identity.conf.in
index 4af3a6261..32855c02d 100644
--- a/src/identity/identity.conf.in
+++ b/src/identity/identity.conf.in
@@ -1,6 +1,6 @@
1[identity] 1[identity]
2AUTOSTART = @AUTOSTART@ 2AUTOSTART = @AUTOSTART@
3USER_SERVICE = YES 3RUN_PER_USER = YES
4@JAVAPORT@PORT = 2108 4@JAVAPORT@PORT = 2108
5HOSTNAME = localhost 5HOSTNAME = localhost
6BINARY = gnunet-service-identity 6BINARY = gnunet-service-identity
diff --git a/src/include/gnunet_gnsrecord_lib.h b/src/include/gnunet_gnsrecord_lib.h
index b3f1eb632..20846238b 100644
--- a/src/include/gnunet_gnsrecord_lib.h
+++ b/src/include/gnunet_gnsrecord_lib.h
@@ -499,10 +499,10 @@ GNUNET_GNSRECORD_pkey_to_zkey (const struct GNUNET_CRYPTO_EcdsaPublicKey *pkey);
499 499
500 500
501/** 501/**
502 * Convert an absolute domain name in the ".zkey" pTLD to the 502 * Convert an absolute domain name to the
503 * respective public key. 503 * respective public key.
504 * 504 *
505 * @param zkey string "X.zkey" where X is the public 505 * @param zkey string "X" where X is the public
506 * key in an encoding suitable for DNS labels. 506 * key in an encoding suitable for DNS labels.
507 * @param pkey set to a public key on the eliptic curve 507 * @param pkey set to a public key on the eliptic curve
508 * @return #GNUNET_SYSERR if @a zkey has the wrong syntax 508 * @return #GNUNET_SYSERR if @a zkey has the wrong syntax
diff --git a/src/namecache/namecache.conf.in b/src/namecache/namecache.conf.in
index becd34187..27062ca82 100644
--- a/src/namecache/namecache.conf.in
+++ b/src/namecache/namecache.conf.in
@@ -1,6 +1,6 @@
1[namecache] 1[namecache]
2AUTOSTART = @AUTOSTART@ 2AUTOSTART = @AUTOSTART@
3USER_SERVICE = NO 3RUN_PER_USER = NO
4UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-service-namecache.sock 4UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-service-namecache.sock
5UNIX_MATCH_UID = NO 5UNIX_MATCH_UID = NO
6UNIX_MATCH_GID = YES 6UNIX_MATCH_GID = YES
diff --git a/src/namestore/namestore.conf.in b/src/namestore/namestore.conf.in
index 8b5e440b8..94e158609 100644
--- a/src/namestore/namestore.conf.in
+++ b/src/namestore/namestore.conf.in
@@ -1,6 +1,6 @@
1[namestore] 1[namestore]
2AUTOSTART = @AUTOSTART@ 2AUTOSTART = @AUTOSTART@
3USER_SERVICE = YES 3RUN_PER_USER = YES
4UNIXPATH = $GNUNET_USER_RUNTIME_DIR/gnunet-service-namestore.sock 4UNIXPATH = $GNUNET_USER_RUNTIME_DIR/gnunet-service-namestore.sock
5UNIX_MATCH_UID = NO 5UNIX_MATCH_UID = NO
6UNIX_MATCH_GID = YES 6UNIX_MATCH_GID = YES
diff --git a/src/pt/test_gns_vpn.conf b/src/pt/test_gns_vpn.conf
index c603b7422..7447322d4 100644
--- a/src/pt/test_gns_vpn.conf
+++ b/src/pt/test_gns_vpn.conf
@@ -7,8 +7,8 @@ PLUGINS = tcp
7[arm] 7[arm]
8PORT = 0 8PORT = 0
9ALLOW_SHUTDOWN = YES 9ALLOW_SHUTDOWN = YES
10SYSTEM_ONLY = NO 10START_SYSTEM_SERVICES = NO
11USER_ONLY = NO 11START_USER_SERVICES = NO
12 12
13[exit] 13[exit]
14FORCESTART = YES 14FORCESTART = YES
diff --git a/src/social/social.conf.in b/src/social/social.conf.in
index 33b14e5b4..7dfa140e6 100644
--- a/src/social/social.conf.in
+++ b/src/social/social.conf.in
@@ -1,7 +1,7 @@
1[social] 1[social]
2AUTOSTART = @AUTOSTART@ 2AUTOSTART = @AUTOSTART@
3BINARY = gnunet-service-social 3BINARY = gnunet-service-social
4USER_SERVICE = YES 4RUN_PER_USER = YES
5 5
6UNIXPATH = $GNUNET_USER_RUNTIME_DIR/gnunet-service-social.sock 6UNIXPATH = $GNUNET_USER_RUNTIME_DIR/gnunet-service-social.sock
7UNIX_MATCH_UID = YES 7UNIX_MATCH_UID = YES
diff --git a/src/util/resolver_api.c b/src/util/resolver_api.c
index b2e6a4986..afebabf08 100644
--- a/src/util/resolver_api.c
+++ b/src/util/resolver_api.c
@@ -180,6 +180,11 @@ check_config ()
180 struct sockaddr_in v4; 180 struct sockaddr_in v4;
181 struct sockaddr_in6 v6; 181 struct sockaddr_in6 v6;
182 182
183 if (GNUNET_OK ==
184 GNUNET_CONFIGURATION_have_value (resolver_cfg,
185 "resolver",
186 "UNIXPATH"))
187 return GNUNET_OK;
183 memset (&v4, 0, sizeof (v4)); 188 memset (&v4, 0, sizeof (v4));
184 v4.sin_addr.s_addr = htonl (INADDR_LOOPBACK); 189 v4.sin_addr.s_addr = htonl (INADDR_LOOPBACK);
185 v4.sin_family = AF_INET; 190 v4.sin_family = AF_INET;
diff --git a/src/util/util.conf b/src/util/util.conf
index f2e5bee28..dbc2b2e0d 100644
--- a/src/util/util.conf
+++ b/src/util/util.conf
@@ -25,7 +25,7 @@ GNUNET_CACHE_HOME = ${XDG_CACHE_HOME:-$GNUNET_HOME/.cache}/gnunet/
25 25
26# Runtime data (i.e UNIX domain sockets, locks, always lost on system boot) 26# Runtime data (i.e UNIX domain sockets, locks, always lost on system boot)
27# This is the variable for system-wide services; use GNUNET_USER_RUNTIME_DIR 27# This is the variable for system-wide services; use GNUNET_USER_RUNTIME_DIR
28# for per-user services (where USER_SERVICE=YES is set) 28# for per-user services (where RUN_PER_USER=YES is set)
29# Note that the 'gnunet'/system user must have $TMPDIR/$TMP set to 29# Note that the 'gnunet'/system user must have $TMPDIR/$TMP set to
30# exactly the same values as 'normal' users, otherwise this will fail. 30# exactly the same values as 'normal' users, otherwise this will fail.
31# If $TMPDIR or $TMP are set to different directories for different 31# If $TMPDIR or $TMP are set to different directories for different