diff options
author | Andrew Bartlett <abartlet@samba.org> | 2009-11-26 21:52:40 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-11-27 16:05:05 +1100 |
commit | d1faf7c90c8a23a2d09576ec45558ce457aa9d03 (patch) | |
tree | 434e0a31a7c0fd4bba3f54b45858887b8c597729 /source4 | |
parent | 6f0f82f7ed9cd351b325d4ae275184b67c4b751b (diff) | |
download | samba-d1faf7c90c8a23a2d09576ec45558ce457aa9d03.tar.gz samba-d1faf7c90c8a23a2d09576ec45558ce457aa9d03.tar.bz2 samba-d1faf7c90c8a23a2d09576ec45558ce457aa9d03.zip |
s4:upgradeprovision Use mkdtemp to create unique tempoary directory names
Diffstat (limited to 'source4')
-rwxr-xr-x | source4/scripting/bin/upgradeprovision | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/scripting/bin/upgradeprovision b/source4/scripting/bin/upgradeprovision index 7dd9a95b1e..81cf3388df 100755 --- a/source4/scripting/bin/upgradeprovision +++ b/source4/scripting/bin/upgradeprovision @@ -30,6 +30,7 @@ import random import string import re import base64 +import tempfile # 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") - 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") @@ -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_machine_account_password(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) |