diff options
Diffstat (limited to 'src/dns/test_gnunet_dns.sh')
-rwxr-xr-x | src/dns/test_gnunet_dns.sh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/dns/test_gnunet_dns.sh b/src/dns/test_gnunet_dns.sh index 35585d46e..c60b94c19 100755 --- a/src/dns/test_gnunet_dns.sh +++ b/src/dns/test_gnunet_dns.sh | |||
@@ -10,9 +10,15 @@ export PATH=".:$PATH" | |||
10 | gnunet-service-dns -c dns.conf & | 10 | gnunet-service-dns -c dns.conf & |
11 | gnunet-dns-redirector -c dns.conf -4 127.0.0.1 & | 11 | gnunet-dns-redirector -c dns.conf -4 127.0.0.1 & |
12 | sleep 1 | 12 | sleep 1 |
13 | LO=`nslookup gnunet.org | grep Address | tail -n1` | 13 | # need to run 'nslookup' as 'nobody', as gnunet-service-dns runs as root |
14 | # and thus 'root' is excepted from DNS interception! | ||
15 | LO=`sudo -u nobody nslookup gnunet.org | grep Address | tail -n1` | ||
14 | if [ "$LO" != "Address: 127.0.0.1" ] | 16 | if [ "$LO" != "Address: 127.0.0.1" ] |
15 | then | 17 | then |
16 | echo "Fail: $LO" | 18 | echo "Fail: got address $LO, wanted 127.0.0.1" |
19 | ret=1 | ||
20 | else | ||
21 | ret=0 | ||
17 | fi | 22 | fi |
18 | kill `jobs -p` | 23 | kill `jobs -p` |
24 | exit $ret | ||