summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2014-12-03 15:44:57 +0100
committerAndrew Bartlett <abartlet@samba.org>2014-12-05 23:32:06 +0100
commit70bbb1dd3c8d118fd5a2ff01bd4aa4c00d34998e (patch)
tree6fc3785efb055dae3c3559a1d729eee0f160f0ab
parent9cde3aec48852c2eb109bcdcf337659743067594 (diff)
downloadsamba-70bbb1dd3c8d118fd5a2ff01bd4aa4c00d34998e.tar.gz
selftest: Add the normal dns name as an alias for the main DC.
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
-rwxr-xr-xselftest/target/Samba4.pm9
1 files changed, 7 insertions, 2 deletions
diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm
index 342de582a76..835d5fd4082 100755
--- a/selftest/target/Samba4.pm
+++ b/selftest/target/Samba4.pm
@@ -703,8 +703,13 @@ $ctx->{unix_name}:x:$ctx->{unix_gid}:
my $hostname = lc($ctx->{hostname});
open(HOSTS, ">>$ctx->{nsswrap_hosts}");
- print HOSTS "$ctx->{ipv4} ${hostname}.$ctx->{dnsname} ${hostname}\n";
- print HOSTS "$ctx->{ipv6} ${hostname}.$ctx->{dnsname} ${hostname}\n";
+ if ($hostname eq "localdc") {
+ print HOSTS "$ctx->{ipv4} ${hostname}.$ctx->{dnsname} $ctx->{dnsname} ${hostname}\n";
+ print HOSTS "$ctx->{ipv6} ${hostname}.$ctx->{dnsname} $ctx->{dnsname} ${hostname}\n";
+ } else {
+ print HOSTS "$ctx->{ipv4} ${hostname}.$ctx->{dnsname} ${hostname}\n";
+ print HOSTS "$ctx->{ipv6} ${hostname}.$ctx->{dnsname} ${hostname}\n";
+ }
close(HOSTS);
my $configuration = "--configfile=$ctx->{smb_conf}";