From 961060351e3e3a3bfeb41c8d238babd349926ebf Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 9 May 2004 00:41:32 +0000 Subject: r594: - make sure all users in the domain have the same base sid! - added proper ldap time construction to provisioning (This used to be commit 0f12584b4b1b90aa20c6a4a5199829b5beba2a1d) --- source4/script/provision.pl | 13 +++++++++++-- 1 file 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") { -- cgit