diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/arm/arm.conf.in | 6 | ||||
-rw-r--r-- | src/arm/gnunet-service-arm.c | 40 | ||||
-rw-r--r-- | src/credential/credential.conf.in | 4 | ||||
-rw-r--r-- | src/gns/gns.conf.in | 4 | ||||
-rw-r--r-- | src/identity-provider/identity-provider.conf | 2 | ||||
-rw-r--r-- | src/identity/identity.conf.in | 2 | ||||
-rw-r--r-- | src/include/gnunet_gnsrecord_lib.h | 4 | ||||
-rw-r--r-- | src/namecache/namecache.conf.in | 2 | ||||
-rw-r--r-- | src/namestore/namestore.conf.in | 2 | ||||
-rw-r--r-- | src/pt/test_gns_vpn.conf | 4 | ||||
-rw-r--r-- | src/social/social.conf.in | 2 | ||||
-rw-r--r-- | src/util/resolver_api.c | 5 | ||||
-rw-r--r-- | src/util/util.conf | 2 |
13 files changed, 44 insertions, 35 deletions
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; | |||
235 | static int in_shutdown; | 235 | static int in_shutdown; |
236 | 236 | ||
237 | /** | 237 | /** |
238 | * Return value from main | ||
239 | */ | ||
240 | static int global_ret; | ||
241 | |||
242 | /** | ||
238 | * Are we starting user services? | 243 | * Are we starting user services? |
239 | */ | 244 | */ |
240 | static int start_user = GNUNET_YES; | 245 | static 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 | |||
2260 | main (int argc, | 2264 | main (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] |
2 | BINARY = gnunet-service-credential | 2 | BINARY = gnunet-service-credential |
3 | UNIXPATH = $GNUNET_USER_RUNTIME_DIR/gnunet-service-credential.sock | 3 | UNIXPATH = $GNUNET_USER_RUNTIME_DIR/gnunet-service-credential.sock |
4 | USER_SERVICE = YES | 4 | RUN_PER_USER = YES |
5 | OPTIONS = -L DEBUG \ No newline at end of file | 5 | OPTIONS = -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] |
32 | BINARY = gnunet-gns-proxy | 32 | BINARY = gnunet-gns-proxy |
33 | AUTOSTART = NO | 33 | AUTOSTART = NO |
34 | USER_SERVICE = YES | 34 | RUN_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? |
37 | PROXY_CACERT = $GNUNET_DATA_HOME/gns/gns_ca_cert.pem | 37 | PROXY_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] |
42 | BINARY = gnunet-dns2gns | 42 | BINARY = gnunet-dns2gns |
43 | AUTOSTART = NO | 43 | AUTOSTART = NO |
44 | USER_SERVICE = YES | 44 | RUN_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 |
47 | OPTIONS = -d 8.8.8.8 | 47 | OPTIONS = -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] |
2 | AUTOSTART = NO | 2 | AUTOSTART = NO |
3 | USER_SERVICE = YES | 3 | RUN_PER_USER = YES |
4 | #PORT = 2108 | 4 | #PORT = 2108 |
5 | HOSTNAME = localhost | 5 | HOSTNAME = localhost |
6 | BINARY = gnunet-service-identity-provider | 6 | BINARY = 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] |
2 | AUTOSTART = @AUTOSTART@ | 2 | AUTOSTART = @AUTOSTART@ |
3 | USER_SERVICE = YES | 3 | RUN_PER_USER = YES |
4 | @JAVAPORT@PORT = 2108 | 4 | @JAVAPORT@PORT = 2108 |
5 | HOSTNAME = localhost | 5 | HOSTNAME = localhost |
6 | BINARY = gnunet-service-identity | 6 | BINARY = 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] |
2 | AUTOSTART = @AUTOSTART@ | 2 | AUTOSTART = @AUTOSTART@ |
3 | USER_SERVICE = NO | 3 | RUN_PER_USER = NO |
4 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-service-namecache.sock | 4 | UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-service-namecache.sock |
5 | UNIX_MATCH_UID = NO | 5 | UNIX_MATCH_UID = NO |
6 | UNIX_MATCH_GID = YES | 6 | UNIX_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] |
2 | AUTOSTART = @AUTOSTART@ | 2 | AUTOSTART = @AUTOSTART@ |
3 | USER_SERVICE = YES | 3 | RUN_PER_USER = YES |
4 | UNIXPATH = $GNUNET_USER_RUNTIME_DIR/gnunet-service-namestore.sock | 4 | UNIXPATH = $GNUNET_USER_RUNTIME_DIR/gnunet-service-namestore.sock |
5 | UNIX_MATCH_UID = NO | 5 | UNIX_MATCH_UID = NO |
6 | UNIX_MATCH_GID = YES | 6 | UNIX_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] |
8 | PORT = 0 | 8 | PORT = 0 |
9 | ALLOW_SHUTDOWN = YES | 9 | ALLOW_SHUTDOWN = YES |
10 | SYSTEM_ONLY = NO | 10 | START_SYSTEM_SERVICES = NO |
11 | USER_ONLY = NO | 11 | START_USER_SERVICES = NO |
12 | 12 | ||
13 | [exit] | 13 | [exit] |
14 | FORCESTART = YES | 14 | FORCESTART = 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] |
2 | AUTOSTART = @AUTOSTART@ | 2 | AUTOSTART = @AUTOSTART@ |
3 | BINARY = gnunet-service-social | 3 | BINARY = gnunet-service-social |
4 | USER_SERVICE = YES | 4 | RUN_PER_USER = YES |
5 | 5 | ||
6 | UNIXPATH = $GNUNET_USER_RUNTIME_DIR/gnunet-service-social.sock | 6 | UNIXPATH = $GNUNET_USER_RUNTIME_DIR/gnunet-service-social.sock |
7 | UNIX_MATCH_UID = YES | 7 | UNIX_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 |