aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Fuchs <christian.fuchs@cfuchs.net>2013-04-19 14:50:35 +0000
committerChristian Fuchs <christian.fuchs@cfuchs.net>2013-04-19 14:50:35 +0000
commit2660d770616a348aabb9480dcbafa4841ae84aa0 (patch)
tree64844d3cb78699f688a15b4dbb3daaf584c909e1 /src
parentc8fe1a3b7ce92edd1f4f2035103ed547123c3666 (diff)
downloadgnunet-2660d770616a348aabb9480dcbafa4841ae84aa0.tar.gz
gnunet-2660d770616a348aabb9480dcbafa4841ae84aa0.zip
added privilege testing parameters for helper-vpn, exit and nat-client.
todo: nat-server
Diffstat (limited to 'src')
-rw-r--r--src/exit/gnunet-daemon-exit.c2
-rw-r--r--src/nat/nat.c2
-rw-r--r--src/nat/nat_auto.c2
-rw-r--r--src/pt/test_gnunet_vpn.c8
-rw-r--r--src/vpn/gnunet-service-vpn.c2
5 files changed, 8 insertions, 8 deletions
diff --git a/src/exit/gnunet-daemon-exit.c b/src/exit/gnunet-daemon-exit.c
index 20f240b0d..72522e121 100644
--- a/src/exit/gnunet-daemon-exit.c
+++ b/src/exit/gnunet-daemon-exit.c
@@ -3344,7 +3344,7 @@ run (void *cls, char *const *args GNUNET_UNUSED,
3344 { 3344 {
3345 binary = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-exit"); 3345 binary = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-exit");
3346 if (GNUNET_YES != 3346 if (GNUNET_YES !=
3347 GNUNET_OS_check_helper_binary (binary, GNUNET_YES, NULL)) // FIXME: CF: add test-parameters 3347 GNUNET_OS_check_helper_binary (binary, GNUNET_YES, "-d gnunet-vpn - - - 169.1.3.3.7 255.255.255.0")) //no nat, ipv4 only
3348 { 3348 {
3349 GNUNET_free (binary); 3349 GNUNET_free (binary);
3350 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 3350 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
diff --git a/src/nat/nat.c b/src/nat/nat.c
index e1ec88028..84ca2efa2 100644
--- a/src/nat/nat.c
+++ b/src/nat/nat.c
@@ -1183,7 +1183,7 @@ GNUNET_NAT_register (const struct GNUNET_CONFIGURATION_Handle *cfg, int is_tcp,
1183 binary = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-nat-client"); 1183 binary = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-nat-client");
1184 if ((GNUNET_YES == h->enable_nat_client) && 1184 if ((GNUNET_YES == h->enable_nat_client) &&
1185 (GNUNET_YES != 1185 (GNUNET_YES !=
1186 GNUNET_OS_check_helper_binary (binary, GNUNET_YES, NULL))) // FIXME: CF: add test-parameters 1186 GNUNET_OS_check_helper_binary (binary, GNUNET_YES, "-d 127.0.0.1 127.0.0.2 42"))) // none of these parameters are actually used in privilege testing mode
1187 { 1187 {
1188 h->enable_nat_client = GNUNET_NO; 1188 h->enable_nat_client = GNUNET_NO;
1189 LOG (GNUNET_ERROR_TYPE_WARNING, 1189 LOG (GNUNET_ERROR_TYPE_WARNING,
diff --git a/src/nat/nat_auto.c b/src/nat/nat_auto.c
index edb2bb841..0c5bec118 100644
--- a/src/nat/nat_auto.c
+++ b/src/nat/nat_auto.c
@@ -461,7 +461,7 @@ test_icmp_client (struct GNUNET_NAT_AutoHandle *ah)
461 (GNUNET_YES != 461 (GNUNET_YES !=
462 GNUNET_CONFIGURATION_get_value_yesno (ah->cfg, "nat", "BEHIND_NAT")) && 462 GNUNET_CONFIGURATION_get_value_yesno (ah->cfg, "nat", "BEHIND_NAT")) &&
463 (GNUNET_YES == 463 (GNUNET_YES ==
464 GNUNET_OS_check_helper_binary (binary, GNUNET_YES, NULL))); // FIXME: CF: add test-parameters 464 GNUNET_OS_check_helper_binary (binary, GNUNET_YES, "-d 127.0.0.1 127.0.0.2 42"))); // none of these parameters are actually used in privilege testing mode
465 GNUNET_free_non_null (tmp); 465 GNUNET_free_non_null (tmp);
466 GNUNET_free (binary); 466 GNUNET_free (binary);
467 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 467 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
diff --git a/src/pt/test_gnunet_vpn.c b/src/pt/test_gnunet_vpn.c
index 52899d190..c8c7317fc 100644
--- a/src/pt/test_gnunet_vpn.c
+++ b/src/pt/test_gnunet_vpn.c
@@ -410,12 +410,12 @@ main (int argc, char *const *argv)
410 return 0; 410 return 0;
411 } 411 }
412#endif 412#endif
413 vpn_binary = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-vpn.exe"); 413 vpn_binary = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-vpn");
414 exit_binary = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-exit.exe"); 414 exit_binary = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-exit");
415 fprintf (stderr,"%s\n", vpn_binary); 415 fprintf (stderr,"%s\n", vpn_binary);
416 fprintf (stderr,"%s\n", exit_binary); 416 fprintf (stderr,"%s\n", exit_binary);
417 if ((GNUNET_YES != (ret = GNUNET_OS_check_helper_binary (vpn_binary, GNUNET_YES, NULL))) || // FIXME: CF: add test-parameters 417 if ((GNUNET_YES != (ret = GNUNET_OS_check_helper_binary (vpn_binary, GNUNET_YES, "-d gnunet-vpn - - 169.1.3.3.7 255.255.255.0"))) || //ipv4 only please!
418 (GNUNET_YES != (ret = GNUNET_OS_check_helper_binary (exit_binary, GNUNET_YES, NULL)))) // FIXME: CF: add test-parameters 418 (GNUNET_YES != (ret = GNUNET_OS_check_helper_binary (exit_binary, GNUNET_YES, "-d gnunet-vpn - - - 169.1.3.3.7 255.255.255.0")))) //no nat, ipv4 only
419 { 419 {
420 GNUNET_free (vpn_binary); 420 GNUNET_free (vpn_binary);
421 GNUNET_free (exit_binary); 421 GNUNET_free (exit_binary);
diff --git a/src/vpn/gnunet-service-vpn.c b/src/vpn/gnunet-service-vpn.c
index a7a1ca213..61bd977bc 100644
--- a/src/vpn/gnunet-service-vpn.c
+++ b/src/vpn/gnunet-service-vpn.c
@@ -3062,7 +3062,7 @@ run (void *cls,
3062 binary = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-vpn"); 3062 binary = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-vpn");
3063 3063
3064 if (GNUNET_YES != 3064 if (GNUNET_YES !=
3065 GNUNET_OS_check_helper_binary (binary, GNUNET_YES, NULL)) // FIXME: CF: add test-parameters 3065 GNUNET_OS_check_helper_binary (binary, GNUNET_YES, "-d gnunet-vpn - - 169.1.3.3.7 255.255.255.0")) //ipv4 only please!
3066 { 3066 {
3067 fprintf (stderr, 3067 fprintf (stderr,
3068 "`%s' is not SUID, refusing to run.\n", 3068 "`%s' is not SUID, refusing to run.\n",