summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2009-11-27 08:10:54 +1100
committerAndrew Tridgell <tridge@samba.org>2009-11-27 16:05:05 +1100
commit8455a765164abf43794e10390978b22156e5c50a (patch)
tree6a94ce9112e47f6132c4414510985c406d4485c7
parente6c1608e909b9bbc1bdceeb24d57b9333c453a3d (diff)
downloadsamba-8455a765164abf43794e10390978b22156e5c50a.tar.gz
samba-8455a765164abf43794e10390978b22156e5c50a.tar.bz2
samba-8455a765164abf43794e10390978b22156e5c50a.zip
s4:upgradeprovision Rework update_machine_account_password() tranactions
This balances the transaction_begin() and transactin_prepare_commit() calls Andrew Bartlett
-rwxr-xr-xsource4/scripting/bin/upgradeprovision10
1 files changed, 6 insertions, 4 deletions
diff --git a/source4/scripting/bin/upgradeprovision b/source4/scripting/bin/upgradeprovision
index 81cf3388df..9298c02672 100755
--- a/source4/scripting/bin/upgradeprovision
+++ b/source4/scripting/bin/upgradeprovision
@@ -712,10 +712,12 @@ def update_machine_account_password(newpaths,paths,creds,session,names):
machinepass=machinepass,
key_version_number=kvno,
secure_channel_type=secrets_msg[0]["secureChannelType"])
- sam_ldb.transaction_prepare_commit()
- secrets_ldb.transaction_prepare_commit()
- sam_ldb.transaction_commit()
- secrets_ldb.transaction_commit()
+ sam_ldb.transaction_prepare_commit()
+ secrets_ldb.transaction_prepare_commit()
+ sam_ldb.transaction_commit()
+ secrets_ldb.transaction_commit()
+ else:
+ secrets_ldb.transaction_cancel()
# From here start the big steps of the program
# First get files paths