s3-selftest names into DNS hosts file to avoid NBT lookups
authorAndrew Bartlett <abartlet@samba.org>
Wed, 6 Apr 2011 02:10:03 +0000 (12:10 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 6 Apr 2011 02:34:58 +0000 (12:34 +1000)
NBT lookups cause trouble and variablity in 'make test', so it's much
better if we just use the fake DNS code.  This code is only used by
smbtorture4 at this time, but the other client tools are generally
told to contact by IP address.

We need to contact by name to test Kerberos, and this should make the
kerberos tests much more reliable.

Andrew Bartlett

selftest/target/Samba3.pm

index de3fffbc931f1ade7112c0fb9a017113f5b776d0..66f7a4403e3a97dc95c1aa01685e52f3acca5269 100644 (file)
@@ -802,6 +802,11 @@ domusers:X:$gid_domusers:
 
        print "DONE\n";
 
+       open(HOSTS, ">>$ENV{SELFTEST_PREFIX}/dns_host_file") or die("Unable to open $ENV{SELFTEST_PREFIX}/dns_host_file");
+       print HOSTS "A $server $server_ip
+";
+       close(HOSTS);
+
        $ret{SERVER_IP} = $server_ip;
        $ret{NMBD_TEST_LOG} = "$prefix/nmbd_test.log";
        $ret{NMBD_TEST_LOG_POS} = 0;