summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsource4/script/provision.pl13
1 files changed, 11 insertions, 2 deletions
diff --git a/source4/script/provision.pl b/source4/script/provision.pl
index faa7cef385..e71c065328 100755
--- a/source4/script/provision.pl
+++ b/source4/script/provision.pl
@@ -36,6 +36,15 @@ sub randsid()
int(rand(10**8)), int(rand(10**8)), int(rand(10**8)));
}
+my $domainsid = randsid();
+
+sub ldaptime()
+{
+ my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday) = gmtime(time);
+ return sprintf "%04u%02u%02u%02u%02u%02u.0Z",
+ $year+1900, $mon+1, $mday, $hour, $min, $sec;
+}
+
#######################
# substitute a single variable
sub substitute($)
@@ -47,7 +56,7 @@ sub substitute($)
}
if ($var eq "DOMAINSID") {
- return randsid();
+ return $domainsid;
}
if ($var eq "DOMAIN") {
@@ -63,7 +72,7 @@ sub substitute($)
}
if ($var eq "LDAPTIME") {
- return "20040408072022.0Z";
+ return ldaptime();
}
if ($var eq "NEWGUID") {