aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-06-04 23:30:14 +0200
committerChristian Grothoff <christian@grothoff.org>2019-06-04 23:30:14 +0200
commit1e0b9f58484526d7551032dd1a50b0683d91cbd8 (patch)
tree18187ec7733b9291b6e5a02e1ab79a9a4d493bc3
parent0a01368474f54f563aa8168bb4d0a6356a66c104 (diff)
downloadgnunet-1e0b9f58484526d7551032dd1a50b0683d91cbd8.tar.gz
gnunet-1e0b9f58484526d7551032dd1a50b0683d91cbd8.zip
bloody off_t
-rwxr-xr-xsrc/gns/test_gns_cname_lookup.sh5
-rw-r--r--src/gns/test_gns_lookup.conf3
-rw-r--r--src/util/gnunet-service-resolver.c4
3 files changed, 9 insertions, 3 deletions
diff --git a/src/gns/test_gns_cname_lookup.sh b/src/gns/test_gns_cname_lookup.sh
index d97a4fe5e..d168e4acb 100755
--- a/src/gns/test_gns_cname_lookup.sh
+++ b/src/gns/test_gns_cname_lookup.sh
@@ -46,6 +46,9 @@ gnunet-namestore -p -z $MY_EGO -a -n $TEST_RECORD_CNAME_SERVER -t A -V $TEST_IP_
46RES_CNAME=`$DO_TIMEOUT gnunet-gns --raw -u $TEST_DOMAIN_PLUS -t A -c test_gns_lookup.conf` 46RES_CNAME=`$DO_TIMEOUT gnunet-gns --raw -u $TEST_DOMAIN_PLUS -t A -c test_gns_lookup.conf`
47RES_CNAME_RAW=`$DO_TIMEOUT gnunet-gns --raw -u $TEST_DOMAIN_PLUS -t CNAME -c test_gns_lookup.conf` 47RES_CNAME_RAW=`$DO_TIMEOUT gnunet-gns --raw -u $TEST_DOMAIN_PLUS -t CNAME -c test_gns_lookup.conf`
48RES_CNAME_DNS=`$DO_TIMEOUT gnunet-gns --raw -u $TEST_DOMAIN_DNS -t A -c test_gns_lookup.conf` 48RES_CNAME_DNS=`$DO_TIMEOUT gnunet-gns --raw -u $TEST_DOMAIN_DNS -t A -c test_gns_lookup.conf`
49echo NOW
50gnunet-gns --raw -u $TEST_DOMAIN_DNS -t A -c test_gns_lookup.conf
51echo WON
49TESTEGOZONE=`gnunet-identity -c test_gns_lookup.conf -d | awk '{print $3}'` 52TESTEGOZONE=`gnunet-identity -c test_gns_lookup.conf -d | awk '{print $3}'`
50gnunet-namestore -p -z $MY_EGO -d -n $TEST_RECORD_NAME_DNS -t CNAME -V $TEST_RECORD_CNAME_DNS -e never -c test_gns_lookup.conf 53gnunet-namestore -p -z $MY_EGO -d -n $TEST_RECORD_NAME_DNS -t CNAME -V $TEST_RECORD_CNAME_DNS -e never -c test_gns_lookup.conf
51gnunet-namestore -p -z $MY_EGO -d -n $TEST_RECORD_NAME_PLUS -t CNAME -V $TEST_RECORD_CNAME_PLUS -e never -c test_gns_lookup.conf 54gnunet-namestore -p -z $MY_EGO -d -n $TEST_RECORD_NAME_PLUS -t CNAME -V $TEST_RECORD_CNAME_PLUS -e never -c test_gns_lookup.conf
@@ -78,6 +81,6 @@ then
78 echo "PASS: IP resolution from DNS" 81 echo "PASS: IP resolution from DNS"
79 exit 0 82 exit 0
80else 83else
81 echo "FAIL: IP resolution from DNS, got $RES_IP, expected $TEST_IP_DNS." 84 echo "FAIL: IP resolution from DNS, got $RES_CNAME_DNS, expected $TEST_IP_DNS."
82 exit 1 85 exit 1
83fi 86fi
diff --git a/src/gns/test_gns_lookup.conf b/src/gns/test_gns_lookup.conf
index 2b874f80d..2af52a0e2 100644
--- a/src/gns/test_gns_lookup.conf
+++ b/src/gns/test_gns_lookup.conf
@@ -6,6 +6,9 @@ DISABLE = YES
6[PATHS] 6[PATHS]
7GNUNET_TEST_HOME = $GNUNET_TMP/test-gnunet-gns-peer-1/ 7GNUNET_TEST_HOME = $GNUNET_TMP/test-gnunet-gns-peer-1/
8 8
9[ARM]
10OPTIONS = -l gnunet-%Y-%m-%d.log
11
9[dht] 12[dht]
10START_ON_DEMAND = YES 13START_ON_DEMAND = YES
11 14
diff --git a/src/util/gnunet-service-resolver.c b/src/util/gnunet-service-resolver.c
index 29ecf3e89..2cabe553b 100644
--- a/src/util/gnunet-service-resolver.c
+++ b/src/util/gnunet-service-resolver.c
@@ -344,7 +344,7 @@ lookup_dns_servers (char ***server_addrs)
344 GNUNET_DISK_file_close (fh); 344 GNUNET_DISK_file_close (fh);
345 return -1; 345 return -1;
346 } 346 }
347 if (bytes_read > (off_t) SIZE_MAX) 347 if (((unsigned long long) bytes_read) > (unsigned long long) SIZE_MAX)
348 { 348 {
349 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 349 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
350 "/etc/resolv.conf file too large to mmap. " 350 "/etc/resolv.conf file too large to mmap. "
@@ -1213,7 +1213,7 @@ load_etc_hosts (void)
1213 GNUNET_DISK_file_close (fh); 1213 GNUNET_DISK_file_close (fh);
1214 return; 1214 return;
1215 } 1215 }
1216 if (bytes_read > (off_t) SIZE_MAX) 1216 if (((unsigned long long) bytes_read) > (unsigned long long) SIZE_MAX)
1217 { 1217 {
1218 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 1218 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
1219 "/etc/hosts file too large to mmap. " 1219 "/etc/hosts file too large to mmap. "