summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-10-06 13:57:42 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:59:37 -0500
commitbecc7302f038dfc0237021a55aeefa4c601893e5 (patch)
tree3c1926f66edaa428cf8ea8d6728ba641d6b7e15f
parent85428819e3acd408f8aca7db5cd681b828fe37a2 (diff)
downloadsamba-becc7302f038dfc0237021a55aeefa4c601893e5.tar.gz
samba-becc7302f038dfc0237021a55aeefa4c601893e5.tar.bz2
samba-becc7302f038dfc0237021a55aeefa4c601893e5.zip
r2829: REALM and netbiosname are always uppercase
dnsname and dnshostname always lowercase metze (This used to be commit 0b46dc6f4b3614fc1d258653f0c8df63586539b6)
-rw-r--r--source4/provision.ldif2
-rwxr-xr-xsource4/script/provision.pl12
2 files changed, 12 insertions, 2 deletions
diff --git a/source4/provision.ldif b/source4/provision.ldif
index 460549db1d..1adb8600b3 100644
--- a/source4/provision.ldif
+++ b/source4/provision.ldif
@@ -36,7 +36,7 @@ objectClass: domain
objectClass: domainDNS
name: ${DOMAIN}
realm: ${REALM}
-dnsDomain: ${REALM}
+dnsDomain: ${DNSDOMAIN}
dc: ${DOMAIN}
objectGUID: ${NEWGUID}
creationTime: ${NTTIME}
diff --git a/source4/script/provision.pl b/source4/script/provision.pl
index b1070d2013..8863653e34 100755
--- a/source4/script/provision.pl
+++ b/source4/script/provision.pl
@@ -12,6 +12,7 @@ my $opt_nobody;
my $opt_nogroup;
my $opt_wheel;
my $opt_users;
+my $dnsdomain;
my $dnsname;
my $basedn;
@@ -87,6 +88,10 @@ sub substitute($)
return $opt_realm;
}
+ if ($var eq "DNSDOMAIN") {
+ return $dnsdomain;
+ }
+
if ($var eq "HOSTNAME") {
return $opt_hostname;
}
@@ -230,6 +235,10 @@ if ($opt_help ||
ShowHelp();
}
+$opt_realm=uc($opt_realm);
+$opt_domain=uc($opt_domain);
+$opt_hostname=uc($opt_hostname);
+
print "Provisioning host '$opt_hostname' for domain '$opt_domain' in realm '$opt_realm'\n";
if (!$opt_nobody) {
@@ -269,7 +278,8 @@ print "Using nobody='$opt_nobody' nogroup='$opt_nogroup' wheel='$opt_wheel' u
print "generating ldif ...\n";
-$dnsname = "$opt_hostname.$opt_realm";
+$dnsdomain = lc($opt_realm);
+$dnsname = lc($opt_hostname).".".$dnsdomain;
$basedn = "DC=" . join(",DC=", split(/\./, $opt_realm));
my $data = FileLoad("provision.ldif") || die "Unable to load provision.ldif\n";