git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6f0f82f
)
s4:upgradeprovision Use mkdtemp to create unique tempoary directory names
author
Andrew Bartlett
<abartlet@samba.org>
Thu, 26 Nov 2009 10:52:40 +0000
(21:52 +1100)
committer
Andrew Tridgell
<tridge@samba.org>
Fri, 27 Nov 2009 05:05:05 +0000
(16:05 +1100)
source4/scripting/bin/upgradeprovision
patch
|
blob
|
history
diff --git
a/source4/scripting/bin/upgradeprovision
b/source4/scripting/bin/upgradeprovision
index 7dd9a95b1e6c641b76081b53f792a8e805d381a8..81cf3388dfcd3993b6b37ba781ab7981ee2c4e23 100755
(executable)
--- a/
source4/scripting/bin/upgradeprovision
+++ b/
source4/scripting/bin/upgradeprovision
@@
-30,6
+30,7
@@
import random
import string
import re
import base64
import string
import re
import base64
+import tempfile
# Find right directory when running from source tree
sys.path.insert(0, "bin/python")
# Find right directory when running from source tree
sys.path.insert(0, "bin/python")
@@
-266,7
+267,7
@@
def print_names(names):
# since the latest upgrade in the current provision
def newprovision(names,setup_dir,creds,session,smbconf):
message(SIMPLE, "Creating a reference provision")
# since the latest upgrade in the current provision
def newprovision(names,setup_dir,creds,session,smbconf):
message(SIMPLE, "Creating a reference provision")
- provdir=
os.path.join(paths.private_dir,
"referenceprovision")
+ provdir=
tempfile.mkdtemp(dir=paths.private_dir, prefix=
"referenceprovision")
if os.path.isdir(provdir):
rmall(provdir)
logstd=os.path.join(provdir,"log.std")
if os.path.isdir(provdir):
rmall(provdir)
logstd=os.path.join(provdir,"log.std")
@@
-736,9
+737,9
@@
populate_backlink(newpaths,creds,session,names.schemadn)
update_basesamdb(newpaths,paths,names)
update_secrets(newpaths,paths,creds,session)
update_privilege(newpaths,paths)
update_basesamdb(newpaths,paths,names)
update_secrets(newpaths,paths,creds,session)
update_privilege(newpaths,paths)
+update_machine_account_password(newpaths,paths,creds,session,names)
if opts.full:
update_samdb(newpaths,paths,creds,session,names)
if opts.full:
update_samdb(newpaths,paths,creds,session,names)
- update_machine_account_password(newpaths,paths,creds,session,names)
message(SIMPLE,"Upgrade finished !")
# remove reference provision now that everything is done !
rmall(provisiondir)
message(SIMPLE,"Upgrade finished !")
# remove reference provision now that everything is done !
rmall(provisiondir)