aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Fuchs <christian.fuchs@cfuchs.net>2013-04-19 14:58:06 +0000
committerChristian Fuchs <christian.fuchs@cfuchs.net>2013-04-19 14:58:06 +0000
commit1079f746c943b2efffa28970fe03f679334c3bb3 (patch)
tree84772e454aafeb26dc13cc6ed6455fb7c40bc10d
parent2660d770616a348aabb9480dcbafa4841ae84aa0 (diff)
downloadgnunet-1079f746c943b2efffa28970fe03f679334c3bb3.tar.gz
gnunet-1079f746c943b2efffa28970fe03f679334c3bb3.zip
added privilege testing parameters for nat-server and added parameters
to currently windows-only tests (less work in the future, even if this is ATM unused)
-rw-r--r--src/dns/gnunet-service-dns.c2
-rw-r--r--src/gns/test_gns_proxy.c2
-rw-r--r--src/nat/nat.c2
-rw-r--r--src/nat/nat_auto.c2
-rw-r--r--src/pt/test_gns_vpn.c6
5 files changed, 7 insertions, 7 deletions
diff --git a/src/dns/gnunet-service-dns.c b/src/dns/gnunet-service-dns.c
index b7ecee0d7..5e9de5f4d 100644
--- a/src/dns/gnunet-service-dns.c
+++ b/src/dns/gnunet-service-dns.c
@@ -1043,7 +1043,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
1043 cfg = cfg_; 1043 cfg = cfg_;
1044 binary = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-dns"); 1044 binary = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-dns");
1045 if (GNUNET_YES != 1045 if (GNUNET_YES !=
1046 GNUNET_OS_check_helper_binary (binary, GNUNET_YES, NULL)) 1046 GNUNET_OS_check_helper_binary (binary, GNUNET_YES, NULL)) // TODO: once we have a windows-testcase, add test parameters here
1047 { 1047 {
1048 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 1048 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
1049 _("`%s' must be installed SUID, refusing to run\n"), 1049 _("`%s' must be installed SUID, refusing to run\n"),
diff --git a/src/gns/test_gns_proxy.c b/src/gns/test_gns_proxy.c
index 3ec2bf95c..10b2ec810 100644
--- a/src/gns/test_gns_proxy.c
+++ b/src/gns/test_gns_proxy.c
@@ -452,7 +452,7 @@ main (int argc, char *const *argv)
452 return 0; 452 return 0;
453 } 453 }
454 binary = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-dns"); 454 binary = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-dns");
455 if (GNUNET_YES != GNUNET_OS_check_helper_binary (binary, GNUNET_YES, NULL)) 455 if (GNUNET_YES != GNUNET_OS_check_helper_binary (binary, GNUNET_YES, NULL)) // TODO: once we have a windows-testcase, add test parameters here
456 { 456 {
457 fprintf (stderr, "DNS helper binary has wrong permissions... skipping!\n"); 457 fprintf (stderr, "DNS helper binary has wrong permissions... skipping!\n");
458 GNUNET_free (binary); 458 GNUNET_free (binary);
diff --git a/src/nat/nat.c b/src/nat/nat.c
index 84ca2efa2..515fa1eb8 100644
--- a/src/nat/nat.c
+++ b/src/nat/nat.c
@@ -1171,7 +1171,7 @@ GNUNET_NAT_register (const struct GNUNET_CONFIGURATION_Handle *cfg, int is_tcp,
1171 binary = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-nat-server"); 1171 binary = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-nat-server");
1172 if ((h->behind_nat == GNUNET_YES) && (GNUNET_YES == h->enable_nat_server) && 1172 if ((h->behind_nat == GNUNET_YES) && (GNUNET_YES == h->enable_nat_server) &&
1173 (GNUNET_YES != 1173 (GNUNET_YES !=
1174 GNUNET_OS_check_helper_binary (binary, GNUNET_YES, NULL))) // FIXME: CF: add test-parameters 1174 GNUNET_OS_check_helper_binary (binary, GNUNET_YES, "-d 127.0.0.1" ))) // use localhost as source for that one udp-port, ok for testing
1175 { 1175 {
1176 h->enable_nat_server = GNUNET_NO; 1176 h->enable_nat_server = GNUNET_NO;
1177 LOG (GNUNET_ERROR_TYPE_WARNING, 1177 LOG (GNUNET_ERROR_TYPE_WARNING,
diff --git a/src/nat/nat_auto.c b/src/nat/nat_auto.c
index 0c5bec118..68689243e 100644
--- a/src/nat/nat_auto.c
+++ b/src/nat/nat_auto.c
@@ -426,7 +426,7 @@ test_icmp_server (struct GNUNET_NAT_AutoHandle *ah)
426 (GNUNET_YES == 426 (GNUNET_YES ==
427 GNUNET_CONFIGURATION_get_value_yesno (ah->cfg, "nat", "BEHIND_NAT")) && 427 GNUNET_CONFIGURATION_get_value_yesno (ah->cfg, "nat", "BEHIND_NAT")) &&
428 (GNUNET_YES == 428 (GNUNET_YES ==
429 GNUNET_OS_check_helper_binary (binary, GNUNET_YES, NULL))); // FIXME: CF: add test-parameters 429 GNUNET_OS_check_helper_binary (binary, GNUNET_YES, "-d 127.0.0.1" ))); // use localhost as source for that one udp-port, ok for testing
430 GNUNET_free_non_null (tmp); 430 GNUNET_free_non_null (tmp);
431 GNUNET_free (binary); 431 GNUNET_free (binary);
432 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 432 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
diff --git a/src/pt/test_gns_vpn.c b/src/pt/test_gns_vpn.c
index b1d25dd85..d550e3511 100644
--- a/src/pt/test_gns_vpn.c
+++ b/src/pt/test_gns_vpn.c
@@ -543,11 +543,11 @@ main (int argc, char *const *argv)
543 bin_dns = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-dns"); 543 bin_dns = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-dns");
544 if ( (0 != geteuid ()) && 544 if ( (0 != geteuid ()) &&
545 ( (GNUNET_YES != 545 ( (GNUNET_YES !=
546 GNUNET_OS_check_helper_binary (bin_vpn, GNUNET_YES, NULL)) || 546 GNUNET_OS_check_helper_binary (bin_vpn, GNUNET_YES, "-d gnunet-vpn - - 169.1.3.3.7 255.255.255.0")) || //ipv4 only please!
547 (GNUNET_YES != 547 (GNUNET_YES !=
548 GNUNET_OS_check_helper_binary (bin_exit, GNUNET_YES, NULL)) || 548 GNUNET_OS_check_helper_binary (bin_exit, GNUNET_YES, "-d gnunet-vpn - - - 169.1.3.3.7 255.255.255.0")) || //no nat, ipv4 only
549 (GNUNET_YES != 549 (GNUNET_YES !=
550 GNUNET_OS_check_helper_binary (bin_dns, GNUNET_YES, NULL))) ) 550 GNUNET_OS_check_helper_binary (bin_dns, GNUNET_YES, NULL))) ) // TODO: once we have a windows-testcase, add test parameters here
551 { 551 {
552 fprintf (stderr, 552 fprintf (stderr,
553 "WARNING: gnunet-helper-{exit,vpn,dns} binaries in $PATH are not SUID, refusing to run test (as it would have to fail).\n"); 553 "WARNING: gnunet-helper-{exit,vpn,dns} binaries in $PATH are not SUID, refusing to run test (as it would have to fail).\n");